Error in CMakelist.txt

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) 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.

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?

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.

Could you please suggest any fixes

Thanks

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.

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!

@ypolyakov Can you please help here.

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?

@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!

@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.
We will correct the README file for openfhe-python as it includes some outdated information.