Details
-
Bug
-
Resolution: Out of scope
-
P4: Low
-
None
-
4.8.0
-
None
-
Mac OS X 10.6.8
Description
The Qt 4.8.0 libraries that get installed in /Library/Frameworks (from this link: http://get.qt.nokia.com/qt/source/qt-mac-opensource-4.8.0.dmg) don't work w/ install_name_tool in order to include them with the app bundle to be deployed to a system that doesn't have Qt (or might have a different version of Qt installed).
% cd /Library/Frameworks/
% otool -L QtGui.framework/Versions/4/QtGui
QtGui.framework/Versions/4/QtGui:
QtGui.framework/Versions/4/QtGui (compatibility version 4.8.0, current version 4.8.0)
QtCore.framework/Versions/4/QtCore (compatibility version 4.8.0, current version 4.8.0)
/System/Library/Frameworks/Carbon.framework/Versions/A/Carbon (compatibility version 2.0.0, current version 153.0.0)
/usr/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.5)
/System/Library/Frameworks/AppKit.framework/Versions/C/AppKit (compatibility version 45.0.0, current version 1138.0.0)
/usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 52.0.0)
/usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 1105.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 159.0.0)
/usr/lib/libobjc.A.dylib (compatibility version 1.0.0, current version 228.0.0)
/System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices (compatibility version 1.0.0, current version 53.0.0)
/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 635.0.0)
/System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices (compatibility version 1.0.0, current version 41.0.0)
/System/Library/Frameworks/Foundation.framework/Versions/C/Foundation (compatibility version 300.0.0, current version 833.1.0)
Notice that there's no path in front of the QtGui.framework and QtCore.Framework entries. Stands out even more for phonon:
% otool -L phonon.framework/Versions/4/phonon
phonon.framework/Versions/4/phonon:
phonon.framework/Versions/4/phonon (compatibility version 4.4.0, current version 4.4.0)
QtDBus.framework/Versions/4/QtDBus (compatibility version 4.8.0, current version 4.8.0)
QtXml.framework/Versions/4/QtXml (compatibility version 4.8.0, current version 4.8.0)
QtCore.framework/Versions/4/QtCore (compatibility version 4.8.0, current version 4.8.0)
QtGui.framework/Versions/4/QtGui (compatibility version 4.8.0, current version 4.8.0)
/usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 52.0.0)
/usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 1105.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 159.0.0)
These frameworks seem to work fine when they remain in /Library/Frameworks, but if one wishes to bundle the application's required frameworks into the app bundle, say in <app_name>.app/Contents/Frameworks/ and use install_name_tool to tell the dynamic linker where to find them, problems arise:
% install_name_tool -id @executable_path/../QtGui.framework/Versions/4/QtGui QtGui.framework/Versions/4/QtGui
install_name_tool: object: QtGui.framework/Versions/4/QtGui malformed object (unknown load command 7)
Using otool -l to list the dynamic linker load commands:
% otool -l QtGui.framework/Versions/4/QtGui
(snip)
Load command 7
cmd ?(0x00000024) Unknown load command
cmdsize 16
000a0500 00000000
(snip)
Load command 20
cmd ?(0x00000026) Unknown load command
cmdsize 16
00a416e8 00008658
I've also got the Qt 4.8 source, and the Qt SDK. For the frameworks that are included with the Qt SDK, they don't have these problems w/ install name tool, nor do they have the unknown load commands. But they're not located in /Library/Frameworks so I have difficulty getting them to be picked up by gcc... And when I manually copy those SDK versions of the Qt frameworks to my application bundles Frameworks directory and use install_name_tool to identify them/load them from that location, the app crashes at startup.
Ideas, help, updates? Thanks for reading!