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

Build projects without rpath

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 1.3.0
    • 1.2.0
    • General
    • None
    • edfb5130b20e3758a7eed9fe73d0174514c03d53

    Description

      If I build a project in Linux, qbs compiles it with a rpath to the Qt library. I tried to deactivate this with:
      cpp.rpath: undefined
      in the product, but the rpath is still set

      $ readelf -d executable
      0x000000000000000f (RPATH) Library rpath: [$ORIGIN:/opt/qt-4.8.5/lib]
      

      In my case, this Path exists only on the development system, the rpath must not be set!! The executable should use the default system search paths like LD_LIBRARY_PATH. How can I tell QBS to not set a rpath?

      Edit:
      I found a workaround, if i comment out the following lines in the share/modules/cpp/gcc.js file, no rpath is set:

      if (rpaths && rpaths.length)
              args.push('-Wl,-rpath,' + rpaths.join(",-rpath,"));
      

      maybe it's a good idea to add another property to the product module like:
      property bool useRpath
      and use this in the gcc.js like:

      if (useRpath && rpaths && rpaths.length)
              args.push('-Wl,-rpath,' + rpaths.join(",-rpath,"));
      

      Attachments

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

        Activity

          People

            jbornema Joerg Bornemann
            wojo Markus B
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes