macdeployqt - no longer working after upgrade to 5.5



  • I just upgraded form 5.4.1 to 5.5

    When I use macdeployqt on my application.app after it has been built, the process starts but at the end, the Qt .frameworks I need are not being copied in the /Framework directory like usual

    Here is the command I'm using :
    ./Qt5.5.0/5.5/clang_64/bin/macdeployqt /Users/tourlou3/build-PowerVelo2-Desktop_Qt_5_5_0_clang_64bit-Release/MaximumTrainer.app

    Is there something I should set in my .pro to force the .frameworks to be copied?
    I already have linked Qt in the .pro like this:
    QT += core gui widgets (...)

    I suspect a step was not done when installing Qt 5.5 on the machine. I just ran the installer, nothing more
    Seems to be the same problem with other users :
    http://stackoverflow.com/questions/13233393/installing-qt-libraries-on-os-x (see rimorob comment)

    Thanks


  • Lifetime Qt Champion

    Hi,

    What do you get if you make the output of macdeployqt more verbose ?



  • Hey,

    I have noticed that If I remove some external libs that are copied in my .pro. the Qt Frameworks get copied normally.

    Here is the log when i'm using the external libs and having the problem:
    https://www.dropbox.com/s/htkqvm36bxbj5xn/logMacdeployQt.rtf?dl=0
    I just copy manually the Qt.frameworks libs for now

    Here is the code that is causing the issue in my .pro

        #set RPATH
        QMAKE_RPATHDIR += @executable_path/../Frameworks
        QMAKE_RPATHDIR += @executable_path/lib
        QMAKE_RPATHDIR += @executable_path
    
    
        #Copy dylib necessary  VLC Libs (lib & plugins) and SFML libs that are forgotten by MacDeployQt
        copydata.commands =  $(COPY_DIR) /Users/tourlou3/Dropbox/VLC-Qt_0.11.0_build32_893f101/lib $$OUT_PWD/MaximumTrainer.app/Contents/MacOS &&
        copydata.commands += $(COPY_DIR) /Users/tourlou3/Dropbox/VLC-Qt_0.11.0_build32_893f101/plugins $$OUT_PWD/MaximumTrainer.app/Contents/MacOS &&
        copydata.commands += $(COPY_DIR) /Users/tourlou3/Dropbox/SFML-2.3-osx-clang-universal/deploy/lib $$OUT_PWD/MaximumTrainer.app/Contents/MacOS &&
        copydata.commands += $(COPY_DIR) /Users/tourlou3/Dropbox/SFML-2.3-osx-clang-universal/extlibs/Frameworks $$OUT_PWD/MaximumTrainer.app/Contents
        first.depends = $(first) copydata
        export(first.depends)
        export(copydata.commands)
        QMAKE_EXTRA_TARGETS += first copydata


  • I'm getting the same issue on a brand new app built with Qt 5.5. It says it cannot find any external Qt frameworks to deploy, but otool shows that they exist.

    āžœ  build-installer-Desktop_Qt_5_5_0_clang_64bit-Release>  macdeployqt MyApp.app -verbose=3
    Log: Using otool: 
    Log:  inspecting "MyApp.app/Contents/MacOS/MyApp" 
    WARNING: 
    WARNING: Could not find any external Qt frameworks to deploy in "MyApp.app" 
    WARNING: Perhaps macdeployqt was already used on "MyApp.app" ? 
    WARNING: If so, you will need to rebuild "MyApp.app" before trying again. 
    
    āžœ  build-installer-Desktop_Qt_5_5_0_clang_64bit-Release>  otool -L    MyApp.app/Contents/MacOS/MyApp
    MyApp.app/Contents/MacOS/MyApp:
    @rpath/QtWidgets.framework/Versions/5/QtWidgets (compatibility version 5.5.0, current version 5.5.0)
    @rpath/QtGui.framework/Versions/5/QtGui (compatibility version 5.5.0, current version 5.5.0)
    @rpath/QtCore.framework/Versions/5/QtCore (compatibility version 5.5.0, current version 5.5.0)
    /System/Library/Frameworks/DiskArbitration.framework/Versions/A/DiskArbitration (compatibility version 1.0.0, current version 1.0.0)
    /System/Library/Frameworks/IOKit.framework/Versions/A/IOKit (compatibility version 1.0.0, current version 275.0.0)
    @rpath/QtSerialPort.framework/Versions/5/QtSerialPort (compatibility version 5.5.0, current version 5.5.0)
    @rpath/QtNetwork.framework/Versions/5/QtNetwork (compatibility version 5.5.0, current version 5.5.0)
    /System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL (compatibility version 1.0.0, current version 1.0.0)
    /System/Library/Frameworks/AGL.framework/Versions/A/AGL (compatibility version 1.0.0, current version 1.0.0)
    /usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 104.1.0)
    /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1213.0.0)


  • Ok here I am at deploy day, and still having problem with OSX deploy.

    The Qt frameworks are not being copied, and it's not possible to run on another system that has not Qt installed (renaming my Qt folder to something else cause the crash also)

    tourlou3s-Mac:Applications tourlou3$ ./MaximumTrainer.app/Contents/MacOS/MaximumTrainer
    This application failed to start because it could not find or load the Qt platform plugin "cocoa".
    Reinstalling the application may fix this problem.
    Abort trap: 6


    If I remove theses line from my .pro, the Qt Frameworks get copied fine, but I loose my custom framework that I need

        #set RPATH (place to look for .dylib & framework by default)
        QMAKE_RPATHDIR += @executable_path/../Frameworks
        QMAKE_RPATHDIR += @executable_path/lib
        QMAKE_RPATHDIR += @executable_path
    
    
        #Copy dylib necessary  VLC Libs (lib & plugins) and SFML libs that are forgotten by MacDeployQt
        copydata.commands =  $(COPY_DIR) /Users/tourlou3/Dropbox/VLC-Qt_0.11.0_build32_893f101/lib $$OUT_PWD/MaximumTrainer.app/Contents/MacOS &&
        copydata.commands += $(COPY_DIR) /Users/tourlou3/Dropbox/VLC-Qt_0.11.0_build32_893f101/plugins $$OUT_PWD/MaximumTrainer.app/Contents/MacOS &&
        copydata.commands += $(COPY_DIR) /Users/tourlou3/Dropbox/SFML-2.3-osx-clang-universal/deploy/lib $$OUT_PWD/MaximumTrainer.app/Contents/MacOS &&
        copydata.commands += $(COPY_DIR) /Users/tourlou3/Dropbox/SFML-2.3-osx-clang-universal/extlibs/Frameworks $$OUT_PWD/MaximumTrainer.app/Contents
        first.depends = $(first) copydata
        export(first.depends)
        export(copydata.commands)
        QMAKE_EXTRA_TARGETS += first copydata
    

    Without theses line in my .pro, I get theses error while executing macdeployqt

    tourlou3s-Mac:~ tourlou3$ ./Qt5.5.0/5.5/clang_64/bin/macdeployqt /Users/tourlou3/build-PowerVelo2-Desktop_Qt_5_5_0_clang_64bit-Release/MaximumTrainer.app
    ERROR: Cannot resolve rpath "libvlc-qt.0.11.dylib (compatibility version 0.11.0, current version 0.11.0)"
    ERROR:  using QSet("/Users/tourlou3/Qt5.5.0/5.5/clang_64/lib")
    ERROR: Cannot resolve rpath "libvlc-qt-widgets.0.11.dylib (compatibility version 0.11.0, current version 0.11.0)"
    ERROR:  using QSet("/Users/tourlou3/Qt5.5.0/5.5/clang_64/lib")
    ERROR: Cannot resolve rpath "libsfml-audio.2.3.dylib (compatibility version 2.3.0, current version 2.3.0)"
    ERROR:  using QSet("/Users/tourlou3/Qt5.5.0/5.5/clang_64/lib")
    ERROR: no file at "/opt/local/lib/mysql55/mysql/libmysqlclient.18.dylib"
    ERROR: no file at "/usr/local/lib/libpq.5.dylib"
    

    Definitely seem to be a conflict problem with RPATH from Qt Frameworks and my custom frameworks


  • Lifetime Qt Champion

    Can you try with Qt 5.5.1 ?

    Looks to work correctly



  • @SGaist

    Im on 5.5.0, was looking to try and download back 5.4.2 as this seems an issue with 5.5
    Where do you get 5.5.1 if I may ask?
    Thanks!


  • Lifetime Qt Champion

    Sure you may ;)

    5.5.1 snapshots



  • Ok downloading "qt-opensource-mac-x64-clang-5.5.1_2015-08-18_09-49-12-121.dmg" ATM
    WIll post back results!



  • Installing now, do you think it's okay to use 5.5.1 for production?
    If not, I will try with 5.4.2 to see if I have the same problem.
    need to recompile a few libs.. qwt, etc. and will post results to see if 5.5.0 is the problem



  • Same thing with 5.5.1, Qt Frameworks not copied in my bundle /Frameworks directory
    Going to try with 5.4.2 now.

    tourlou3s-Mac-2:~ tourlou3$ ./Qt5.5.1/5.5/clang_64/bin/macdeployqt /Users/tourlou3/build-PowerVelo2-Desktop_Qt_5_5_0_clang_64bit-Release/MaximumTrainer.app/
    ERROR: Unexpected prefix "@executable_path"
    ERROR: Unexpected prefix "@executable_path"
    ERROR: Unexpected prefix "@executable_path"



  • OK I can confirm, something happened with macdeployqt between version 5.4.2 and 5.5

    I can use macdeployqt fine with 5.4.2!
    tourlou3s-Mac-2:~ tourlou3$ ./Qt5.4.2/5.4/clang_64/bin/macdeployqt /Users/tourlou3/build-PowerVelo2-Desktop_Qt_5_4_2_clang_64bit-Release/MaximumTrainer.app/
    ERROR: no file at "/opt/local/lib/mysql55/mysql/libmysqlclient.18.dylib"
    ERROR: no file at "/usr/local/lib/libpq.5.dylib"
    tourlou3s-Mac-2:~ tourlou3$

    problem with 5.5.0 + seems to be with @executable_path that crash macdeployqt and stop the rest of the job that it should do. (not coping Qt Frameworks, etc.)
    So i'm staying on 5.4.2 for the OSX version, I'm bad with install_name_tools and depend on macdeployqt for deployment!
    Hopefully they can figure what happened in 5.5.0 and fix this bug



  • Want me to open a bug tracker somewhere for this?
    Is it possible to use an older version of macdeployqt with 5.0.0?
    Thanks SGaist!


  • Lifetime Qt Champion

    The frameworks are now deployed with @rpath rather than @executable_path but it should not crash so yes please open a report



  • Thank you..
    Posted there
    Will wait to use 5.5.0 + on OSX for now.


  • Lifetime Qt Champion

    5.6 might be a better jump in your case


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.