Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HEXL support: Conda Installation Failure at make #105

Open
jkav77 opened this issue Feb 8, 2024 · 1 comment
Open

HEXL support: Conda Installation Failure at make #105

jkav77 opened this issue Feb 8, 2024 · 1 comment

Comments

@jkav77
Copy link

jkav77 commented Feb 8, 2024

Hello,

I'm getting the error below when trying to build the python binding. I have OpenFHE installed with HEXL enabled. That works with the c++ examples, but I can't build the python binding. Based on the error, I'm not sure where to start. Any insights?

(openfhe) dangerginger@homecompute ~/code/openfhe-python/build$ make                                                                                    ✹main 
Consolidate compiler generated dependencies of target openfhe
[ 16%] Building CXX object CMakeFiles/openfhe.dir/src/lib/bindings.cpp.o
In file included from /home/dangerginger/code/openfhe-python/src/lib/bindings.cpp:1:
/home/dangerginger/code/miniconda3/envs/openfhe/include/pybind11/pybind11.h: In instantiation of ‘void pybind11::cpp_function::initialize(Func&&, Return (*)(Args ...), const Extra& ...) [with Func = pybind11::cpp_function::cpp_function<void, lbcrypto::CryptoContextImpl<lbcrypto::DCRTPolyImpl<bigintdyn::mubintvec<bigintdyn::ubint<long unsigned int> > > >, std::vector<unsigned int, std::allocator<unsigned int> >, std::vector<unsigned int, std::allocator<unsigned int> >, unsigned int, unsigned int, pybind11::name, pybind11::is_method, pybind11::sibling, const char*, pybind11::arg_v, pybind11::arg_v, pybind11::arg_v, pybind11::arg_v, pybind11::arg_v>(void (lbcrypto::CryptoContextImpl<lbcrypto::DCRTPolyImpl<bigintdyn::mubintvec<bigintdyn::ubint<long unsigned int> > > >::*)(std::vector<unsigned int>, std::vector<unsigned int>, unsigned int, unsigned int), const pybind11::name&, const pybind11::is_method&, const pybind11::sibling&, const char* const&, const pybind11::arg_v&, const pybind11::arg_v&, const pybind11::arg_v&, const pybind11::arg_v&, const pybind11::arg_v&)::<lambda(lbcrypto::CryptoContextImpl<lbcrypto::DCRTPolyImpl<bigintdyn::mubintvec<bigintdyn::ubint<long unsigned int> > > >*, std::vector<unsigned int>, std::vector<unsigned int>, unsigned int, unsigned int)>; Return = void; Args = {lbcrypto::CryptoContextImpl<lbcrypto::DCRTPolyImpl<bigintdyn::mubintvec<bigintdyn::ubint<long unsigned int> > > >*, std::vector<unsigned int, std::allocator<unsigned int> >, std::vector<unsigned int, std::allocator<unsigned int> >, unsigned int, unsigned int}; Extra = {pybind11::name, pybind11::is_method, pybind11::sibling, const char*, pybind11::arg_v, pybind11::arg_v, pybind11::arg_v, pybind11::arg_v, pybind11::arg_v}]’:
/home/dangerginger/code/miniconda3/envs/openfhe/include/pybind11/pybind11.h:110:19:   required from ‘pybind11::cpp_function::cpp_function(Return (Class::*)(Arg ...), const Extra& ...) [with Return = void; Class = lbcrypto::CryptoContextImpl<lbcrypto::DCRTPolyImpl<bigintdyn::mubintvec<bigintdyn::ubint<long unsigned int> > > >; Arg = {std::vector<unsigned int, std::allocator<unsigned int> >, std::vector<unsigned int, std::allocator<unsigned int> >, unsigned int, unsigned int}; Extra = {pybind11::name, pybind11::is_method, pybind11::sibling, const char*, pybind11::arg_v, pybind11::arg_v, pybind11::arg_v, pybind11::arg_v, pybind11::arg_v}]’
/home/dangerginger/code/miniconda3/envs/openfhe/include/pybind11/pybind11.h:1575:22:   required from ‘pybind11::class_<type_, options>& pybind11::class_<type_, options>::def(const char*, Func&&, const Extra& ...) [with Func = void (lbcrypto::CryptoContextImpl<lbcrypto::DCRTPolyImpl<bigintdyn::mubintvec<bigintdyn::ubint<long unsigned int> > > >::*)(std::vector<unsigned int>, std::vector<unsigned int>, unsigned int, unsigned int); Extra = {const char*, pybind11::arg_v, pybind11::arg_v, pybind11::arg_v, pybind11::arg_v, pybind11::arg_v}; type_ = lbcrypto::CryptoContextImpl<lbcrypto::DCRTPolyImpl<bigintdyn::mubintvec<bigintdyn::ubint<long unsigned int> > > >; options = {std::shared_ptr<lbcrypto::CryptoContextImpl<lbcrypto::DCRTPolyImpl<bigintdyn::mubintvec<bigintdyn::ubint<long unsigned int> > > > >}]’
/home/dangerginger/code/openfhe-python/src/lib/bindings.cpp:582:13:   required from here
/home/dangerginger/code/miniconda3/envs/openfhe/include/pybind11/pybind11.h:219:40: error: static assertion failed: The number of argument annotations does not match the number of function arguments
  219 |             expected_num_args<Extra...>(
      |             ~~~~~~~~~~~~~~~~~~~~~~~~~~~^
  220 |                 sizeof...(Args), cast_in::args_pos >= 0, cast_in::has_kwargs),
      |                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/dangerginger/code/miniconda3/envs/openfhe/include/pybind11/pybind11.h:219:40: note: ‘pybind11::detail::expected_num_args<pybind11::name, pybind11::is_method, pybind11::sibling, const char*, pybind11::arg_v, pybind11::arg_v, pybind11::arg_v, pybind11::arg_v, pybind11::arg_v>(5, (((int)pybind11::detail::argument_loader<lbcrypto::CryptoContextImpl<lbcrypto::DCRTPolyImpl<bigintdyn::mubintvec<bigintdyn::ubint<long unsigned int> > > >*, std::vector<unsigned int, std::allocator<unsigned int> >, std::vector<unsigned int, std::allocator<unsigned int> >, unsigned int, unsigned int>::args_pos) >= 0), ((int)((bool)pybind11::detail::argument_loader<lbcrypto::CryptoContextImpl<lbcrypto::DCRTPolyImpl<bigintdyn::mubintvec<bigintdyn::ubint<long unsigned int> > > >*, std::vector<unsigned int, std::allocator<unsigned int> >, std::vector<unsigned int, std::allocator<unsigned int> >, unsigned int, unsigned int>::has_kwargs)))’ evaluates to false
cc1plus: note: unrecognized command-line option ‘-Wno-unknown-warning-option’ may have been intended to silence earlier diagnostics
cc1plus: note: unrecognized command-line option ‘-Wno-unknown-warning’ may have been intended to silence earlier diagnostics
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
@jkav77
Copy link
Author

jkav77 commented Feb 8, 2024

I was able to build it for OpenFHE without HEXL enabled although I would prefer to use HEXL. I made only a small change to CMakeLists.txt to update the include directories since my installation of NTL, GMP, and OpenFHE was to $HOME/local.

@yspolyakov yspolyakov added this to the Future Releases milestone Mar 12, 2024
@yspolyakov yspolyakov changed the title Conda Installation Failure at make HEXL support: Conda Installation Failure at make Mar 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants