Dyld: Library not loaded: .../lib/QtQuick.framework/Versions/5/QtQuick Reason: image not found
-
I have a problem running a compiled executable in Qt. The sources built fine, but when the executable is run, I got this error:
@dyld: Library not loaded: /work/build/PADDING/lib/QtQuick.framework/Versions/5/QtQuick
Referenced from: /Users/recondev/Butterfly/software-rnd/cpp/OpenCL/build-ComputePipeline-Desktop_Qt_5_2_1_clang_64bit-Debug/libBNI.Qml.1.dylib
Reason: image not found
The program has unexpectedly finished.I saw another post discussing a similar problem where the problem was fixed by reinstalling Qt.
I reinstalled Qt, but nothing seems to change.
FWIW, I also ran otool -L ComputePipeline and got this output:
otool -L ComputePipeline
ComputePipeline:
/System/Library/Frameworks/OpenCL.framework/Versions/A/OpenCL (compatibility version 1.0.0, current version 1.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 169.3.0)
/usr/local/lib/libboost_log-mt.dylib (compatibility version 0.0.0, current version 0.0.0)
/usr/local/lib/libboost_log_setup-mt.dylib (compatibility version 0.0.0, current version 0.0.0)
/usr/local/lib/libboost_system-mt.dylib (compatibility version 0.0.0, current version 0.0.0)
/usr/local/lib/libboost_chrono-mt.dylib (compatibility version 0.0.0, current version 0.0.0)
/usr/local/lib/libboost_regex-mt.dylib (compatibility version 0.0.0, current version 0.0.0)
libBNI.Core.1.dylib (compatibility version 1.0.0, current version 1.0.0)
libBNI.Qml.1.dylib (compatibility version 1.0.0, current version 1.0.0)
libBNI.Application.1.dylib (compatibility version 1.0.0, current version 1.0.0)
/work/build/PADDING/lib/QtQuick.framework/Versions/5/QtQuick (compatibility version 5.2.0, current version 5.2.1)
/work/build/PADDING/lib/QtQml.framework/Versions/5/QtQml (compatibility version 5.2.0, current version 5.2.1)
/work/build/PADDING/lib/QtNetwork.framework/Versions/5/QtNetwork (compatibility version 5.2.0, current version 5.2.1)
/work/build/PADDING/lib/QtCore.framework/Versions/5/QtCore (compatibility version 5.2.0, current version 5.2.1)
/work/build/PADDING/lib/QtGui.framework/Versions/5/QtGui (compatibility version 5.2.0, current version 5.2.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 65.1.0)In checking preference->build&run->Qt Versions->Qt 5.2.1... (Auto-detected)
QT_INSTALL_LIBS is set to /Users/recondev/Qt/5.2.1/clang 64/lib which directs me to the correct libraries.Could someone please explain what the error is related and how it can be fixed?
Thanks in advance.
-
Thanks for your help, hskoglund. It is an interesting question.
I do not have any antivirus app on my Macbook Pro running Mavericks.
Yes, I installed in my home directory. However, I installed Qt in a user account that does not have admin privilege. Would this be a permission issue?
-
Hmmm, no I did the same, installed Qt in my home directory as a normal user.
Sorry I have no direct solution, but if you've tried Qt's online installer perhaps you could try the "offline" installer, i.e. download the 453 MB .dmg (or the other way around).
EDIT: I see you have 5.2.1 perhaps also try upgrading to 5.3.1...
-
Thanks.
FWIW, I tried to use install_name_tool to directly specify the path. The QtQuick is certainly in the right location and install_name_tool seemed to accept to change it, but otool -L executable still returns the path with _PADDING while a bunch of other libraries such as QtQml now get probably linked. I pasted the outputs below.
/usr/bin/install_name_tool -id /work/build/PADDING/lib/QtQuick.framework/Versions/5/QtQuick /Users/recondev/Qt/5.2.1/clang_64/lib/QtQuick.framework/Versions/5/QtQuick
[recondev@Kerkils-MacBook-Pro:@~/Butterfly/software-rnd/cpp/OpenCL/build-ComputePipeline-Desktop_Qt_5_2_1_clang_64bit-Debug] 522$ otool -L ComputePipeline
ComputePipeline:
/System/Library/Frameworks/OpenCL.framework/Versions/A/OpenCL (compatibility version 1.0.0, current version 1.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 169.3.0)
/usr/local/lib/libboost_log-mt.dylib (compatibility version 0.0.0, current version 0.0.0)
/usr/local/lib/libboost_log_setup-mt.dylib (compatibility version 0.0.0, current version 0.0.0)
/usr/local/lib/libboost_system-mt.dylib (compatibility version 0.0.0, current version 0.0.0)
/usr/local/lib/libboost_chrono-mt.dylib (compatibility version 0.0.0, current version 0.0.0)
/usr/local/lib/libboost_regex-mt.dylib (compatibility version 0.0.0, current version 0.0.0)
libBNI.Core.1.dylib (compatibility version 1.0.0, current version 1.0.0)
libBNI.Qml.1.dylib (compatibility version 1.0.0, current version 1.0.0)
libBNI.Application.1.dylib (compatibility version 1.0.0, current version 1.0.0)
/work/build/PADDING/lib/QtQuick.framework/Versions/5/QtQuick (compatibility version 5.2.0, current version 5.2.1)
/Users/recondev/Qt/5.2.1/clang_64/lib/QtQml.framework/Versions/5/QtQml (compatibility version 5.2.0, current version 5.2.1)
/Users/recondev/Qt/5.2.1/clang_64/lib/QtNetwork.framework/Versions/5/QtNetwork (compatibility version 5.2.0, current version 5.2.1)
/Users/recondev/Qt/5.2.1/clang_64/lib/QtCore.framework/Versions/5/QtCore (compatibility version 5.2.0, current version 5.2.1)
/Users/recondev/Qt/5.2.1/clang_64/lib/QtGui.framework/Versions/5/QtGui (compatibility version 5.2.0, current version 5.2.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 65.1.0)
-
Yeah indeed see some libraries are correct.
One way to solve this, which you've already started by doing install_name_tool -id on QtQuick, is to reapply more of those failed "install_name_tool -id xxx" that the Qt installer tried. You can see all of them if you open the InstallationLog.txt file, it's in the main Qt directory.
EDIT: the file is quite big, you can search for "install_name_tool", "-id"
-
Hi,
It generally is the result of either installing Qt before having Xcode installed, or install_name_tool not being found for some reason