Project

General

Profile

Bug #6874

libboost-python3 appears to be built against Python 2.x and is underlinked?

Added by Michael Hart over 2 years ago. Updated over 2 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
-
Target version:
Start date:
02/16/2017
Due date:
% Done:

100%

Estimated time:
Affected versions:
Security IDs:

Description

ldd of /usr/lib/libboost_python3.so.1.62.0 outputs 236 lines of:
Error relocating /usr/lib/libboost_python3.so.1.62.0: PyNumber_InPlaceDivide: symbol not found
and similar errors.

LD_PRELOAD'ing libstdc++ reduces this to 139, trying to LD_PRELOAD libpython3 as well I'd expect to reduce the errors to 0, instead I'm left with:

/ # LD_PRELOAD=/usr/lib/libstdc++.so.6:/usr/lib/libpython3.so  ldd /usr/lib/libboost_python3.so.1.62.0 2>&1
        ldd (0x55620da01000)
        /usr/lib/libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x7fecf5d29000)
        /usr/lib/libpython3.so => /usr/lib/libpython3.so (0x7fecf5b27000)
        libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 (0x7fecf5915000)
        libc.musl-x86_64.so.1 => ldd (0x55620da01000)
        libpython3.5m.so.1.0 => /usr/lib/libpython3.5m.so.1.0 (0x7fecf54a7000)
Error relocating /usr/lib/libboost_python3.so.1.62.0: PyInt_FromLong: symbol not found
Error relocating /usr/lib/libboost_python3.so.1.62.0: Py_InitModule4_64: symbol not found
Error relocating /usr/lib/libboost_python3.so.1.62.0: PyString_AsString: symbol not found
Error relocating /usr/lib/libboost_python3.so.1.62.0: PyString_InternFromString: symbol not found
Error relocating /usr/lib/libboost_python3.so.1.62.0: PyFile_AsFile: symbol not found
Error relocating /usr/lib/libboost_python3.so.1.62.0: PyString_FromString: symbol not found
Error relocating /usr/lib/libboost_python3.so.1.62.0: PyInt_Type: symbol not found
Error relocating /usr/lib/libboost_python3.so.1.62.0: PyString_Type: symbol not found
Error relocating /usr/lib/libboost_python3.so.1.62.0: PyClass_Type: symbol not found
Error relocating /usr/lib/libboost_python3.so.1.62.0: PyUnicodeUCS4_FromEncodedObject: symbol not found
Error relocating /usr/lib/libboost_python3.so.1.62.0: PyString_Size: symbol not found
Error relocating /usr/lib/libboost_python3.so.1.62.0: PyFile_FromString: symbol not found
Error relocating /usr/lib/libboost_python3.so.1.62.0: PyUnicodeUCS4_AsWideChar: symbol not found
Error relocating /usr/lib/libboost_python3.so.1.62.0: PyInt_AsLong: symbol not found
Error relocating /usr/lib/libboost_python3.so.1.62.0: PyString_FromStringAndSize: symbol not found
Error relocating /usr/lib/libboost_python3.so.1.62.0: PyNumber_InPlaceDivide: symbol not found
Error relocating /usr/lib/libboost_python3.so.1.62.0: PyNumber_Divide: symbol not found
Error relocating /usr/lib/libboost_python3.so.1.62.0: PyString_FromFormat: symbol not found

These look like Python2.x details (PyInt_AsLong for example, since int/long were unified in Python3)

Replacing libpython3 with libpython2.7.so.1.0 does reduce the errors to zero however:

/ # LD_PRELOAD=/usr/lib/libstdc++.so.6:/usr/lib/libpython2.7.so.1.0   ldd /usr/lib/libboost_python3.so.1.62.0 2>&1
        ldd (0x5556aa5b5000)
        /usr/lib/libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x7fe5d8b11000)
        /usr/lib/libpython2.7.so.1.0 => /usr/lib/libpython2.7.so.1.0 (0x7fe5d876e000)
        libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 (0x7fe5d855c000)
        libc.musl-x86_64.so.1 => ldd (0x5556aa5b5000)


Related issues

Has duplicate Alpine Linux - Bug #6615: symbol not found in boost librariesNew01/03/2017

Associated revisions

Revision 93d06d45 (diff)
Added by Natanael Copa over 2 years ago

main/boost: fix boost_python3

ref #6874

upstream: https://github.com/boostorg/build/issues/163

Revision 3e6cf4c9 (diff)
Added by Natanael Copa over 2 years ago

main/boost: fix boost_python3

fixes #6874

upstream: https://github.com/boostorg/build/issues/163

History

#1 Updated by Michael Hart over 2 years ago

To demonstrate the issue from python you'll need to

RUN apk add --update --no-cache git libstdc++ build-base python3-dev graphicsmagick graphicsmagick-dev boost-python3 boost-dev 
pip3 install pgmagick

then from a python prompt:

/ # python3
Python 3.5.2 (default, Dec 22 2016, 10:15:38) 
[GCC 6.2.1 20160822] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import pgmagick
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python3.5/site-packages/pgmagick/__init__.py", line 1, in <module>
    from pgmagick import _pgmagick
ImportError: Error relocating /usr/lib/python3.5/site-packages/pgmagick/_pgmagick.cpython-35m-x86_64-linux-gnu.so: _ZN5boost6python6detail11init_moduleER11PyModuleDefPFvvE: symbol not found

#2 Updated by Natanael Copa over 2 years ago

  • Status changed from New to Resolved
  • % Done changed from 0 to 100

#3 Updated by Natanael Copa over 2 years ago

  • Status changed from Resolved to Closed

#4 Updated by Natanael Copa over 2 years ago

  • Has duplicate Bug #6615: symbol not found in boost libraries added

Also available in: Atom PDF