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

    • Bug
    • Resolution: Fixed
    • P3: Somewhat important
    • 5.12.4
    • 5.12.2
    • PySide
    • CentOS 7.3.1611
    • Linux/X11
    • ff3a9f61edc479e5610f6d57c5ab789704ca81cb

    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

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

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes