Closed DreamingRaven closed 4 years ago
em, have you tried in python3.7? I got it, it's a problem
I will try it with python3.7 although I expect the result to be the same as this used to work with python3.8 before the ms-seal update to 3.4.5. I expect this may be an issue with ms-seal itself or some quirk we aren't aware of as im not too familiar with binding c++ to python so learning as I go.
em, have you tried in python3.7? I got it, it's a problem
How did you reproduce it? was it on an ubuntu system with more up to date packages or inside an arch docker container as above?
you can try to build with the cmake, so there is a ImportError, etc I remain the CMakeLists.txt in the src folder, change the path before use it. I'm dealing with it now if you have any idea, please tell me.
I will try this in a moment, once I have had lunch. I have no cause in mind as yet, but I will look into it too.
OK, Here is a solution.
Before you compile the SEAL lib, change the SEAL/native/src/CMakeLists.txt
line 101 Static_PIC
to Shared
. then you will get the SEAL/native/lib/libseal.so
then change the lib path in setup.py
or src/CMakeLists.txt
.
But do attention, the path is sensitive now.
ok will try it now and let you know if it works on my end too.
Hmm not sure I have done this right as im getting
ImportError: libseal.so.3.4: cannot open shared object file: No such file or directory
So I must not have installed it properly.
To confirm the changes I need to make are:
change this to Shared
from Static_PIC
which Is very specific i'm sure I haven't messed that up:
https://github.com/Huelse/SEAL-Python/blob/d8395a54d15a94ee25f6e33d78250aa5cf1a3c0b/SEAL/native/src/CMakeLists.txt#L101
becomes:
https://github.com/DreamingRaven/SEAL-Python/blob/3eb9654540bdf887376167c22ca8f92da52f7477/SEAL/native/src/CMakeLists.txt#L101
but then for the next one so that it finds seal from https://github.com/Huelse/SEAL-Python/blob/d8395a54d15a94ee25f6e33d78250aa5cf1a3c0b/setup.py#L15 to https://github.com/DreamingRaven/SEAL-Python/blob/3eb9654540bdf887376167c22ca8f92da52f7477/setup.py#L15 but after building everything this now does not find seal, instead giving me:
archer@azuran ~/g/seal-python (3.4.5)> sudo docker run --gpus all -it archer/py-seal-arch bash
[root@09e1c8d7edd2 /]# python
Python 3.8.2 (default, Feb 26 2020, 22:21:03)
[GCC 9.2.1 20200130] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import seal
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: libseal.so.3.4: cannot open shared object file: No such file or directory
Hmm thats interesting if I run the exact same source in the ubuntu docker it works fine again ... Hmm not sure what is going on with the differences here but I will look into it. It just seems so bizarre to be acting so differently given the exact same installation steps.
If I find out what is causing this problem between ubuntu and arch I will let you know. Thanks for all your work thus far.
add /usr/local/lib
or the SEAL/native/lib
to /etc/ld.so.conf
and refresh it sudo ldconfig
it's your interpreter does not find the dynamic link library caused.
add
/usr/local/lib
or theSEAL/native/lib
to/etc/ld.so.conf
and refresh itsudo ldconfig
it's your interpreter does not find the dynamic link library caused.
Ok trying that now
Yep that worked, ah yes of course! Archlinux puts its shared objects in /usr/lib wheras other distros store theirs in /usr/local/lib And I have confirmed the tests work fine. and you solved the undefined symbol error in the process. Thanks @Huelse
Hey Huelse, Sorry to take more of your time. I have found on a more up to date system (archlinux rather than ubuntu) through the recent update to 3.4.5:
That while compilation is successfull attempting to use the seal package by calling any one of the examples results in:
reproduce
I have a branch prepared with the issue with all of your latest commits and my dockerfiles to make reproducing easy:
https://github.com/DreamingRaven/SEAL-Python/tree/3.4.5
Build the archlinux docker, and seal-python with up-to-date packages:
Run the archlinux docker to encounter the error:
This does not occur and works if using older packages and build system from ubuntu:
Notes
This worked on both ubuntu and archlinux prior to updating to seal v3.4.5 (as can be verified in https://github.com/DreamingRaven/SEAL-Python/tree/dev). Im wondering if you have any input into what could be causing this recent undefined symbol?