Uploaded image for project: 'Qbs ("Cubes")'
  1. Qbs ("Cubes")
  2. QBS-921

automatic handling of rpath breaks linux library search order when using system qt



    • Bug
    • Resolution: Done
    • P3: Somewhat important
    • 1.6.0
    • 1.5.1
    • None
    • Gentoo Linux
    • 646ae60164d61d85d5773309fe956dde7d4b2909


      The standard Qt modules always append the location of the Qt libraries to the rpath. If an application is build against the system Qt version than this path usually contains most installed libraries, not just qt (eg. /usr/lib).

      As rpath is always searched first, this basically disables support for shadowing anything in /usr/lib with $LD_LIBRARY_PATH or /etc/ld.so.conf.

      As an example: gentoo handles multiple libGL.so libraries via ld.so.conf, with the mesa version as fallback in /usr/lib. Due to the rpath, anything build with qbs will always find the mesa fallback first, instead of using the configured opengl implementation.

      As a workaround qbs can be instructed to not write any rpath at all - but this also disables any legitimate use of rpaths in my build (used for non-installed libraries).
      This workaround does not help when using qt-creator, as the qbs integration also adds the qt library path into $LD_LIBRARY_PATH when lunching the build result.

      The qt modules should only use rpath if the libraries are not installed in a standard search path (at least in linux).


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



            kandeler Christian Kandeler
            cstoitner Christian Stoitner
            0 Vote for this issue
            2 Start watching this issue



              Gerrit Reviews

                There are no open Gerrit changes