minionn
minionn copied to clipboard
//usr/local/lib/libseal.a: error adding symbols: Bad value
Hi, After compiling and installing everything I tried to run the test.py as you say. After some compilation (and with some warnings in the middle regarding -Wsign-compare and -Wunused-variable) I received the following error:
/usr/bin/x86_64-linux-gnu-ld: //usr/local/lib/libseal.a(bigpolyarray.cpp.o): relocation R_X86_64_32 against `__pthread_key_create' can not be used when making a shared object; recompile with -fPIC //usr/local/lib/libseal.a: error adding symbols: Bad value collect2: error: ld returned 1 exit status error: command 'x86_64-linux-gnu-g++' failed with exit status 1
I downloaded SEAL and installed it with PIC. I wander if this issue has to do with PIC, since the computer is telling me to "recompile with -fPIC".
Btw, in the README file, when you say: "and place its SEAL subdirectory in libs (so that libs/SEAL contains the seal subdirectory)", do you mean that we should create a new folder outside lib called libs? Or this is just a typo and you mean actually lib/SEAL? I assumed the last option and I placed SEAL subdirectory inside lib. If not, could this be related with the error above?
Thanks!
Hi, this is a week old and maybe you fixed it already. If you did, then please tell here what fixed your problem.
This was a difficult error to debug also for me, especially since I can not simply point at the SEAL git repository and provide a patch to recompile with PIC. But I can say that all errors that I encountered with this warning were indeed due to some compilations that were done without PIC. So maybe make sure that you add the PIC flag and recompile on a clean build. If that does not help, maybe give me your gcc version and anything else that might be different from my machine and I can see if I can rebuild that error on my machine.
The mention of the libs subfolder was a typo, I mean the lib subdirectory that also contains the ABY folder and minionn.cpp files :-)
Hi,
Sorry about the basic question, but where should I add the -fPIC flag to recompile on a clean build?
No problem! Check the Readme where it explains how to set up SEAL. You have to add the following line to the CMakeLists.txt of SEAL before installing SEAL: set(CMAKE_POSITION_INDEPENDENT_CODE ON) I just added it somewhere in the beginning and it worked fine for me afterwards. Just follow the instructions that I gave in the Readme->SEAL section :-)