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

Shiboken tries to create system directories during build phase (and fails)

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Not Evaluated
    • None
    • None
    • Build System
    • None
    • Linux/X11
    • 52efd324a8a5743f3650b961ba9b9b8b5639e0a2 (pyside/pyside-setup/dev)

    Description

      Building shiboken locally fails for multiple reasons, here's the first failure:

      [4/160] Linking CXX shared module shibokenmodule/../Shiboken.cpython-38-x86_64-linux-gnu.so 
      FAILED: Shiboken.cpython-38-x86_64-linux-gnu.so  
      : && /usr/bin/clang++ -fPIC -Wall -Wextra -Wmissing-include-dirs -Qunused-arguments -fcolor-diagnostics -Wall -fvisibility=hidden -Wno-strict-aliasing -D QT_NO_CAST_FROM_ASCII -D QT_NO_
      CAST_TO_ASCII -O3 -DNDEBUG   -shared  -o shibokenmodule/../Shiboken.cpython-38-x86_64-linux-gnu.so shibokenmodule/CMakeFiles/shibokenmodule.dir/Shiboken/shiboken_module_wrapper.cpp.o  -
      Wl,-rpath,/data/qt/pyside-setup/build_shiboken/libshiboken:  libshiboken/libshiboken6.cpython-38-x86_64-linux-gnu.so.6.0.0  /usr/lib64/libpython3.8.so && cd /data/qt/pyside-setup/build_
      shiboken/shibokenmodule && /usr/bin/python3.8 /data/qt/pyside-setup/build_shiboken/shibokenmodule/copy_renamed_binary.py /data/qt/pyside-setup/build_shiboken/shibokenmodule/../Shiboken.
      cpython-38-x86_64-linux-gnu.so 
      Traceback (most recent call last): 
        File "/data/qt/pyside-setup/build_shiboken/shibokenmodule/copy_renamed_binary.py", line 8, in <module> 
          os.makedirs(instdir, exist_ok=True) 
        File "/usr/lib64/python3.8/os.py", line 213, in makedirs 
          makedirs(head, exist_ok=exist_ok) 
        File "/usr/lib64/python3.8/os.py", line 213, in makedirs 
          makedirs(head, exist_ok=exist_ok) 
        File "/usr/lib64/python3.8/os.py", line 223, in makedirs 
          mkdir(name, mode) 
      PermissionError: [Errno 13] Permission denied: '/usr/local/lib64/python3.8' 
      ninja: build stopped: subcommand failed.

      The issue points to sources/shiboken6/shibokenmodule/CMakeLists.txt
       which tries to create /usr/local/lib64/python3.8 and fails for obvious reasons.

       This should not be done during the build phase but the installation one. Reason for that is that it will not respect the DESTDIR variable in the current form.

      To achieve that, it shall use a proper CMake 'install' command instead of delegating that task to a python script

       

      Attachments

        Issue Links

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

          Activity

            People

              ctismer Christian Tismer
              cgiboudeaux Christophe Marin
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes