The "unknown load command" is because who ever built the Qt libraries did not 
set the Deployment Target to 10.5. Which is causing the failure. Also printed 
on the Download page for Qt (qt-project.org) is the following under the system 
requirements.

------
64-bit Apple Mac OS X 10.6 or later with xCode
------

So clearly from the Qt project page your system is NOT supported. You can 
either try to work with Qt 4.7.4 on OS X 10.5 OR upgrade your system to OS X 
10.6.8. Your Choice but your current combination of Qt 4.8 and OS X 10.5 will 
NOT work together.
___________________________________________________________
Mike Jackson                    Principal Software Engineer
BlueQuartz Software                            Dayton, Ohio
mike.jack...@bluequartz.net              www.bluequartz.net

On Apr 13, 2012, at 4:15 AM, Carlo Nicolini wrote:

> Hi,
> 
> I wrote a Qt application with cmake building procedure for my OSX 10.5.8 + Qt 
> 4.8 system.
> I must build it with 
> set(CMAKE_OSX_ARCHITECTURES x86_64)
> 
> in order to correctly link Qt libraries.
> When I move my Foo.app bundle on another computer I can't get it to work.
> I get
> 
> dyld: Library not loaded QtCore.framework/Versions/4/QtCore
> Reason not suitable image found. Did find:
>     /Library/Frameworks/QtCore.frameworks/Versions/4/QtCore: mach-o but wrong 
> architecture
> 
> The very same thing appears conversely when from a OSX 10.5.8 system with Qt 
> 4.6.3 I move the application bundle to my system.
> 
> I installed Qt from QtSDK installer.
> 
> In order to understand if something is wrong in my CMakeLists.txt I used the 
> example QtTest.zip documented at 
> http://www.cmake.org/Wiki/BundleUtilitiesExample
> 
> After I set as always CMAKE_OSX_ARCHITECTURES to x86_64 (don't know why 
> because I didn't speficied anything during Qt installation but it appears 
> that I only have 64 bit version of it), I compiled it as usual
> cmake .
> make
> 
> and then 
> cpack -G DragNDrop CPackConfig.cmake
> 
> in order to create a package with hopefully all its dependencies, but I got 
> the following errors
> 
> CPack: Create package using DragNDrop
> CPack: Install projects
> CPack: - Run preinstall target for: QtTest
> CPack: - Install project: QtTest
> install_name_tool: object: 
> /Users/rs/Downloads/QtTest/_CPack_Packages/Darwin/DragNDrop/QtTest-0.1.1-Darwin/QtTest.app/Contents/MacOS/plugins/imageformats/libqgif.dylib
>  malformed object (unknown load command 5)
> install_name_tool: object: 
> /Users/rs/Downloads/QtTest/_CPack_Packages/Darwin/DragNDrop/QtTest-0.1.1-Darwin/QtTest.app/Contents/Frameworks/QtCore.framework/Versions/4/QtCore
>  malformed object (unknown load command 5)
> install_name_tool: object: 
> /Users/rs/Downloads/QtTest/_CPack_Packages/Darwin/DragNDrop/QtTest-0.1.1-Darwin/QtTest.app/Contents/Frameworks/QtGui.framework/Versions/4/QtGui
>  malformed object (unknown load command 5)
> install_name_tool: object: 
> /Users/rs/Downloads/QtTest/_CPack_Packages/Darwin/DragNDrop/QtTest-0.1.1-Darwin/QtTest.app/Contents/MacOS/plugins/imageformats/libqgif_debug.dylib
>  malformed object (unknown load command 5)
> install_name_tool: object: 
> /Users/rs/Downloads/QtTest/_CPack_Packages/Darwin/DragNDrop/QtTest-0.1.1-Darwin/QtTest.app/Contents/MacOS/plugins/imageformats/libqico.dylib
>  malformed object (unknown load command 5)
> install_name_tool: object: 
> /Users/rs/Downloads/QtTest/_CPack_Packages/Darwin/DragNDrop/QtTest-0.1.1-Darwin/QtTest.app/Contents/MacOS/plugins/imageformats/libqico_debug.dylib
>  malformed object (unknown load command 5)
> install_name_tool: object: 
> /Users/rs/Downloads/QtTest/_CPack_Packages/Darwin/DragNDrop/QtTest-0.1.1-Darwin/QtTest.app/Contents/MacOS/plugins/imageformats/libqjpeg.dylib
>  malformed object (unknown load command 5)
> install_name_tool: object: 
> /Users/rs/Downloads/QtTest/_CPack_Packages/Darwin/DragNDrop/QtTest-0.1.1-Darwin/QtTest.app/Contents/MacOS/plugins/imageformats/libqjpeg_debug.dylib
>  malformed object (unknown load command 5)
> install_name_tool: object: 
> /Users/rs/Downloads/QtTest/_CPack_Packages/Darwin/DragNDrop/QtTest-0.1.1-Darwin/QtTest.app/Contents/MacOS/plugins/imageformats/libqmng.dylib
>  malformed object (unknown load command 5)
> install_name_tool: object: 
> /Users/rs/Downloads/QtTest/_CPack_Packages/Darwin/DragNDrop/QtTest-0.1.1-Darwin/QtTest.app/Contents/MacOS/plugins/imageformats/libqmng_debug.dylib
>  malformed object (unknown load command 5)
> install_name_tool: object: 
> /Users/rs/Downloads/QtTest/_CPack_Packages/Darwin/DragNDrop/QtTest-0.1.1-Darwin/QtTest.app/Contents/MacOS/plugins/imageformats/libqsvg.dylib
>  malformed object (unknown load command 5)
> install_name_tool: object: 
> /Users/rs/Downloads/QtTest/_CPack_Packages/Darwin/DragNDrop/QtTest-0.1.1-Darwin/QtTest.app/Contents/Frameworks/QtSvg.framework/Versions/4/QtSvg
>  malformed object (unknown load command 5)
> install_name_tool: object: 
> /Users/rs/Downloads/QtTest/_CPack_Packages/Darwin/DragNDrop/QtTest-0.1.1-Darwin/QtTest.app/Contents/Frameworks/QtXml.framework/Versions/4/QtXml
>  malformed object (unknown load command 5)
> install_name_tool: object: 
> /Users/rs/Downloads/QtTest/_CPack_Packages/Darwin/DragNDrop/QtTest-0.1.1-Darwin/QtTest.app/Contents/MacOS/plugins/imageformats/libqsvg_debug.dylib
>  malformed object (unknown load command 5)
> install_name_tool: object: 
> /Users/rs/Downloads/QtTest/_CPack_Packages/Darwin/DragNDrop/QtTest-0.1.1-Darwin/QtTest.app/Contents/MacOS/plugins/imageformats/libqtga.dylib
>  malformed object (unknown load command 5)
> install_name_tool: object: 
> /Users/rs/Downloads/QtTest/_CPack_Packages/Darwin/DragNDrop/QtTest-0.1.1-Darwin/QtTest.app/Contents/MacOS/plugins/imageformats/libqtga_debug.dylib
>  malformed object (unknown load command 5)
> install_name_tool: object: 
> /Users/rs/Downloads/QtTest/_CPack_Packages/Darwin/DragNDrop/QtTest-0.1.1-Darwin/QtTest.app/Contents/MacOS/plugins/imageformats/libqtiff.dylib
>  malformed object (unknown load command 5)
> install_name_tool: object: 
> /Users/rs/Downloads/QtTest/_CPack_Packages/Darwin/DragNDrop/QtTest-0.1.1-Darwin/QtTest.app/Contents/MacOS/plugins/imageformats/libqtiff_debug.dylib
>  malformed object (unknown load command 5)
> CMake Error at /Applications/CMake 
> 2.8-7.app/Contents/share/cmake-2.8/Modules/BundleUtilities.cmake:784 
> (message):
>   error: verify_app failed
> Call Stack (most recent call first):
>   /Applications/CMake 
> 2.8-7.app/Contents/share/cmake-2.8/Modules/BundleUtilities.cmake:666 
> (verify_app)
>   /Users/rs/Downloads/QtTest/cmake_install.cmake:49 (fixup_bundle)
> CPack Error: Error when generating package: QtTest
> 
> 
> Now I would like to understand how is possible (if it is) to deploy a Qt 
> application with cmake
> 
> INFO
> cmake version 2.8.7
> OSX 10.5.8
> Qt 4.8.1
> 
> Thanks for your support!
> 
> 
> -- 
> Carlo Nicolini
> LION Laboratory (Machine Learning and Intelligent Optimization)
> DISI - Dipartimento di Scienza ed Ingegneria dell'Informazione
> Universita' di Trento
> Via Sommarive, 14
> 38100 Trento (Italy)
> ......................................................................
> web sites:
> http://disi.unitn.it/~nicolini/ - personal
> http://www.intelligent-optimization.org/
> http://www.reactive-search.org/
> 
> --
> 
> Powered by www.kitware.com
> 
> Visit other Kitware open-source projects at 
> http://www.kitware.com/opensource/opensource.html
> 
> Please keep messages on-topic and check the CMake FAQ at: 
> http://www.cmake.org/Wiki/CMake_FAQ
> 
> Follow this link to subscribe/unsubscribe:
> http://www.cmake.org/mailman/listinfo/cmake

--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to