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

Installation error #44

Open
mahmoudsajjadi opened this issue Aug 23, 2022 · 5 comments
Open

Installation error #44

mahmoudsajjadi opened this issue Aug 23, 2022 · 5 comments

Comments

@mahmoudsajjadi
Copy link

mahmoudsajjadi commented Aug 23, 2022

Hi,

I am trying to install the FedTree and I face following error after running make - j:

[ 99%] Linking CXX shared library ../../lib/libft_grpc_proto.so
[ 99%] Built target ft_grpc_proto
[ 99%] Linking CXX shared library ../../lib/libFedTree.so
/usr/bin/ld: /usr/local/lib/libntl.a(ZZ.o): relocation R_X86_64_TPOFF32 against _ZN3NTLL8iodigitsE' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: /usr/local/lib/libntl.a(fileio.o): relocation R_X86_64_TPOFF32 against _ZZN3NTL8UniqueIDB5cxx11EvE37_ntl_hidden_variable_tls_local_ptr_ID' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: /usr/local/lib/libntl.a(lip.o): relocation R_X86_64_TPOFF32 against _ZZ10_ntl_gswapPP17_ntl_gbigint_bodyS1_E36_ntl_hidden_variable_tls_local_ptr_t' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: /usr/local/lib/libntl.a(tools.o): relocation R_X86_64_TPOFF32 against symbol _ZN3NTL16ErrorMsgCallbackE' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: /usr/local/lib/libntl.a(thread.o): relocation R_X86_64_TPOFF32 against _ZZN3NTL15CurrentThreadIDB5cxx11EvE37_ntl_hidden_variable_tls_local_ptr_ID' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: /usr/local/lib/libntl.a(BasicThreadPool.o): relocation R_X86_64_TPOFF32 against _ZZN3NTLL49_ntl_hidden_function_tls_access_NTLThreadPool_stgEvE52_ntl_hidden_variable_tls_local_ptr_NTLThreadPool_stg' can not be used when making a shared object; recompile with -fPIC
collect2: error: ld returned 1 exit status
make[2]: *** [src/FedTree/CMakeFiles/FedTree.dir/build.make:510: lib/libFedTree.so] Error 1
make[1]: *** [CMakeFiles/Makefile2:5489: src/FedTree/CMakeFiles/FedTree.dir/all] Error 2
make: *** [Makefile:130: all] Error 2

I will appreciate it if you could help me to solve the problem

@QinbinLi
Copy link
Member

Hi @mahmoudsajjadi ,

Did you set SHARED=on when installing ntl? See below for an example.

wget https://libntl.org/ntl-11.4.4.tar.gz
tar -xvf ntl-11.4.4.tar.gz
cd ntl-11.4.4/src
./configure SHARED=on
make
make check
sudo make install

@mahmoudsajjadi
Copy link
Author

Hi @QinbinLi ,

Thank you and that works.

Another question is that is python version only works with `GLIBC_2.32'? since I saw the following error after trying to run python examples.

Traceback (most recent call last):
File "/c/python/fedtree-2/FedTree/python/examples/regressor_example.py", line 1, in
from fedtree import FLRegressor
File "/c/python/fedtree-2/FedTree/python/examples/fedtree.py", line 36, in
fedtree = CDLL(lib_path)
File "/home/mahmoud/anaconda3/lib/python3.9/ctypes/init.py", line 382, in init
self._handle = _dlopen(self._name, mode)
OSError: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.32' not found (required by /c/python/fedtree-2/FedTree/python/examples/../../build/lib/libFedTree.so)

@QinbinLi
Copy link
Member

Hi @mahmoudsajjadi ,

Other versions should also work. I successfully installed and tested the python version on a machine with GLIBC 2.31. How did you install FedTree and python version?

@mahmoudsajjadi
Copy link
Author

mahmoudsajjadi commented Aug 30, 2022

Hi @QinbinLi

Firstly I installed FedTree on Ubuntu 20.04.3 LTS (ldd (Ubuntu GLIBC 2.31-0ubuntu9.9) 2.31) based on the tutorial. After complete installation, then when I am trying to install it on Python 3.9.7 it shows the following error:

Traceback (most recent call last):
File "", line 1, in
File "/home/mahmoud/anaconda3/lib/python3.9/site-packages/fedtree-1.0.4-py3.9.egg/fedtree/init.py", line 2, in
from .fedtree import *
File "/home/mahmoud/anaconda3/lib/python3.9/site-packages/fedtree-1.0.4-py3.9.egg/fedtree/fedtree.py", line 43, in
fedtree = CDLL(lib_path)
File "/home/mahmoud/anaconda3/lib/python3.9/ctypes/init.py", line 382, in init
self._handle = _dlopen(self._name, mode)
OSError: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.32' not found (required by /mnt/c/python/fedtree-2/FedTree/build/lib/libFedTree.so)

On the other hand, I tried to install FedTree on Ubuntu 22.04, I got the following error after cmake command in the installation:

-- Found OpenMP_CXX: -fopenmp (found version "4.5")
-- Found OpenMP: TRUE (found version "4.5")
Complie without CUDA
-- Found OpenMP_CXX: -fopenmp (found version "4.5")
-- Found OpenMP: TRUE (found version "4.5") found components: CXX
-- Populating grpc
-- Configuring done
-- Generating done
-- Build files have been written to: /home/mahmoud/python/fedtree-2/FedTree/build/_deps/grpc-subbuild
[ 11%] Performing update step for 'grpc-populate'
[ 22%] No patch step for 'grpc-populate'
[ 33%] No configure step for 'grpc-populate'
[ 44%] No build step for 'grpc-populate'
[ 55%] No install step for 'grpc-populate'
[ 66%] No test step for 'grpc-populate'
[ 77%] Completed 'grpc-populate'
[100%] Built target grpc-populate

-- 3.14.0.0
CMake Deprecation Warning at build/_deps/grpc-src/third_party/zlib/CMakeLists.txt:1 (cmake_minimum_required):
Compatibility with CMake < 2.8.12 will be removed from a future version of
CMake.

Update the VERSION argument value or use a ... suffix to tell
CMake that the project does not need compatibility with older versions.

-- Configuring done
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
GMPXX_LIB
linked by target "FedTree_DIST" in directory /home/mahmoud/python/fedtree-2/FedTree/src/FedTree
linked by target "FedTree" in directory /home/mahmoud/python/fedtree-2/FedTree/src/FedTree

-- Generating done
CMake Generate step failed. Build files cannot be regenerated correctly.

@Tushar-Jaryal
Copy link

Hi,

I am trying to install the FedTree and I face following error after running make - j:

[ 94%] Linking CXX shared library ../../lib/libFedTree_DIST_SCIKIT.so
/usr/bin/ld: ../../lib/libft_grpc_proto.a(fedtree.grpc.pb.cc.o): warning: relocation against _ZNSt17_Function_handlerIFvbEZN4grpc8internal24ClientCallbackWriterImplIN7fedtree6GHPairEE10WritesDoneEvEUlbE_E10_M_managerERSt9_Any_dataRKS9_St18_Manager_operation' in read-only section .text._ZN4grpc8internal24ClientCallbackWriterImplIN7fedtree6GHPairEE10WritesDoneEv[_ZN4grpc8internal24ClientCallbackWriterImplIN7fedtree6GHPairEE10WritesDoneEv]'
/usr/bin/ld: ../../lib/libft_grpc_proto.a(fedtree.grpc.pb.cc.o): relocation R_X86_64_PC32 against symbol `_ZN4grpc24g_core_codegen_interfaceE' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: bad value
collect2: error: ld returned 1 exit status
make[2]: *** [src/FedTree/CMakeFiles/FedTree_DIST_SCIKIT.dir/build.make:656: lib/libFedTree_DIST_SCIKIT.so] Error 1
make[1]: *** [CMakeFiles/Makefile2:260: src/FedTree/CMakeFiles/FedTree_DIST_SCIKIT.dir/all] Error 2
make: *** [Makefile:91: all] Error 2

I have installed NTL using ./configure SHARED=on

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

3 participants