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

Unable to control '-rpath-link' parameters

    XMLWordPrintable

    Details

    • Platform/s:
      Linux/X11

      Description

      Currently it seems like the values for -rpath and -rpath-link (that are passed to the ld linker) are coupled.

      If I build the test project (see test.qbs and A.cpp below) I get an executable A with the following RPATH inside:

      chrpath  ./default/A.6dcd4ce2/A
      ./default/A.6dcd4ce2/A: RPATH=/home/heiko.nardmann/Qt/Online/5.12.3/gcc_64/lib
      

      I want to get rid of this RPATH as it is of course wrong on the target system and may hide library dependency problems on the development machine.

      Clearing the Qt.core RPATH value by setting

      cpp.rpaths: [ ]
      

      inside core.qbs leads to

      /home/heiko.nardmann/QtCreator/4.8.2/bin/qbs build --settings-dir /home/heiko.nardmann/projects/trunk/navapps/build_env/qbs/settings --file test.qbs  --command-echo-mode command-line profile:linux64-gcc-qt5-12-3
      Restoring build graph from disk
      Building for configuration default
      /usr/bin/g++ -Wl,-m,elf_x86_64 -L/home/heiko.nardmann/Qt/Online/5.12.3/gcc_64/lib -m64 -o /home/heiko.nardmann/projects/trunk/QBS-Probleme/Qt-Deps/default/A.6dcd4ce2/A /home/heiko.nardmann/projects/trunk/QBS-Probleme/Qt-Deps/default/A.6dcd4ce2/3a52ce780950d4d9/A.cpp.o /home/heiko.nardmann/Qt/Online/5.12.3/gcc_64/lib/libQt5Core.so.5.12.3 -lpthread
      ERROR: /usr/bin/g++ -Wl,-m,elf_x86_64 -L/home/heiko.nardmann/Qt/Online/5.12.3/gcc_64/lib -m64 -o /home/heiko.nardmann/projects/trunk/QBS-Probleme/Qt-Deps/default/A.6dcd4ce2/A /home/heiko.nardmann/projects/trunk/QBS-Probleme/Qt-Deps/default/A.6dcd4ce2/3a52ce780950d4d9/A.cpp.o /home/heiko.nardmann/Qt/Online/5.12.3/gcc_64/lib/libQt5Core.so.5.12.3 -lpthread
      
      ERROR: /usr/bin/ld: warning: libicui18n.so.56, needed by /home/heiko.nardmann/Qt/Online/5.12.3/gcc_64/lib/libQt5Core.so.5.12.3, not found (try using -rpath or -rpath-link)
      /usr/bin/ld: warning: libicuuc.so.56, needed by /home/heiko.nardmann/Qt/Online/5.12.3/gcc_64/lib/libQt5Core.so.5.12.3, not found (try using -rpath or -rpath-link)
      /usr/bin/ld: warning: libicudata.so.56, needed by /home/heiko.nardmann/Qt/Online/5.12.3/gcc_64/lib/libQt5Core.so.5.12.3, not found (try using -rpath or -rpath-link)
      /home/heiko.nardmann/Qt/Online/5.12.3/gcc_64/lib/libQt5Core.so.5.12.3: undefined reference to `ucal_clone_56'
      /home/heiko.nardmann/Qt/Online/5.12.3/gcc_64/lib/libQt5Core.so.5.12.3: undefined reference to `ucnv_close_56'
      /home/heiko.nardmann/Qt/Online/5.12.3/gcc_64/lib/libQt5Core.so.5.12.3: undefined reference to `ucol_setAttribute_56'
      /home/heiko.nardmann/Qt/Online/5.12.3/gcc_64/lib/libQt5Core.so.5.12.3: undefined reference to `ucnv_setSubstChars_56'
      /home/heiko.nardmann/Qt/Online/5.12.3/gcc_64/lib/libQt5Core.so.5.12.3: undefined reference to `ucal_close_56'
      /home/heiko.nardmann/Qt/Online/5.12.3/gcc_64/lib/libQt5Core.so.5.12.3: undefined reference to `ucal_openTimeZoneIDEnumeration_56'
      /home/heiko.nardmann/Qt/Online/5.12.3/gcc_64/lib/libQt5Core.so.5.12.3: undefined reference to `ucnv_fromUnicode_56'
      /home/heiko.nardmann/Qt/Online/5.12.3/gcc_64/lib/libQt5Core.so.5.12.3: undefined reference to `uenum_close_56'
      /home/heiko.nardmann/Qt/Online/5.12.3/gcc_64/lib/libQt5Core.so.5.12.3: undefined reference to `ucnv_getDefaultName_56'
      /home/heiko.nardmann/Qt/Online/5.12.3/gcc_64/lib/libQt5Core.so.5.12.3: undefined reference to `ucal_inDaylightTime_56'
      /home/heiko.nardmann/Qt/Online/5.12.3/gcc_64/lib/libQt5Core.so.5.12.3: undefined reference to `ucnv_compareNames_56'
      /home/heiko.nardmann/Qt/Online/5.12.3/gcc_64/lib/libQt5Core.so.5.12.3: undefined reference to `ucal_open_56'
      /home/heiko.nardmann/Qt/Online/5.12.3/gcc_64/lib/libQt5Core.so.5.12.3: undefined reference to `ucnv_getAlias_56'
      /home/heiko.nardmann/Qt/Online/5.12.3/gcc_64/lib/libQt5Core.so.5.12.3: undefined reference to `ucnv_countAvailable_56'
      /home/heiko.nardmann/Qt/Online/5.12.3/gcc_64/lib/libQt5Core.so.5.12.3: undefined reference to `u_strToLower_56'
      /home/heiko.nardmann/Qt/Online/5.12.3/gcc_64/lib/libQt5Core.so.5.12.3: undefined reference to `ucal_getDefaultTimeZone_56'
      /home/heiko.nardmann/Qt/Online/5.12.3/gcc_64/lib/libQt5Core.so.5.12.3: undefined reference to `ucal_openCountryTimeZones_56'
      /home/heiko.nardmann/Qt/Online/5.12.3/gcc_64/lib/libQt5Core.so.5.12.3: undefined reference to `ucal_getDSTSavings_56'
      /home/heiko.nardmann/Qt/Online/5.12.3/gcc_64/lib/libQt5Core.so.5.12.3: undefined reference to `ucol_close_56'
      /home/heiko.nardmann/Qt/Online/5.12.3/gcc_64/lib/libQt5Core.so.5.12.3: undefined reference to `ucal_openTimeZones_56'
      /home/heiko.nardmann/Qt/Online/5.12.3/gcc_64/lib/libQt5Core.so.5.12.3: undefined reference to `ucnv_getStandardName_56'
      /home/heiko.nardmann/Qt/Online/5.12.3/gcc_64/lib/libQt5Core.so.5.12.3: undefined reference to `ucnv_countAliases_56'
      /home/heiko.nardmann/Qt/Online/5.12.3/gcc_64/lib/libQt5Core.so.5.12.3: undefined reference to `ucol_open_56'
      /home/heiko.nardmann/Qt/Online/5.12.3/gcc_64/lib/libQt5Core.so.5.12.3: undefined reference to `ucnv_open_56'
      /home/heiko.nardmann/Qt/Online/5.12.3/gcc_64/lib/libQt5Core.so.5.12.3: undefined reference to `ucal_setMillis_56'
      /home/heiko.nardmann/Qt/Online/5.12.3/gcc_64/lib/libQt5Core.so.5.12.3: undefined reference to `ucal_get_56'
      /home/heiko.nardmann/Qt/Online/5.12.3/gcc_64/lib/libQt5Core.so.5.12.3: undefined reference to `uenum_next_56'
      /home/heiko.nardmann/Qt/Online/5.12.3/gcc_64/lib/libQt5Core.so.5.12.3: undefined reference to `ucnv_getMaxCharSize_56'
      /home/heiko.nardmann/Qt/Online/5.12.3/gcc_64/lib/libQt5Core.so.5.12.3: undefined reference to `ucol_strcoll_56'
      /home/heiko.nardmann/Qt/Online/5.12.3/gcc_64/lib/libQt5Core.so.5.12.3: undefined reference to `u_errorName_56'
      /home/heiko.nardmann/Qt/Online/5.12.3/gcc_64/lib/libQt5Core.so.5.12.3: undefined reference to `ucnv_getAvailableName_56'
      /home/heiko.nardmann/Qt/Online/5.12.3/gcc_64/lib/libQt5Core.so.5.12.3: undefined reference to `ucal_getTimeZoneDisplayName_56'
      /home/heiko.nardmann/Qt/Online/5.12.3/gcc_64/lib/libQt5Core.so.5.12.3: undefined reference to `u_strToUpper_56'
      /home/heiko.nardmann/Qt/Online/5.12.3/gcc_64/lib/libQt5Core.so.5.12.3: undefined reference to `ucnv_toUnicode_56'
      /home/heiko.nardmann/Qt/Online/5.12.3/gcc_64/lib/libQt5Core.so.5.12.3: undefined reference to `ucol_getSortKey_56'
      collect2: error: ld returned 1 exit status
      ERROR: Process failed with exit code 1.
      The following products could not be built for configuration default:
      A
      

      To me it looks like some cpp.rpathlinkPaths property is missing?

        Attachments

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

          Activity

            People

            Assignee:
            kandeler Christian Kandeler
            Reporter:
            heiko_nardmann Heiko Nardmann
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:

                Gerrit Reviews

                There are no open Gerrit changes