Error trying to deploy a Qt application
-
Hello, I'm trying to deploy a Qt application using the command:
macdeployqt MyApp.app -dmg
but I'm getting the following error message:
ERROR: no file at "/Library/Frameworks/qwt.framework/Versions/6/qwt"
I copied manually the folder from /usr/local/qwt-6.1.0/lib/qwt.framework to the Libary/Frameworks folder, based on this answer.
I'm new on OS X and Qt, and I am very confused about what is happening.
Thanks
-
Thanks for the help.
Ok, I tried the verbose switch and this generated a huge log that can be seen here: https://www.dropbox.com/s/yipy3v7pidf575k/log.txt?dl=0
I don't quite understand this log, but I saw that the error message is still displayed (line126).
I think the
macdeployqt
command is not finding the Qwt framework, and because of this the application breaks to start, but I'm not sure if this is the problem. -
Looking at the log, all the Install name ".. file names are identical to to the filenames in Source file Path 2 lines below, except for that qwt library.
To fix so that it looks the same as the others, and make macdeployqt happy, you need to run install_name_tool on it, try:
install_name_tool -change qwt.framework/Versions/6/qwt /Library/Frameworks/qwt.framework/Versions/6/qwt /Library/Frameworks/qwt.framework/Versions/6/qwt
The idea is to fixup qwt's reference to itself, hope this helps :-)
-
I ran the command:
install_name_tool -change qwt.framework/Versions/6/qwt /Library/Frameworks/qwt.framework/Versions/6/qwt /Library/Frameworks/qwt.framework/Versions/6/qwt
and receive the following error message:
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/install_name_tool: can't open file: /Library/Frameworks/qwt.framework/Versions/6/qwt (No such file or directory)
I'm trying to figure out what is happening.
Thanks
-
Ok nice try :-) At least that error message agrees with what macdeployqt complains about.
It's tricky with OSX's habit of specifying not just the names of the DLLs but also the paths to them.Suggestion: start with using the otool -L command on your app's .EXE file, there you'll see the .DLLs/dylibs/frameworks it wants.
Then use that otool -L command again on each of those DLLs/dylib/frameworks your app's .EXE wants and check that the 1st line of the output for each one shows the same path as the file itself. (That was the problem with the Qwt library in your log.)
-
Hi and welcome to devnet,
Where is your Qwt framework exactly located ?
-
Thank you @hskoglund, I will try to use the otool -L command (I never used it before).
As I said, I'm new on OS X. I started to use the OS X two weeks ago and I don't know the tricks yet (I was a Windows user :-( ).
Thanks for the welcome @SGaist.
I have the Qwt located at:
/usr/local/qwt-6.1.0/
And I copied manually the entire qwt.framework folder from/usr/local/qwt-6.1.0/lib/
toLibrary/Frameworks/
-
I finally found the solution. I had copied the qwt.framework folder to the wrong directory.
I had copied the qwt.framework folder to the
/Users/kelvinsp/Library/Frameworks/
directory and I should have copied to the/System/Library/Frameworks/
.I just copied the qwt.framework folder to the correct directory (
/System/Library/Frameworks/
) and everything ran like a charm.Thanks a lot for your help and sorry for waste your time.