Problems using macdeployqt : malformed object (unknown load command 8)
-
Hello,
Im trying to deploy a Qt Application on OSx.
After compiling the project using QT Creator and afterwards using macdeployqt it throws an error as followed:@macbookpro:~ seniorrossi$ macdeployqt /Users/seniorrossi/VPNconfig-build-desktop-Desktop_Qt_4_8_1_for_GCC__Qt_SDK__Release/VPNconfig.app
ERROR: "install_name_tool: object: /Users/seniorrossi/VPNconfig-build-desktop-Desktop_Qt_4_8_1_for_GCC__Qt_SDK__Release/VPNconfig.app/Contents/MacOS/VPNconfig malformed object (unknown load command 8)
"
ERROR: ""
ERROR: no file at "/tmp/qt-stuff-85167/source/qt-everywhere-opensource-src-4.8.1/Desktop/Qt/4.8.1/gcc/lib/QtGui.framework/Versions/4/QtGui"
ERROR: "install_name_tool: object: /Users/seniorrossi/VPNconfig-build-desktop-Desktop_Qt_4_8_1_for_GCC__Qt_SDK__Release/VPNconfig.app/Contents/MacOS/VPNconfig malformed object (unknown load command 8)
"
ERROR: ""
ERROR: no file at "/tmp/qt-stuff-85167/source/qt-everywhere-opensource-src-4.8.1/Desktop/Qt/4.8.1/gcc/lib/QtCore.framework/Versions/4/QtCore"
WARNING:
WARNING: "/Users/seniorrossi/FritzVPNconfig-build-desktop-Desktop_Qt_4_8_1_for_GCC__Qt_SDK__Release/VPNconfig.app/Contents/Resources/qt.conf" already exists, will not overwrite.
WARNING: To make sure the plugins are loaded from the correct location,
WARNING: please make sure qt.conf contains the following lines:
WARNING: [Paths]
WARNING: Plugins = PlugIns @I already asked in several areas, but nowhere replies. I hope you can help me as I just got in love with Qt on Win and OSx and I'd like to be able deploying Qt-Apps on OSx.
My environment: OSx 10.7.3, using Qt 4.8.1 and Xcode 4.2.1
Thanks a lot!
Andrew -
this has just hit me now, too. I am looking for a solution, will update if successful.
-
It hit me too. It doesn't work with XCode 3.2.6 build 1761. It does work with build 1760. Something has changed between that two minor versions.
From some googling around, it seems that is is somehow related to -mmacosx-version-min parameters to the linker or something like that. I don't have a solution yet, if I ever have one, I'll update.
-
After some research, it seems that this can be caused by many things. For me, the problem was that the Qt I had was build using a different version of Xcode than the app, and thus "install_name_tool" was having problems (Apple's fault, but we have to live with it). Solution was to recompile Qt using the same Xcode that was later used to build the application. And by "the same" I mean really the same - apparently it has to be done with even the Xcode's minor version number matching exactly (best way - just use the same machine).