# Error in CMakelist.txt

**URL:** <https://openfhe.discourse.group/t/error-in-cmakelist-txt/1168>\
**Category:** OpenFHE ports/wrappers\
**Created:** [April 3, 2024, 9:42am UTC](https://openfhe.discourse.group/t/error-in-cmakelist-txt/1168 "2024-04-03T09:42:41Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Toscrack](https://avatars.discourse-cdn.com/v4/letter/t/71c47a/32.png) [@Toscrack](https://openfhe.discourse.group/u/Toscrack)\
**Post date:** [April 3, 2024, 9:42am UTC](https://openfhe.discourse.group/t/error-in-cmakelist-txt/1168/1 "2024-04-03T09:42:41Z")

</div>

Hi everyone.  
I’m trying to write my first program in Python by using the library (already made in C++ language); I followed the steps posted here ([GitHub - openfheorg/openfhe-python at docker](https://github.com/openfheorg/openfhe-python/tree/docker?tab=readme-ov-file#linux)) but I’m stuck when running the command “cmake …” that gives me this error:

CMake Error at CMakeLists.txt:79 (install):  
install TARGETS given no LIBRARY DESTINATION for module target “openfhe”.

Can someone help me? With OpenFHE C++ installation i had no problem.

---

<div class="post-metadata">

**Author:** ![ypolyakov](https://yyz1.discourse-cdn.com/flex031/user_avatar/openfhe.discourse.group/ypolyakov/32/47_2.png) [@ypolyakov](https://openfhe.discourse.group/u/ypolyakov)\
**Post date:** [April 10, 2024, 2:17am UTC](https://openfhe.discourse.group/t/error-in-cmakelist-txt/1168/2 "2024-04-10T02:17:58Z")

</div>

Did you make sure the OpenFHE C++ library was installed before you tried to build Python? For example, you can try the default installation with “sudo make install” to try a simpler way.

What environment/compiler did you use? I am not aware of any problems installing it in Linux or macOS environments. Did you install both OpenFHE and OpenFHE-Python using the `main` branches?

---

<div class="post-metadata">

**Author:** ![creator5923](https://avatars.discourse-cdn.com/v4/letter/c/7cd45c/32.png) [@creator5923](https://openfhe.discourse.group/u/creator5923)\
**Post date:** [May 3, 2024, 8:56am UTC](https://openfhe.discourse.group/t/error-in-cmakelist-txt/1168/3 "2024-05-03T08:56:08Z")

</div>

Hey @ypolyakov

I had install openFHE C++ library to system directory using `sudo make install`

But still facing error while installing openfhe-python with conda

I am facing error while doing `cmake .. -DOpenFHE_DIR=/usr/local/lib/OpenFHE`. Facing the same error even after running the `cmake . .` command.

 ![image](https://canada1.discourse-cdn.com/flex031/uploads/openfhe/original/1X/bc786cf62ada8f762874c5c299e57745a91e7a9d.jpeg)

Could you please suggest any fixes

Thanks

---

<div class="post-metadata">

**Author:** ![ypolyakov](https://yyz1.discourse-cdn.com/flex031/user_avatar/openfhe.discourse.group/ypolyakov/32/47_2.png) [@ypolyakov](https://openfhe.discourse.group/u/ypolyakov)\
**Post date:** [May 3, 2024, 10:08pm UTC](https://openfhe.discourse.group/t/error-in-cmakelist-txt/1168/4 "2024-05-03T22:08:07Z")

</div>

The default path for OpenFHE is not /usr/local/lib/OpenFHE. So the CMake install for OpenFHE-python cannot find where the OpenFHE package is installed. When you run `cmake ..` again, it does not reset OpenFHE\_DIR as it reads it from the CMake cache.

To reset it, you need to clear the cmake cache either by typing “make clean” in the build directory or simply deleting and recreating the build directory. After that, rerun the build process just using `cmake ..` (w/o setting OpenFHE\_DIR). This is the default (simplest) way of installing the OpenFHE bindings.

---

<div class="post-metadata">

**Author:** ![creator5923](https://avatars.discourse-cdn.com/v4/letter/c/7cd45c/32.png) [@creator5923](https://openfhe.discourse.group/u/creator5923)\
**Post date:** [May 4, 2024, 5:35am UTC](https://openfhe.discourse.group/t/error-in-cmakelist-txt/1168/5 "2024-05-04T05:35:34Z")

</div>

Thanks for the reply.

I tried cleaning the openFHE build directory and after that reinstalled it again using `sudo make install`. But still receiving the same error on issuing `cmake . .` in openFHE-python build directory. (Additionally i cleaned up the cache `CmakeCache.txt` in openFHE-python build directory).

I tried the whole process again by cloning the openFHE repo and building it and try to link the bindings to the openFHE-python again but still it’s returning the same error at `cmake . .`.

OS: MacOS sonoma  
Chip: M3 Pro

I am trying the setup the `main` branch of openFHE-python.

Thanks!

---

<div class="post-metadata">

**Author:** ![creator5923](https://avatars.discourse-cdn.com/v4/letter/c/7cd45c/32.png) [@creator5923](https://openfhe.discourse.group/u/creator5923)\
**Post date:** [May 6, 2024, 12:08pm UTC](https://openfhe.discourse.group/t/error-in-cmakelist-txt/1168/6 "2024-05-06T12:08:28Z")

</div>

@ypolyakov Can you please help here.

---

<div class="post-metadata">

**Author:** ![ypolyakov](https://yyz1.discourse-cdn.com/flex031/user_avatar/openfhe.discourse.group/ypolyakov/32/47_2.png) [@ypolyakov](https://openfhe.discourse.group/u/ypolyakov)\
**Post date:** [May 7, 2024, 3:18am UTC](https://openfhe.discourse.group/t/error-in-cmakelist-txt/1168/7 "2024-05-07T03:18:37Z")

</div>

Hmm. I know there are several Mac users of OpenFHE-python and they are not experiencing any issues. I am certainly not having any issues in Linux. Has anyone else in the forum run across this issue?

---

<div class="post-metadata">

**Author:** ![creator5923](https://avatars.discourse-cdn.com/v4/letter/c/7cd45c/32.png) [@creator5923](https://openfhe.discourse.group/u/creator5923)\
**Post date:** [May 7, 2024, 7:34am UTC](https://openfhe.discourse.group/t/error-in-cmakelist-txt/1168/8 "2024-05-07T07:34:41Z")

</div>

@ypolyakov It might be too lot to ask, But can we have a sort of like a installation tutorial video i think that would really help with these kinds of installation issues.

Thanks!

---

<div class="post-metadata">

**Author:** ![dsuponitskiy-duality](https://avatars.discourse-cdn.com/v4/letter/d/c68b51/32.png) [@dsuponitskiy-duality](https://openfhe.discourse.group/u/dsuponitskiy-duality)\
**Post date:** [May 7, 2024, 9:01pm UTC](https://openfhe.discourse.group/t/error-in-cmakelist-txt/1168/9 "2024-05-07T21:01:51Z")

</div>

@creator5923 Looks like you didn’t set the OpenFHE install location correctly. The set up should be very similar to what you do for [OpenFHE user applications](https://openfhe-development.readthedocs.io/en/latest/sphinx_rsts/intro/building_user_applications.html).  
We will correct the README file for openfhe-python as it includes some outdated information.
