[PySide] pypi package doesn't build on Mageia 4 due to position dependent code

Jonas Thiem jonasthiem at googlemail.com
Thu Mar 27 14:37:34 CET 2014


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi everyone,

I wanted to use PySide with Python 3, but sadly Mageia 4 doesn't ship
PySide packages for Python 3 (just 2.x). Therefore I tried installing
it with python3-pip. Unfortunately, it doesn't work:


Excerpt from the terminal output (full output is attached):

...

[  4%] Building CXX object
ApiExtractor/CMakeFiles/apiextractor.dir/apiextractor.cpp.o

In file included from /usr/lib64/qt5/include/QtCore/qchar.h:45:0,

                 from /usr/lib64/qt5/include/QtCore/qhash.h:45,

                 from /usr/lib64/qt5/include/QtCore/QHash:1,

                 from
/tmp/pip_build_root/PySide/sources/shiboken/ApiExtractor/typesystem.h:27,

                 from
/tmp/pip_build_root/PySide/sources/shiboken/ApiExtractor/abstractmetalang.h:27,

                 from
/tmp/pip_build_root/PySide/sources/shiboken/ApiExtractor/apiextractor.h:28,

                 from
/tmp/pip_build_root/PySide/sources/shiboken/ApiExtractor/apiextractor.cpp:24:

/usr/lib64/qt5/include/QtCore/qglobal.h:996:4: error: #error "You must
build your code with position independent code if Qt was built with
- -reduce-relocations. " "Compile your code with -fPIC or -fPIE."

 #  error "You must build your code with position independent code if
Qt was built with -reduce-relocations. "\

    ^

/tmp/pip_build_root/PySide/sources/shiboken/ApiExtractor/apiextractor.cpp:
In function ‘bool preprocess(const QString&, QFile&, const QStringList&)’:

/tmp/pip_build_root/PySide/sources/shiboken/ApiExtractor/apiextractor.cpp:273:38:
error: ‘convertSeparators’ is not a member of ‘QDir’

...


So it appears all that is missing is a simple -fPIC compile option. Is
there a chance this can fixed in the near future? I'm happy to retest
stuff or modify files if given suitable instructions for further testing.

Regards,
Jonas Thiem
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iQIcBAEBAgAGBQJTNCmXAAoJEBIDTbbx8YkerUoP/jVlm+ATNAMCLlJnYUAU7jbE
gjnugoHT5SGIQRfwH2KvfXpK6siYqFcj9pkJkBzyh1leTSwnc/Vw9nCqrXwGbPcj
Rf1Hs1VHeXRKwqE5wBFVMQZmGBseEjcvt9atakvgn/1buoI4rYs8vJy2IDOoDnQ8
aVJwlGUsbRd7QKUbaKg2jhM4Z04Z3KTS/OOsyhfYvdoWrg8vCe+uaX4LfxEU1v7i
hMkdL+fUyWuQifKpBcC3ChxG7Jrns1a6+4aNasKPjNeMxI50ml/Kk4S765xDOZO4
ddJpklZKSXjMf6gET1agTEe1h4SmUcQ+Mjl/6IhMEI4cmqJOJ00ar+bV/joWBNX8
VjAV06TjPf3CYbHPykv9v1yJdeHef5aSdy3qpVja6kD1FGFGclHtMgWiLFFbmHfF
xF5gdU2NgdzLdFX8s4cBc579wK0BPZpfMjDWzUzBaPt/rFVFiYGCd0MakQQeMZrI
54g3x1EfnjVF8Lk91Rnj5IEEHfdi7XjTAhC7olCI2CIpq1LNOluTDybxA/diyHm/
5tw+coCoIWzaUOZY1UV1PWa2JAef0LqdWMKnPzqNVpr3eaMZm5XmuDGao4kLgGo6
PeQB6WdUgZtQawoEW1sPb6hMMTWk4TOx8Zzx6tLoMQOtXATGqmf23Luey1Cv1g5f
N3ZOfyLsRt7H3UOP3hiU
=pc03
-----END PGP SIGNATURE-----
-------------- next part --------------
[root at localhost jonas]# python3-pip install PySide
Downloading/unpacking PySide
  Downloading PySide-1.2.1.tar.gz (9.3MB): 9.3MB downloaded
  Running setup.py egg_info for package PySide
    Removing /tmp/pip_build_root/PySide/pyside_package
    
    package init file 'pyside_package/PySide/__init__.py' not found (or not a regular file)
    package init file 'pyside_package/pysideuic/__init__.py' not found (or not a regular file)
    warning: no previously-included files matching '**' found under directory 'sources/pyside-examples/examples/hyperui'
    warning: no previously-included files matching '**' found under directory 'sources/pyside-examples/mobility'
    warning: no previously-included files matching '**' found under directory 'sources/shiboken/.git'
    warning: no previously-included files matching '**' found under directory 'sources/pyside/.git'
    warning: no previously-included files matching '**' found under directory 'sources/pyside-tools/.git'
    warning: no previously-included files matching '**' found under directory 'sources/pyside-examples/.git'
    warning: no files found matching '**' under directory 'pyside_package/PySide'
    warning: no files found matching '**' under directory 'pyside_package/PySide/docs'
    warning: no files found matching '**' under directory 'pyside_package/PySide/plugins'
    warning: no files found matching '**' under directory 'pyside_package/PySide/imports'
    warning: no files found matching '**' under directory 'pyside_package/PySide/translations'
    warning: no files found matching '**' under directory 'pyside_package/PySide/include'
    warning: no files found matching '**' under directory 'pyside_package/PySide/typesystems'
    warning: no files found matching '**' under directory 'pyside_package/PySide/examples'
    warning: no files found matching '**' under directory 'pyside_package/pysideuic'
    warning: no files found matching '**' under directory 'pyside_package/pysideuic/Compiler'
    warning: no files found matching '**' under directory 'pyside_package/pysideuic/port_v2'
    warning: no files found matching '**' under directory 'pyside_package/pysideuic/port_v3'
    warning: no files found matching '**' under directory 'pyside_package/pysideuic/widget-plugins'
Installing collected packages: PySide
  Running setup.py install for PySide
    Removing /tmp/pip_build_root/PySide/pyside_package
    Python architecture is 64bit
    Inserting path "/tmp/pip_build_root/PySide/pyside_install/py3.3-qt5.2.0-64bit-release/bin" to environment
    ==============================
    Package version: 1.2.1
    Build type: Release
    Build tests: False
    ---
    Make path: /usr/bin/make
    Make generator: Unix Makefiles
    Make jobs:
    ---
    Script directory: /tmp/pip_build_root/PySide
    Sources directory: /tmp/pip_build_root/PySide/sources
    Build directory: /tmp/pip_build_root/PySide/pyside_build/py3.3-qt5.2.0-64bit-release
    Install directory: /tmp/pip_build_root/PySide/pyside_install/py3.3-qt5.2.0-64bit-release
    Python site-packages install directory: /tmp/pip_build_root/PySide/pyside_install/py3.3-qt5.2.0-64bit-release/lib64/python3.3/site-packages
    ---
    Python executable: /usr/bin/python3
    Python includes: /usr/include/python3.3m
    Python library: /usr/lib64/libpython3.3m.so
    Python prefix: /usr
    Python scripts: /usr/bin
    ---
    Qt qmake: /usr/bin/qmake
    Qt version: 5.2.0
    Qt bins: /usr/lib64/qt5/bin
    Qt plugins: /usr/lib64/qt5/plugins
    ---
    OpenSSL libs: None
    ==============================
    Creating build folder /tmp/pip_build_root/PySide/pyside_build/py3.3-qt5.2.0-64bit-release...
    Creating install folder /tmp/pip_build_root/PySide/pyside_install/py3.3-qt5.2.0-64bit-release...
    Building module shiboken...
    Creating module build folder /tmp/pip_build_root/PySide/pyside_build/py3.3-qt5.2.0-64bit-release/shiboken...
    Configuring module shiboken (/tmp/pip_build_root/PySide/sources/shiboken)...
    Running process: /usr/bin/cmake -G "Unix Makefiles" -DQT_QMAKE_EXECUTABLE=/usr/bin/qmake -DBUILD_TESTS=False -DDISABLE_DOCSTRINGS=True -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/tmp/pip_build_root/PySide/pyside_install/py3.3-qt5.2.0-64bit-release /tmp/pip_build_root/PySide/sources/shiboken -DPYTHON3_EXECUTABLE=/usr/bin/python3 -DPYTHON3_INCLUDE_DIR=/usr/include/python3.3m -DPYTHON3_LIBRARY=/usr/lib64/libpython3.3m.so -DCMAKE_INSTALL_RPATH_USE_LINK_PATH=yes -DUSE_PYTHON3=ON
    /usr/bin/cmake -G Unix Makefiles -DQT_QMAKE_EXECUTABLE=/usr/bin/qmake -DBUILD_TESTS=False -DDISABLE_DOCSTRINGS=True -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/tmp/pip_build_root/PySide/pyside_install/py3.3-qt5.2.0-64bit-release /tmp/pip_build_root/PySide/sources/shiboken -DPYTHON3_EXECUTABLE=/usr/bin/python3 -DPYTHON3_INCLUDE_DIR=/usr/include/python3.3m -DPYTHON3_LIBRARY=/usr/lib64/libpython3.3m.so -DCMAKE_INSTALL_RPATH_USE_LINK_PATH=yes -DUSE_PYTHON3=ON
    -- The C compiler identification is GNU 4.8.2
    -- The CXX compiler identification is GNU 4.8.2
    -- Check for working C compiler: /usr/bin/cc
    -- Check for working C compiler: /usr/bin/cc -- works
    -- Detecting C compiler ABI info
    -- Detecting C compiler ABI info - done
    -- Check for working CXX compiler: /usr/bin/c++
    -- Check for working CXX compiler: /usr/bin/c++ -- works
    -- Detecting CXX compiler ABI info
    -- Detecting CXX compiler ABI info - done
    -- Looking for Q_WS_X11
    -- Looking for Q_WS_X11 - not found
    -- Looking for Q_WS_WIN
    -- Looking for Q_WS_WIN - not found
    -- Looking for Q_WS_QWS
    -- Looking for Q_WS_QWS - not found
    -- Looking for Q_WS_MAC
    -- Looking for Q_WS_MAC - not found
    -- Found unsuitable Qt version "5.2.0" from /usr/bin/qmake
    -- Found Python3Libs: /usr/lib64/libpython3.3m.so
    -- Found Python3Interp: /usr/bin/python3
    -- Could NOT find Python3InterpDbg (missing:  PYTHON3_DBG_EXECUTABLE)
    -- Could NOT find Python3InterpDbg (missing:  PYTHON3_DBG_EXECUTABLE)
    PYTHON WITH DEBUG: /usr/bin/python3
    -- Found LibXml2: /usr/lib64/libxml2.so (found suitable version "2.9.1", minimum required is "2.6.32")
    -- Found LibXslt: /usr/lib64/libxslt.so (found suitable version "1.1.28", minimum required is "1.1.19")
    -- sphinx-build - not found! doc target disabled
    CMake Warning at CMakeLists.txt:127 (message):
      Some dependencies were not found, shiboken generator compilation disabled!
    
    
    -- Configuring done
    -- Generating done
    -- Build files have been written to: /tmp/pip_build_root/PySide/pyside_build/py3.3-qt5.2.0-64bit-release/shiboken
    Compiling module shiboken...
    Running process: /usr/bin/make
    /usr/bin/make
    [  2%] Generating qrc_generator.cxx
    Scanning dependencies of target apiextractor
    [  4%] Building CXX object ApiExtractor/CMakeFiles/apiextractor.dir/apiextractor.cpp.o
    In file included from /usr/lib64/qt5/include/QtCore/qchar.h:45:0,
                     from /usr/lib64/qt5/include/QtCore/qhash.h:45,
                     from /usr/lib64/qt5/include/QtCore/QHash:1,
                     from /tmp/pip_build_root/PySide/sources/shiboken/ApiExtractor/typesystem.h:27,
                     from /tmp/pip_build_root/PySide/sources/shiboken/ApiExtractor/abstractmetalang.h:27,
                     from /tmp/pip_build_root/PySide/sources/shiboken/ApiExtractor/apiextractor.h:28,
                     from /tmp/pip_build_root/PySide/sources/shiboken/ApiExtractor/apiextractor.cpp:24:
    /usr/lib64/qt5/include/QtCore/qglobal.h:996:4: error: #error "You must build your code with position independent code if Qt was built with -reduce-relocations. " "Compile your code with -fPIC or -fPIE."
     #  error "You must build your code with position independent code if Qt was built with -reduce-relocations. "\
        ^
    /tmp/pip_build_root/PySide/sources/shiboken/ApiExtractor/apiextractor.cpp: In function ‘bool preprocess(const QString&, QFile&, const QStringList&)’:
    /tmp/pip_build_root/PySide/sources/shiboken/ApiExtractor/apiextractor.cpp:273:38: error: ‘convertSeparators’ is not a member of ‘QDir’
             preprocess.push_include_path(QDir::convertSeparators(include).toStdString());
                                          ^
    ApiExtractor/CMakeFiles/apiextractor.dir/build.make:64: recipe for target 'ApiExtractor/CMakeFiles/apiextractor.dir/apiextractor.cpp.o' failed
    make[2]: *** [ApiExtractor/CMakeFiles/apiextractor.dir/apiextractor.cpp.o] Error 1
    CMakeFiles/Makefile2:140: recipe for target 'ApiExtractor/CMakeFiles/apiextractor.dir/all' failed
    make[1]: *** [ApiExtractor/CMakeFiles/apiextractor.dir/all] Error 2
    Makefile:116: recipe for target 'all' failed
    make: *** [all] Error 2
    error: Error compiling shiboken
    Complete output from command /usr/bin/python3 -c "import setuptools;__file__='/tmp/pip_build_root/PySide/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-degjgh-record/install-record.txt --single-version-externally-managed:
    Removing /tmp/pip_build_root/PySide/pyside_package

running install

running build

Python architecture is 64bit

Inserting path "/tmp/pip_build_root/PySide/pyside_install/py3.3-qt5.2.0-64bit-release/bin" to environment

==============================

Package version: 1.2.1

Build type: Release

Build tests: False

---

Make path: /usr/bin/make

Make generator: Unix Makefiles

Make jobs:

---

Script directory: /tmp/pip_build_root/PySide

Sources directory: /tmp/pip_build_root/PySide/sources

Build directory: /tmp/pip_build_root/PySide/pyside_build/py3.3-qt5.2.0-64bit-release

Install directory: /tmp/pip_build_root/PySide/pyside_install/py3.3-qt5.2.0-64bit-release

Python site-packages install directory: /tmp/pip_build_root/PySide/pyside_install/py3.3-qt5.2.0-64bit-release/lib64/python3.3/site-packages

---

Python executable: /usr/bin/python3

Python includes: /usr/include/python3.3m

Python library: /usr/lib64/libpython3.3m.so

Python prefix: /usr

Python scripts: /usr/bin

---

Qt qmake: /usr/bin/qmake

Qt version: 5.2.0

Qt bins: /usr/lib64/qt5/bin

Qt plugins: /usr/lib64/qt5/plugins

---

OpenSSL libs: None

==============================

Creating build folder /tmp/pip_build_root/PySide/pyside_build/py3.3-qt5.2.0-64bit-release...

Creating install folder /tmp/pip_build_root/PySide/pyside_install/py3.3-qt5.2.0-64bit-release...

Building module shiboken...

Creating module build folder /tmp/pip_build_root/PySide/pyside_build/py3.3-qt5.2.0-64bit-release/shiboken...

Configuring module shiboken (/tmp/pip_build_root/PySide/sources/shiboken)...

Running process: /usr/bin/cmake -G "Unix Makefiles" -DQT_QMAKE_EXECUTABLE=/usr/bin/qmake -DBUILD_TESTS=False -DDISABLE_DOCSTRINGS=True -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/tmp/pip_build_root/PySide/pyside_install/py3.3-qt5.2.0-64bit-release /tmp/pip_build_root/PySide/sources/shiboken -DPYTHON3_EXECUTABLE=/usr/bin/python3 -DPYTHON3_INCLUDE_DIR=/usr/include/python3.3m -DPYTHON3_LIBRARY=/usr/lib64/libpython3.3m.so -DCMAKE_INSTALL_RPATH_USE_LINK_PATH=yes -DUSE_PYTHON3=ON

/usr/bin/cmake -G Unix Makefiles -DQT_QMAKE_EXECUTABLE=/usr/bin/qmake -DBUILD_TESTS=False -DDISABLE_DOCSTRINGS=True -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/tmp/pip_build_root/PySide/pyside_install/py3.3-qt5.2.0-64bit-release /tmp/pip_build_root/PySide/sources/shiboken -DPYTHON3_EXECUTABLE=/usr/bin/python3 -DPYTHON3_INCLUDE_DIR=/usr/include/python3.3m -DPYTHON3_LIBRARY=/usr/lib64/libpython3.3m.so -DCMAKE_INSTALL_RPATH_USE_LINK_PATH=yes -DUSE_PYTHON3=ON

-- The C compiler identification is GNU 4.8.2

-- The CXX compiler identification is GNU 4.8.2

-- Check for working C compiler: /usr/bin/cc

-- Check for working C compiler: /usr/bin/cc -- works

-- Detecting C compiler ABI info

-- Detecting C compiler ABI info - done

-- Check for working CXX compiler: /usr/bin/c++

-- Check for working CXX compiler: /usr/bin/c++ -- works

-- Detecting CXX compiler ABI info

-- Detecting CXX compiler ABI info - done

-- Looking for Q_WS_X11

-- Looking for Q_WS_X11 - not found

-- Looking for Q_WS_WIN

-- Looking for Q_WS_WIN - not found

-- Looking for Q_WS_QWS

-- Looking for Q_WS_QWS - not found

-- Looking for Q_WS_MAC

-- Looking for Q_WS_MAC - not found

-- Found unsuitable Qt version "5.2.0" from /usr/bin/qmake

-- Found Python3Libs: /usr/lib64/libpython3.3m.so

-- Found Python3Interp: /usr/bin/python3

-- Could NOT find Python3InterpDbg (missing:  PYTHON3_DBG_EXECUTABLE)

-- Could NOT find Python3InterpDbg (missing:  PYTHON3_DBG_EXECUTABLE)

PYTHON WITH DEBUG: /usr/bin/python3

-- Found LibXml2: /usr/lib64/libxml2.so (found suitable version "2.9.1", minimum required is "2.6.32")

-- Found LibXslt: /usr/lib64/libxslt.so (found suitable version "1.1.28", minimum required is "1.1.19")

-- sphinx-build - not found! doc target disabled

CMake Warning at CMakeLists.txt:127 (message):

  Some dependencies were not found, shiboken generator compilation disabled!





-- Configuring done

-- Generating done

-- Build files have been written to: /tmp/pip_build_root/PySide/pyside_build/py3.3-qt5.2.0-64bit-release/shiboken

Compiling module shiboken...

Running process: /usr/bin/make

/usr/bin/make

[  2%] Generating qrc_generator.cxx

Scanning dependencies of target apiextractor

[  4%] Building CXX object ApiExtractor/CMakeFiles/apiextractor.dir/apiextractor.cpp.o

In file included from /usr/lib64/qt5/include/QtCore/qchar.h:45:0,

                 from /usr/lib64/qt5/include/QtCore/qhash.h:45,

                 from /usr/lib64/qt5/include/QtCore/QHash:1,

                 from /tmp/pip_build_root/PySide/sources/shiboken/ApiExtractor/typesystem.h:27,

                 from /tmp/pip_build_root/PySide/sources/shiboken/ApiExtractor/abstractmetalang.h:27,

                 from /tmp/pip_build_root/PySide/sources/shiboken/ApiExtractor/apiextractor.h:28,

                 from /tmp/pip_build_root/PySide/sources/shiboken/ApiExtractor/apiextractor.cpp:24:

/usr/lib64/qt5/include/QtCore/qglobal.h:996:4: error: #error "You must build your code with position independent code if Qt was built with -reduce-relocations. " "Compile your code with -fPIC or -fPIE."

 #  error "You must build your code with position independent code if Qt was built with -reduce-relocations. "\

    ^

/tmp/pip_build_root/PySide/sources/shiboken/ApiExtractor/apiextractor.cpp: In function ‘bool preprocess(const QString&, QFile&, const QStringList&)’:

/tmp/pip_build_root/PySide/sources/shiboken/ApiExtractor/apiextractor.cpp:273:38: error: ‘convertSeparators’ is not a member of ‘QDir’

         preprocess.push_include_path(QDir::convertSeparators(include).toStdString());

                                      ^

ApiExtractor/CMakeFiles/apiextractor.dir/build.make:64: recipe for target 'ApiExtractor/CMakeFiles/apiextractor.dir/apiextractor.cpp.o' failed

make[2]: *** [ApiExtractor/CMakeFiles/apiextractor.dir/apiextractor.cpp.o] Error 1

CMakeFiles/Makefile2:140: recipe for target 'ApiExtractor/CMakeFiles/apiextractor.dir/all' failed

make[1]: *** [ApiExtractor/CMakeFiles/apiextractor.dir/all] Error 2

Makefile:116: recipe for target 'all' failed

make: *** [all] Error 2

error: Error compiling shiboken

----------------------------------------
Cleaning up...
Command /usr/bin/python3 -c "import setuptools;__file__='/tmp/pip_build_root/PySide/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-degjgh-record/install-record.txt --single-version-externally-managed failed with error code 1 in /tmp/pip_build_root/PySide
Storing complete log in /root/.pip/pip.log
[root at localhost jonas]#
-------------- next part --------------
A non-text attachment was scrubbed...
Name: output.txt.sig
Type: application/pgp-signature
Size: 543 bytes
Desc: not available
URL: <http://lists.qt-project.org/pipermail/pyside/attachments/20140327/479c6891/attachment.sig>


More information about the PySide mailing list