openfheorg / openfhe-python

Official Python wrapper for OpenFHE. Current release is v0.8.8 (released on June 25, 2024).
https://openfheorg.github.io/openfhe-python/html/index.html
BSD 2-Clause "Simplified" License
60 stars 18 forks source link

'openfhe.h' file not found by building make #136

Open AndrUser65 opened 1 month ago

AndrUser65 commented 1 month ago

Hallo i use wsl Ubuntu 22.04 i build openfhe-development and want to build make python wrapper my structure is: /home/andre/openfhe-development /home/andre/openfhe-python

i do these steps by installing: cmake .. -Dpybind11_DIR=/home/andre/.local/lib/python3.10/site-packages/pybind11/share/cmake/pybind11 mkdir build cd build cmake .. -DOpenFHE_DIR=/home/andre/openfhe-development make

but i get Error:

/home/evgen/openfhe-python/src/lib/bindings.cpp:10:10: fatal error: 'openfhe.h' file not found

include "openfhe.h"

     ^~~~~~~~~~~

1 error generated. make[2]: [CMakeFiles/openfhe.dir/build.make:76: CMakeFiles/openfhe.dir/src/lib/bindings.cpp.o] Error 1 make[1]: [CMakeFiles/Makefile2:83: CMakeFiles/openfhe.dir/all] Error 2 make: *** [Makefile:136: all] Error 2

What can i do?

Rinoex commented 1 month ago

Hello, you can try add this line set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -I/path/to/your/openfhe/include") at the top line to your openfhe-python CMakeFiles.txt

AndrUser65 commented 1 month ago

@Rinoex hallo, i solved it other, but i am not sure if it is right in open fhe development i done: sudo make install in python wrapper i write cmake .. -DOpenFHE_DIR=/usr/local/lib/OpenFHE

it looks like there are no errors i set export PYTHONPATH=(/home/evgen/openfhe-development/build/lib):$PYTHONPATH and export LD_LIBRARY_PATH=$PATH:/home/evgen/openfhe-development/build/lib

if i start ./simple-integers.py (in example/pke)

i get this: ./simple-integers.py: line 2: from: command not found ./simple-integers.py: line 7: syntax error near unexpected token (' ./simple-integers.py: line 7:parameters = CCParamsBFVRNS()'

arcturusannamalai commented 1 month ago

@AndrUser65 - did you install the openfhe-development repo after building it ? Without that trying to build Python binding is not standard practice IMO

Sameeksha0709 commented 1 month ago

Hi I am also getting the same issue I have installed open fhe development repo and the examples of that is also working but in Python one I am getting the same issue. If you find any solution please let me know

AndrUser65 commented 4 weeks ago

@arcturusannamalai i solve this problem. it can be closed

AndrUser65 commented 4 weeks ago

@Sameeksha0709 did you build fhe development? you can use docker. it is more easier

Sameeksha0709 commented 3 weeks ago

HI I built the open-fhe development and it's working but in open-fhe python i am getting same error. I am working on pi