homenc / HElib

HElib is an open-source software library that implements homomorphic encryption. It supports the BGV scheme with bootstrapping and the Approximate Number CKKS scheme. HElib also includes optimizations for efficient homomorphic evaluation, focusing on effective use of ciphertext packing techniques and on the Gentry-Halevi-Smart optimizations.
https://homenc.github.io/HElib
Other
3.14k stars 765 forks source link

How to install on a machine without root privileges. #158

Open radwasherif opened 7 years ago

radwasherif commented 7 years ago

I want to install HElib and its dependencies on a remote machine on which I do not have root privileges i.e. I cannot use "sudo" to install NTL system-wide. How can I do that, including any modifications to the makefile?

fionser commented 7 years ago

apppend he path of your NTL directory to the CFLAGS, for example, CFLAGS = -g -O2 -std=c++11 -fmax-errors=2 -Ipath_to_NTL_include, also append the path of your libntl.a to LDLIBS, such as LDLIBS = -L/usr/local/lib -Lpath_to_ntl_lib $(NTL) $(GMP) -lm

radwasherif commented 7 years ago

Now I am getting errors such as this:

fhe.a(NumbTh.o): In function `void std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_
M_construct<char*>(char*, char*, std::forward_iterator_tag)':
/usr/include/c++/5/bits/basic_string.tcc:223: undefined reference to `std::__cxx11::basic_string<char, std::char_trai
ts<char>, std::allocator<char> >::_M_create(unsigned long&, unsigned long)'
fhe.a(NumbTh.o): In function `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::operat
or=(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&&)':
/usr/include/c++/5/bits/basic_string.h:589: undefined reference to `std::__cxx11::basic_string<char, std::char_traits
<char>, std::allocator<char> >::swap(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&
)'
fhe.a(Ctxt.o): In function `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::replace(
unsigned long, unsigned long, char const*, unsigned long)':
/usr/include/c++/5/bits/basic_string.h:1583: undefined reference to `std::__cxx11::basic_string<char, std::char_trait
s<char>, std::allocator<char> >::_M_replace(unsigned long, unsigned long, char const*, unsigned long)'
fhe.a(Ctxt.o): In function `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::append(c
har const*)':
fionser commented 7 years ago

include <string> some where.