I built and installed the openfhe library by executing this script on Mac M2. Then in my project, I use it like this:
add_library(TFHECmp “SortingHatCmp.cpp”)
target_link_directories(TFHECmp PUBLIC ${OpenFHE_LIBDIR})
target_link_libraries(TFHECmp PUBLIC ${OpenFHE_LIBRARIES})
target_include_directories(TFHECmp PUBLIC ${OpenFHE_INCLUDE})
It reports a bug:
– OpenFHE found!
– OpenFHE include dir: /Documents/code/TreeInference/build/include/openfhe
– OpenFHE lib: OPENFHEcore;OPENFHEpke;OPENFHEbinfhe;-Xpreprocessor;-fopenmp;-lomp;-Wno-unused-command-line-argument
– Configuring done (0.0s)
– Generating done (0.0s)
– Build files have been written to: /Documents/code/TreeInference/build
[ 50%] Building CXX object src/CMakeFiles/TFHECmp.dir/SortingHatCmp.cpp.o
In file included from /Documents/code/TreeInference/src/SortingHatCmp.cpp:1:
In file included from /Documents/code/TreeInference/src/SortingHatCmp.h:4:
In file included from /Documents/code/TreeInference/build/include/openfhe/binfhe/binfhecontext.h:39:
In file included from /Documents/code/TreeInference/build/include/openfhe/binfhe/binfhe-base-scheme.h:35:
/Documents/code/TreeInference/build/include/openfhe/binfhe/binfhe-base-params.h:35:10: fatal error: ‘lattice/lat-hal.h’ file not found
35 | #include “lattice/lat-hal.h”
| ^~~~~~~~~~~~~~~~~~~
1 error generated.
make[2]: *** [src/CMakeFiles/TFHECmp.dir/SortingHatCmp.cpp.o] Error 1
make[1]: *** [src/CMakeFiles/TFHECmp.dir/all] Error 2
How can I fix it? Thanks