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

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P3: Somewhat important
    • Resolution: Done
    • Affects Version/s: 1.5.1
    • Fix Version/s: 1.6.0
    • Labels:
      None
    • Environment:
      Gentoo Linux
    • Commits:
      646ae60164d61d85d5773309fe956dde7d4b2909

      Description

      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).

        Attachments

        For Gerrit Dashboard: QBS-921
        # Subject Branch Project Status CR V

          Activity

            People

            Assignee:
            kandeler Christian Kandeler
            Reporter:
            cstoitner Christian Stoitner
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes