Uploaded image for project: 'Qt for Python'
  1. Qt for Python
  2. PYSIDE-991

Python shared lib mismatch building pyside with CentOS/Redhat scl python27

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Reported
    • Priority: P3: Somewhat important
    • Resolution: Unresolved
    • Affects Version/s: 5.12.2
    • Fix Version/s: None
    • Component/s: PySide
    • Labels:
      None
    • Environment:
      CentOS 7.3.1611
    • Platform/s:
      Linux/X11

      Description

      When building PySide2 using python27 that is enabled with scl enable python27 bash , Python crashes trying to import the io and subsequent _io modules with the following error:

      cd /home/S/workspace/pyside_5.12.2/src/pyside2_build/py2.7-qt5.12.2-64bit-release/pyside2/PySide2/QtCore && /usr/bin/cmake3 -E env LD_LIBRARY_PATH=/home/S/workspace/pyside_5.12.2/src/pyside2_build/py2.7-qt5.12.2-64bit-release/pyside2/libpyside:/home/S/workspace/pyside_5.12.2/src/pyside2_install/py2.7-qt5.12.2-64bit-release/lib /opt/rh/python27/root/usr/bin/python /home/S/workspace/pyside_5.12.2/src/sources/pyside2/PySide2/QtCore/../support/generate_pyi.py run --skip --sys-path /home/S/workspace/pyside_5.12.2/src/pyside2_build/py2.7-qt5.12.2-64bit-release/pyside2 /home/S/workspace/pyside_5.12.2/src/pyside2_install/py2.7-qt5.12.2-64bit-release/lib64/python2.7/site-packages/shiboken2
      Traceback (most recent call last):
      {{ File "/home/S/workspace/pyside_5.12.2/src/sources/pyside2/PySide2/QtCore/../support/generate_pyi.py", line 51, in <module>}}
      {{ import io}}
      {{ File "/opt/rh/python27/root/usr/lib64/python2.7/io.py", line 51, in <module>}}
      {{ import _io}}
      ImportError: /opt/rh/python27/root/usr/lib64/python2.7/lib-dynload/_io.so: undefined symbol: _PyErr_ReplaceException
      PySide2/QtCore/CMakeFiles/QtCore_pyi.dir/build.make:57: recipe for target 'PySide2/QtCore/CMakeFiles/QtCore_pyi' failed
      make[2]: *** [PySide2/QtCore/CMakeFiles/QtCore_pyi] Error 1

       

      This is caused because the cmake3 invocation clears and sets LD_LIBRARY_PATH. One of the things that scl enable python27 bash does to add the selected program for use is to add the library paths to these tools to LD_LIBRARY_PATH. cmake3 clearing this means that a different set of python libraries (the system ones) will be loaded instead, which results in a mismatch between the python executable and it's shared libraries.

        Attachments

          Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            Activity

              People

              • Assignee:
                crmaurei Cristian Maureira-Fredes
                Reporter:
                kkyzivat Keith Kyzivat
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:

                  Gerrit Reviews

                  There are no open Gerrit changes