Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-27314

lrelease fails during build due to DYLD_LIBRARY_PATH

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: P1: Critical P1: Critical
    • 5.0.0 Beta 2
    • 5.0.0 Beta 2
    • Build tools: qmake
    • None
    • Mac OS X 10.6.8, Xcode 3.2.6, Qt 5.0b5, 10.6 SDK
    • f05a392f3ea70d2d446bb3a0bc826ef6d60f1c3b

      When building Qt 5b2 on 10.6.8, using Xcode 3.2.6, against the 10.6 SDK, translations.pro fails to build with:

      cd translations/ && ( test -f Makefile || /Volumes/RBDev/RouteBuddy/Development/Qt/qt-everywhere-opensource-src-5.0.0-beta1/qtbase/bin/qmake /Volumes/RBDev/RouteBuddy/Development/Qt/qt-everywhere-opensource-src-5.0.0-beta1/qttranslations/translations/translations.pro -o Makefile ) && make -f Makefile 
      DYLD_LIBRARY_PATH=/Volumes/RBDev/RouteBuddy/Development/Qt/qt-everywhere-opensource-src-5.0.0-beta1/qtbase/lib QT_PLUGIN_PATH=/Volumes/RBDev/RouteBuddy/Development/Qt/qt-everywhere-opensource-src-5.0.0-beta1/qtbase/plugins /Volumes/RBDev/RouteBuddy/Development/Qt/qt-everywhere-opensource-src-5.0.0-beta1/qttools/bin/lrelease assistant_cs.ts -qm assistant_cs.qm
      dyld: Library not loaded: /Developer/Qt/5.0.0/lib/QtXml.framework/Versions/5/QtXml
        Referenced from: /Volumes/RBDev/RouteBuddy/Development/Qt/qt-everywhere-opensource-src-5.0.0-beta1/qttools/bin/lrelease
        Reason: image not found
      make[2]: *** [assistant_cs.qm] Trace/BPT trap
      make[1]: *** [sub-translations-make_first] Error 2
      make: *** [module-qttranslations-make_first] Error 2
      

      The build was configured with:

      ./configure -opensource -confirm-license -platform macx-g++42 -debug-and-release -arch x86_64 -nomake demos -nomake examples -prefix /Developer/Qt/5.0.0 -sdk /Developer/SDKs/MacOSX10.6.sdk
      

      The QtXml.framework has been built successfully, however the assignment to DYLD_LIBRARY_PATH by the build does not appear to allow dyld to find the framework.

      To allow lrelease to find this framework, and launch successfully. DYLD_FRAMEWORK_PATH has to be set rather than DYLD_LIBRARY_PATH. Setting that environment to the path assigned to DYLD_LIBRARY_PATH then re-running make produces a working build.

      The man page for dyld claims that DYLD_FRAMEWORK_PATH will be checked first and DYLD_LIBRARY_PATH used as a fall-back, but that doesn't appear to be happening on this OS/Xcode combination.

      As the thing being searched for is a framework, rather than a dylib, setting DYLD_FRAMEWORK_PATH is probably a better choice.

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

            buddenha Oswald Buddenhagen
            refnum Dair Grant
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes