I’m using OpenFHE in a google cloud Ubuntu VM (using Ubuntu, 22.04 LTS Pro Server, amd64 jammy pro).
I’m having a problem trying to run my project with openFHE. I’m following the “Build User Applications” section in the documentation, but when I run “make” (in step 8) the compiler can’t find the “openfhe.h” file nor the “lbcrypto” namespace. I think it is probably due me not installing OpenFHE in the correct directory.
My question is if I’m supposed to specify my project folder when running “make install” in step 6 of “Installing OpenFHE on Linux”. I only ran “make install” when I did it.
My project has one file, which has the code I copied from “openfhe-development/src/pke/exampls/simple-integers.cpp”.
My question is if I’m supposed to specify my project folder when running “make install” in step 6 of “Installing OpenFHE on Linux”. I only ran “make install” when I did it.
Did you specify a custom path when running cmake like in the following cmake -DCMAKE_INSTALL_PREFIX=/your/path ?
To make debugging this easier can you post a step-by-step of what commands you ran? e.g.
mkdir build && cd build
.... # Your instructions below
No, I didn’t specify anything. I just ran cmake ...
After going through everything in the “Installing OpenFHE on Linux”, I ran every step in the “Building User Application” section.
I created a folder for my project and copied the “CMakeLists.User.txt” into the folder and switched the name to “CMakeLists.txt”. I then created a .cpp file with this command touch openfhe-test.cpp. I then copied the content of the “openfhe-development/src/pke/exampls/simple-integers.cpp” file into it.
I opened the “CMakeLists.txt” file via cat and added to it add_executable( fhe-demo openfhe-test.cpp). I then did mkdir build && cd build and finally I did cmake ... When I then tried to run make, all error appeared.
I created a folder for my project and copied the “CMakeLists.User.txt” into the folder and switched the name to “CMakeLists.txt”. I then created a .cpp file with this command touch openfhe-test.cpp. I then copied the content of the “openfhe-development/src/pke/exampls/simple-integers.cpp” file into it.
I opened the “CMakeLists.txt” file via cat and added to it add_executable( fhe-demo openfhe-test.cpp). I then did mkdir build && cd build and finally I did cmake ... When I then tried to run make, all error appeared.
I meant with regards to OpenFHE. I just want to establish that you’ve actually got OpenFHE installed in a way that your applications can find it.
So you didn’t specify an install location. Did you install OpenFHE with sudo make install? You ran
mkdir build && cd build
cmake ..
make # or make -j X to use more cores
make install
Well, that doesn’t really make sense to me then I think that the cmake .. defaults to installing the package in /usr space, which means you hsould have needed sudo make install, not make install. If you try sudo make install and try to build your application does it work?