Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Incompatible library version: qwt requires version 5.10.0 or later



  • Hello,

    I'm trying to deploy my application on Mac OS X El Capitan (10.11.6) using macdeployqt. I have compiled qwt with QT 5.6.3.
    When I run my QT Creator compiled application, I can run it sucessfully.
    But when I run the macdeployqt'd version, I get an error about incompatibility between qwt and QtPrintSupport.
    I have run dtruss and here are both logs relating to QtPrintSupport.

    macdeployqt executable:

    dyld: Library not loaded: @rpath/QtPrintSupport.framework/Versions/5/QtPrintSupport
      Reason: Incompatible library version: qwt requires version 5.10.0 or later, but QtPrintSupport provides version 5.6.0
    stat64("/Users/Cd/Deploy/as-1_0_7_3/20180828182047_44CC0DC2-8FCC-4152-8695-7AE08FCFF29A/release/AS.app/Contents/MacOS/../Frameworks/QtPrintSupport.framework/Versions/5/QtPrintSupport\0", 0x7FFF5D626B48, 0x7FFF5D624D68)		 = 0 0
    open("/Users/Cd/Deploy/as-1_0_7_3/20180828182047_44CC0DC2-8FCC-4152-8695-7AE08FCFF29A/release/AS.app/Contents/MacOS/../Frameworks/QtPrintSupport.framework/Versions/5/QtPrintSupport\0", 0x0, 0x0)		 = 3 0
    write(0x2, "/QtPrintSupport.framework/Versio\0", 0x20)		 = 32 0
    write(0x2, "ns/5/QtPrintSupport\n  Referenced\0", 0x20)		 = 32 0
    

    qt creator executable:

    stat64("/Users/Cd/Qt/5.6.3/clang_64/lib/QtPrintSupport.framework/Versions/5/QtPrintSupport\0", 0x7FFF5DDBCBB8, 0x7FFF5DDBAE58)		 = 0 0
    open("/Users/Cd/Qt/5.6.3/clang_64/lib/QtPrintSupport.framework/Versions/5/QtPrintSupport\0", 0x0, 0x0)		 = 3 0
    getattrlist("/Users/Cd/Qt/5.6.3/clang_64/lib/QtPrintSupport.framework\0", 0x7FFF64494154, 0x7FFF5DDBC980)		 = 0 0
    getattrlist("/Users/Cd/Qt/5.6.3/clang_64/lib/QtPrintSupport.framework/Versions\0", 0x7FFF64494154, 0x7FFF5DDBC980)		 = 0 0
    getattrlist("/Users/Cd/Qt/5.6.3/clang_64/lib/QtPrintSupport.framework/Versions/5\0", 0x7FFF64494154, 0x7FFF5DDBC980)		 = 0 0
    getattrlist("/Users/Cd/Qt/5.6.3/clang_64/lib/QtPrintSupport.framework/Versions/5/QtPrintSupport\0", 0x7FFF64494154, 0x7FFF5DDBC980)		 = 0 0
    stat64("/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/PrintCore.framework/Versions/A/PrintCore\0", 0x7FFF5DDBB8F8, 0x2)		 = 0 0
    stat64("/System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/Print.framework/Versions/A/Print\0", 0x7FFF5DDBC098, 0x7FFF5DDB9C18)		 = 0 0
    

    Here is my macdeployqt command line:

    /Users/Cd/Qt/5.6.3/clang_64/bin/macdeployqt /Users/Cd/Deploy/as-1_0_7_3/20180828182047_44CC0DC2-8FCC-4152-8695-7AE08FCFF29A/build/AS.app -always-overwrite -dmg
    ERROR: no file at "/opt/local/lib/mysql55/mysql/libmysqlclient.18.dylib"
    ERROR: no file at "/usr/local/lib/libpq.5.dylib"
    WARNING: Plugin "libqsqlodbc.dylib" uses private API and is not Mac App store compliant.
    WARNING: Plugin "libqsqlpsql.dylib" uses private API and is not Mac App store compliant.
    ERROR: no file at "/opt/local/lib/mysql55/mysql/libmysqlclient.18.dylib"
    ERROR: no file at "/usr/local/lib/libpq.5.dylib"
    

    Any idea why the difference between the executables?

    Thanks,


  • Lifetime Qt Champion

    Hi and welcome to devnet,

    From the looks of it, you rather have compiled Qwt with Qt 5.10.

    What do you get if your run otool -L against your Qwt library ?



  • Hi!

    I have run otool -L against my macdeployqt'd executable qwt library, and the installed qwt libraries:

    deployed:

    /Users/Cd/Deploy/as-1_0_7_3/20180828182047_44CC0DC2-8FCC-4152-8695-7AE08FCFF29A/release/AS.app/Contents/Frameworks/qwt.framework/qwt:
    	@executable_path/../Frameworks/qwt.framework/Versions/6/qwt (compatibility version 6.1.0, current version 6.1.3)
    	@rpath/QtPrintSupport.framework/Versions/5/QtPrintSupport (compatibility version 5.10.0, current version 5.10.1)
    	@rpath/QtWidgets.framework/Versions/5/QtWidgets (compatibility version 5.10.0, current version 5.10.1)
    	@rpath/QtGui.framework/Versions/5/QtGui (compatibility version 5.10.0, current version 5.10.1)
    	@rpath/QtCore.framework/Versions/5/QtCore (compatibility version 5.10.0, current version 5.10.1)
    	/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/QtSvg.framework/Versions/5/QtSvg (compatibility version 5.10.0, current version 5.10.1)
    	@rpath/QtOpenGL.framework/Versions/5/QtOpenGL (compatibility version 5.10.0, current version 5.10.1)
    	@rpath/QtConcurrent.framework/Versions/5/QtConcurrent (compatibility version 5.10.0, current version 5.10.1)
    	/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/libc++.1.dylib (compatibility version 1.0.0, current version 120.1.0)
    	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1226.10.1)
    

    Library/Frameworks:

    /Library/Frameworks/qwt.framework/qwt:
    	qwt.framework/Versions/6/qwt (compatibility version 6.1.0, current version 6.1.3)
    	@rpath/QtPrintSupport.framework/Versions/5/QtPrintSupport (compatibility version 5.6.0, current version 5.6.3)
    	@rpath/QtWidgets.framework/Versions/5/QtWidgets (compatibility version 5.6.0, current version 5.6.3)
    	@rpath/QtGui.framework/Versions/5/QtGui (compatibility version 5.6.0, current version 5.6.3)
    	@rpath/QtCore.framework/Versions/5/QtCore (compatibility version 5.6.0, current version 5.6.3)
    	/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/QtSvg.framework/Versions/5/QtSvg (compatibility version 5.6.0, current version 5.6.3)
    	@rpath/QtOpenGL.framework/Versions/5/QtOpenGL (compatibility version 5.6.0, current version 5.6.3)
    	@rpath/QtConcurrent.framework/Versions/5/QtConcurrent (compatibility version 5.6.0, current version 5.6.3)
    	/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/libc++.1.dylib (compatibility version 1.0.0, current version 120.1.0)
    	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1226.10.1)
    

    usr/local:

    /usr/local/qwt-6.1.3/lib/qwt.framework/qwt:
    	qwt.framework/Versions/6/qwt (compatibility version 6.1.0, current version 6.1.3)
    	@rpath/QtPrintSupport.framework/Versions/5/QtPrintSupport (compatibility version 5.6.0, current version 5.6.3)
    	@rpath/QtWidgets.framework/Versions/5/QtWidgets (compatibility version 5.6.0, current version 5.6.3)
    	@rpath/QtGui.framework/Versions/5/QtGui (compatibility version 5.6.0, current version 5.6.3)
    	@rpath/QtCore.framework/Versions/5/QtCore (compatibility version 5.6.0, current version 5.6.3)
    	/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/QtSvg.framework/Versions/5/QtSvg (compatibility version 5.6.0, current version 5.6.3)
    	@rpath/QtOpenGL.framework/Versions/5/QtOpenGL (compatibility version 5.6.0, current version 5.6.3)
    	@rpath/QtConcurrent.framework/Versions/5/QtConcurrent (compatibility version 5.6.0, current version 5.6.3)
    	/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/libc++.1.dylib (compatibility version 1.0.0, current version 120.1.0)
    	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1226.10.1)
    

    It seems to me the macdeployqt'd executable might being linked against the qwt compiled with QT 5.10.1 (which I also have on the system). I think the 5.6.3 library is being pointed to by default in the system. Any clues how macdeployqt finds the libraries?

    Thanks,



  • I could fix the issue I was having. I re-compiled my application on QT Creator (maybe I hadn't updated my paths to qwt in /Library/Frameworks and /usr/local after compiling qwt and re-compiling my application the last time). Then macdeployqt informed me about not finding:

    ERROR: no file at "/Library/Frameworks/qwt.framework/Versions/6/qwt.framework/Versions/6/qwt"

    So I assume previously macdeployqt was not copying qwt into the bundle and then the linker found an incorrect version at execution time. So I placed the correct lib in that path, re-run macdeployqt and now the application works.

    The path seems peculiar, as it seems the path searched maybe should be

    "/Library/Frameworks/qwt.framework/Versions/6/qwt"

    Where I already had it; maybe, if this is a bug, it is fixed in later versions of QT.

    Thanks for the help!



  • @Pedro-O-S if your issue is solved, please don't forget to mark your post as such. Thanks


Log in to reply