fionser / PrivateDecisionTree

Privacy-preserving Decision Tree Evaluation
5 stars 4 forks source link

make fails #1

Open boev opened 5 years ago

boev commented 5 years ago

Hello, I am interested in testing the project on my machine, but following build instructions led to the following error (below). I used g++ 8.1.0, boost 1.69, NTL and GMP also installed. The problem seems to be with the linked HElib library (very old version). I am also able to compile and use the current version of HElib without any problems.

fionser/PrivateDecisionTree/build$ make [ 2%] Building CXX object src/CMakeFiles/ppdt.dir/util.cpp.o [ 4%] Building CXX object src/CMakeFiles/ppdt.dir/net_io.cpp.o [ 6%] Building CXX object src/CMakeFiles/ppdt.dir/PrivateGreaterThan.cpp.o [ 9%] Building CXX object src/CMakeFiles/ppdt.dir/PPDTServer.cpp.o In file included from fionser/PrivateDecisionTree/src/PPDTServer.cpp:8: fionser/PrivateDecisionTree/HElib/include/HElib/EncryptedArray.h:317:19: error: ‘FHE_DEFINE_LOWER_DISPATCH’ has not been declared NTL_FOREACH_ARG(FHE_DEFINE_LOWER_DISPATCH) ^~~~~~~~~ fionser/PrivateDecisionTree/HElib/include/HElib/EncryptedArray.h:319:3: error: ISO C++ forbids declaration of ‘NTL_FOREACH_ARG’ with no type [-fpermissive] const RX& getG() const { return mappingData.getG(); } ^~~~~ fionser/PrivateDecisionTree/HElib/include/HElib/EncryptedArray.h:319:3: error: expected ‘;’ at end of member declaration const RX& getG() const { return mappingData.getG(); } ^~~~~ ; fionser/PrivateDecisionTree/HElib/include/HElib/EncryptedArray.h:634:17: error: ‘FHE_DEFINE_UPPER_DISPATCH’ has not been declared NTL_FOREACH_ARG(FHE_DEFINE_UPPER_DISPATCH) ^~~~~~~~~ fionser/PrivateDecisionTree/HElib/include/HElib/EncryptedArray.h:637:3: error: ISO C++ forbids declaration of ‘NTL_FOREACH_ARG’ with no type [-fpermissive] const FHEcontext& getContext() const { return rep->getContext(); } ^~~~~ fionser/PrivateDecisionTree/HElib/include/HElib/EncryptedArray.h:637:3: error: expected ‘;’ at end of member declaration const FHEcontext& getContext() const { return rep->getContext(); } ^~~~~ ; fionser/PrivateDecisionTree/HElib/include/HElib/EncryptedArray.h: In member function ‘FHEcontext& EncryptedArray::getContext() const’: fionser/PrivateDecisionTree/HElib/include/HElib/EncryptedArray.h:637:64: error: binding reference of type ‘FHEcontext&’ to ‘const FHEcontext’ discards qualifiers const FHEcontext& getContext() const { return rep->getContext(); }


fionser/PrivateDecisionTree/HElib/include/HElib/EncryptedArray.h: In constructor ‘NewPlaintextArray::NewPlaintextArray(const EncryptedArray&)’:
fionser/PrivateDecisionTree/HElib/include/HElib/EncryptedArray.h:778:10: error: ‘const class EncryptedArray’ has no member named ‘dispatch’
     { ea.dispatch<ConstructorImpl>(Fwd(*this)); }
          ^~~~~~~~
fionser/PrivateDecisionTree/HElib/include/HElib/EncryptedArray.h:778:34: error: missing template arguments before ‘>’ token
     { ea.dispatch<ConstructorImpl>(Fwd(*this)); }
                                  ^
src/CMakeFiles/ppdt.dir/build.make:101: recipe for target 'src/CMakeFiles/ppdt.dir/PPDTServer.cpp.o' failed
make[2]: *** [src/CMakeFiles/ppdt.dir/PPDTServer.cpp.o] Error 1
CMakeFiles/Makefile2:239: recipe for target 'src/CMakeFiles/ppdt.dir/all' failed
make[1]: *** [src/CMakeFiles/ppdt.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2
fionser commented 5 years ago

It might be the compatible issue between the old ver of HElib and new ver of NTL. Try the following:

  1. Remove the submodule HElib and use your own HElib instead.
tdoublep commented 2 years ago

I had the same error but was able to resolve it by using NTL version 10.5.0 (together with the pinned version of HElib).