libboost_python-py27.so.1.58.0: undefined symbol: PyClass_Type
Scusemua opened this issue · 1 comments
Hello:
I have encountered some troubles setting up Pocket. It seems that libpocket.so is not being built correctly based on the errors I am receiving, though I could be incorrect on that.
After running build.sh in the Client directory, I copy pocket.py, libpocket.so, and libcppcrail.so to the Controller directory and attempt to execute the controller via python3 controller.py. This produces the following error:
Traceback (most recent call last):
File "controller.py", line 8, in <module>
import pocket
File "/home/ubuntu/pocket/controller/pocket.py", line 11, in <module>
import libpocket
ImportError: /usr/lib/x86_64-linux-gnu/libboost_python-py27.so.1.58.0: undefined symbol: PyClass_Type
Similarly, if I attempt to run the Lambda function that gets set-up in the Microbenchmark directory, I will get an error about Lambda being unable to find the file or directory "libboost_python-py27.so.1.58.0":
Unable to import module 'latency': libboost_python-py27.so.1.58.0: cannot open shared object file: No such file or directory
If I then include "libboost_python-py27.so.1.58.0" in the Lambda deployment package, I get the following error:
START RequestId: a898a6e6-89bb-4fe9-afd6-794ea8842ba1 Version: $LATEST
Unable to import module 'latency': libboost_python-py27.so.1.58.0: undefined symbol: PyClass_Type
END RequestId: a898a6e6-89bb-4fe9-afd6-794ea8842ba1
REPORT RequestId: a898a6e6-89bb-4fe9-afd6-794ea8842ba1 Duration: 0.64 ms Billed Duration: 100 ms Memory Size: 3008 MB Max Memory Used: 57 MB Init Duration: 19.35 ms
I am running this on a Ubuntu 16.04.6 LTS EC2 VM. I have Python 3.5.6 and Python 2.7.12 as well as Python 3.6.8 installed. The version of Boost I have installed is "1.58.0.1ubuntu1." I can provide any additional details if necessary.
We found that there were system links existing for
libboost_python.a -> libboost_python-py27.a
libboost_python.so -> libboost_python-py27.so
So we removed these and recreated them for libboost_python-py35.a and libboost_python-py35.so, respectively. This resolved the problem.