# Fail to make when building my own app

**URL:** https://openfhe.discourse.group/t/fail-to-make-when-building-my-own-app/220
**Category:** Library Questions
**Tags:** bugs
**Created:** [November 10, 2022, 10:54am UTC](https://openfhe.discourse.group/t/fail-to-make-when-building-my-own-app/220 "2022-11-10T10:54:24Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![lance](https://avatars.discourse-cdn.com/v4/letter/l/7ab992/32.png) [@lance](https://openfhe.discourse.group/u/lance)
#### Post date: [November 10, 2022, 10:54am UTC](https://openfhe.discourse.group/t/fail-to-make-when-building-my-own-app/220/1 "2022-11-10T10:54:24Z")

</div>

I follow the guide of document for building my application.  
I paste the CKKS example from OpenFHE, copy the “CMakeLists.User.txt” to the my folder and rename it.  
But when make, I meet a strenge error

```auto
(base) lance@407350:~/fhe_example/build# make
[50%] Building CXX object CMakeFiles/test.dir/ckks_example.cpp.o
c++: error: unrecognized command line option ‘-fopenmp=libomp’; did you mean ‘-fopenmp-simd’?
c++: error: unrecognized command line option ‘-fopenmp=libomp’; did you mean ‘-fopenmp-simd’?
make[2]: *** [CMakeFiles/test.dir/build.make:63: CMakeFiles/test.dir/ckks_example.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:76: CMakeFiles/test.dir/all] Error 2
make: *** [Makefile:84: all] Error 2

```

system list:

```auto
OpenFHE 1.0
Platform Ubuntu 20.0
Compiler Clang 10.0

```

---

<div class="post-metadata">

### Author: ![iquah](https://yyz1.discourse-cdn.com/flex031/user_avatar/openfhe.discourse.group/iquah/32/8_2.png) [@iquah](https://openfhe.discourse.group/u/iquah)
#### Post date: [November 10, 2022, 11:17am UTC](https://openfhe.discourse.group/t/fail-to-make-when-building-my-own-app/220/2 "2022-11-10T11:17:12Z")

</div>

Hi!

Are you able to run the examples from the openfhe repo?

---

<div class="post-metadata">

### Author: ![lance](https://avatars.discourse-cdn.com/v4/letter/l/7ab992/32.png) [@lance](https://openfhe.discourse.group/u/lance)
#### Post date: [November 10, 2022, 12:59pm UTC](https://openfhe.discourse.group/t/fail-to-make-when-building-my-own-app/220/3 "2022-11-10T12:59:48Z")

</div>

I run this with openfhe

```auto
(base) lance@407350:~/openfhe-development/build# bin/examples/pke/simple-integers
Plaintext #1: ( 1 2 3 4 5 6 7 8 9 10 11 12 ... )
Plaintext #2: ( 3 2 1 4 5 6 7 8 9 10 11 12 ... )
Plaintext #3: ( 1 2 5 2 5 6 7 8 9 10 11 12 ... )

Results of homomorphic computations
#1 + #2 + #3: ( 5 6 9 10 15 18 21 24 27 30 33 36 ... )
#1 * #2 * #3: ( 3 8 15 32 125 216 343 512 729 1000 1331 1728 ... )
Left rotation of #1 by 1: ( 2 3 4 5 6 7 8 9 10 11 12 ... )
Left rotation of #1 by 2: ( 3 4 5 6 7 8 9 10 11 12 ... )
Right rotation of #1 by 1: ( 0 1 2 3 4 5 6 7 8 9 10 11 ... )
Right rotation of #1 by 2: ( 0 0 1 2 3 4 5 6 7 8 9 10 ... )

```

But I want to use openfhe lib in my folder

---

<div class="post-metadata">

### Author: ![iquah](https://yyz1.discourse-cdn.com/flex031/user_avatar/openfhe.discourse.group/iquah/32/8_2.png) [@iquah](https://openfhe.discourse.group/u/iquah)
#### Post date: [November 10, 2022, 1:42pm UTC](https://openfhe.discourse.group/t/fail-to-make-when-building-my-own-app/220/4 "2022-11-10T13:42:38Z")

</div>

Glad to hear that you got the examples to work!

Can you share a [minimal reproducible example](https://stackoverflow.com/help/minimal-reproducible-example)?

---

<div class="post-metadata">

### Author: ![dcousins](https://yyz1.discourse-cdn.com/flex031/user_avatar/openfhe.discourse.group/dcousins/32/71_2.png) [@dcousins](https://openfhe.discourse.group/u/dcousins)
#### Post date: [November 10, 2022, 6:27pm UTC](https://openfhe.discourse.group/t/fail-to-make-when-building-my-own-app/220/5 "2022-11-10T18:27:49Z")

</div>

This is an odd error, since -fopenmp is defined only in OpenMP\_CXX\_FLAGS and OpenMP\_C\_FLAGS  
and it looks like that is getting mangled somehow into -fopenmp=libomp

Did you edit the copy of CMakeLists.User.txt to add your specific executable name? that should be the only think you needed to change.

Did you “make install” the openFHE library on you system? The default location requires sudo permission, but you can install it locally by specifying a directory name when you run cmake.

```auto
cmake -DCMAKE_INSTALL_PREFIX=/home/dcousins/opt/openfhe .. 

```

---

<div class="post-metadata">

### Author: ![lance](https://avatars.discourse-cdn.com/v4/letter/l/7ab992/32.png) [@lance](https://openfhe.discourse.group/u/lance)
#### Post date: [November 11, 2022, 1:22am UTC](https://openfhe.discourse.group/t/fail-to-make-when-building-my-own-app/220/6 "2022-11-11T01:22:13Z")

</div>

Thank you for your help, but this error magically disappears without any changes, it fixes itself 😆  
I will try your method at the last time meeting this error.  
Danke!

---

<div class="post-metadata">

### Author: ![dcousins](https://yyz1.discourse-cdn.com/flex031/user_avatar/openfhe.discourse.group/dcousins/32/71_2.png) [@dcousins](https://openfhe.discourse.group/u/dcousins)
#### Post date: [November 22, 2022, 5:38pm UTC](https://openfhe.discourse.group/t/fail-to-make-when-building-my-own-app/220/7 "2022-11-22T17:38:02Z")

</div>

Bitte! Sometimes it is a condition where the build system is left in a funky state…

---

<div class="post-metadata">

### Author: ![A9252312015k](https://avatars.discourse-cdn.com/v4/letter/a/eada6e/32.png) [@A9252312015k](https://openfhe.discourse.group/u/A9252312015k)
#### Post date: [May 22, 2023, 11:25pm UTC](https://openfhe.discourse.group/t/fail-to-make-when-building-my-own-app/220/8 "2023-05-22T23:25:30Z")

</div>

I have faced the same problem and still could not solve it. I would be grateful if you could help me

---

<div class="post-metadata">

### Author: ![iquah](https://yyz1.discourse-cdn.com/flex031/user_avatar/openfhe.discourse.group/iquah/32/8_2.png) [@iquah](https://openfhe.discourse.group/u/iquah)
#### Post date: [May 22, 2023, 11:26pm UTC](https://openfhe.discourse.group/t/fail-to-make-when-building-my-own-app/220/9 "2023-05-22T23:26:42Z")

</div>

@A9252312015k

Please open a new discussion. In that discussion include additional information such as your OS, what version of OpenFHE you’re installing, what errors you’re encountering, what commands you’ve run (please be detailed) and more

Thanks!
