[Qt-interest] Linking Framework app on Mac with install_name_tool
Stan Warford
Stan.Warford at pepperdine.edu
Wed Jun 22 17:24:01 CEST 2011
Hello all,
I am trying to deploy a desktop app using Frameworks as described in the Qt documentation. I am using Qt Creator 2.2.0 based on Qt 4.7.4 (64 bit). I use otool to check for dependencies, copy the frameworks into the app bundle, use install_name_tool to change the references, then do a final check with otool. Although everything appears correct, the app crashes, and I am at a loss as to how to debug the problem. My terminal session is included below.
I tried doing this with macdeployqt, but it is known to be broken with this (latest) release of Qt SDK.
Thanks for any help you can give.
Stan
Stan-Warfords-iMac:pep8cpu warford$ otool -L pep8cpu.app/Contents/MacOS/pep8cpu
pep8cpu.app/Contents/MacOS/pep8cpu:
/Users/warford/QtSDK/Desktop/Qt/473/gcc/lib/QtWebKit.framework/Versions/Current/QtWebKit (compatibility version 4.7.0, current version 4.7.3)
/Users/warford/QtSDK/Desktop/Qt/473/gcc/lib/QtGui.framework/Versions/Current/QtGui (compatibility version 4.7.0, current version 4.7.3)
/Users/warford/QtSDK/Desktop/Qt/473/gcc/lib/QtCore.framework/Versions/Current/QtCore (compatibility version 4.7.0, current version 4.7.3)
/usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 7.9.0)
/usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 625.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 125.2.10)
Stan-Warfords-iMac:pep8cpu warford$ ls pep8cpu.app/
Contents
Stan-Warfords-iMac:pep8cpu warford$ ls pep8cpu.app/Contents/
Info.plist MacOS PkgInfo Resources
Stan-Warfords-iMac:pep8cpu warford$ mkdir pep8cpu.app/Contents/Frameworks
Stan-Warfords-iMac:pep8cpu warford$ ls pep8cpu.app/Contents/
Frameworks Info.plist MacOS PkgInfo Resources
Stan-Warfords-iMac:pep8cpu warford$ cp -R /Users/warford/QtSDK/Desktop/Qt/473/gcc/lib/QtWebKit.framework pep8cpu.app/Contents/Frameworks
Stan-Warfords-iMac:pep8cpu warford$ cp -R /Users/warford/QtSDK/Desktop/Qt/473/gcc/lib/QtGui.framework pep8cpu.app/Contents/Frameworks
Stan-Warfords-iMac:pep8cpu warford$ cp -R /Users/warford/QtSDK/Desktop/Qt/473/gcc/lib/QtCore.framework pep8cpu.app/Contents/Frameworks
Stan-Warfords-iMac:pep8cpu warford$ ls pep8cpu.app/Contents/Frameworks/
QtCore.framework QtGui.framework QtWebKit.framework
Stan-Warfords-iMac:pep8cpu warford$ install_name_tool -id @executable_path/../Frameworks/QtWebKit.framework/Versions/Current/QtWebKit pep8cpu.app/Contents/Frameworks/QtWebKit.framework/Versions/Current/QtWebKit
Stan-Warfords-iMac:pep8cpu warford$ install_name_tool -id @executable_path/../Frameworks/QtGui.framework/Versions/Current/QtGui pep8cpu.app/Contents/Frameworks/QtGui.framework/Versions/Current/QtGui
Stan-Warfords-iMac:pep8cpu warford$ install_name_tool -id @executable_path/../Frameworks/QtCore.framework/Versions/Current/QtCore pep8cpu.app/Contents/Frameworks/QtCore.framework/Versions/Current/QtCore
Stan-Warfords-iMac:pep8cpu warford$ install_name_tool -change /Users/warford/QtSDK/Desktop/Qt/473/gcc/lib/QtWebKit.framework/Versions/Current/QtWebKit @executable_path/../Frameworks/QtWebKit.framework/Versions/Current/QtWebKit pep8cpu.app/Contents/MacOS/pep8cpu
Stan-Warfords-iMac:pep8cpu warford$ install_name_tool -change /Users/warford/QtSDK/Desktop/Qt/473/gcc/lib/QtGui.framework/Versions/Current/QtGui @executable_path/../Frameworks/QtGui.framework/Versions/Current/QtGui pep8cpu.app/Contents/MacOS/pep8cpu
Stan-Warfords-iMac:pep8cpu warford$ install_name_tool -change /Users/warford/QtSDK/Desktop/Qt/473/gcc/lib/QtCore.framework/Versions/Current/QtCore @executable_path/../Frameworks/QtCore.framework/Versions/Current/QtCore pep8cpu.app/Contents/MacOS/pep8cpu
Stan-Warfords-iMac:pep8cpu warford$ install_name_tool -change /Users/warford/QtSDK/Desktop/Qt/473/gcc/lib/QtCore.framework/Versions/Current/QtCore @executable_path/../Frameworks/QtCore.framework/Versions/Current/QtCore pep8cpu.app/Contents/Frameworks/QtGui.framework/Versions/Current/QtGui
Stan-Warfords-iMac:pep8cpu warford$ otool -L pep8cpu.app/Contents/MacOS/pep8cpu
pep8cpu.app/Contents/MacOS/pep8cpu:
@executable_path/../Frameworks/QtWebKit.framework/Versions/Current/QtWebKit (compatibility version 4.7.0, current version 4.7.3)
@executable_path/../Frameworks/QtGui.framework/Versions/Current/QtGui (compatibility version 4.7.0, current version 4.7.3)
@executable_path/../Frameworks/QtCore.framework/Versions/Current/QtCore (compatibility version 4.7.0, current version 4.7.3)
/usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 7.9.0)
/usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 625.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 125.2.10)
Stan-Warfords-iMac:pep8cpu warford$
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20110622/7abf15fa/attachment.html
More information about the Qt-interest-old
mailing list