MantisBT - CMake
View Issue Details
0014365CMakeQtDialogpublic2013-08-17 02:332016-06-10 14:31
natrium1970 
Kitware Robot 
normalcrashalways
closedmoved 
Mac OS XOS X10.8.4
CMake 2.8.11.2 
 
0014365: CMake With Qt5 QtDialog Installs Broken App Bundle
When CMake is built on Mac OS X with QtDialog enabled, an app bundle is created. When "make install" is run, the build system copies some Qt libraries (frameworks) into the bundle and then uses install_name_tool so that the resulting bundle does not depend on a systemwide installation of Qt. This fix-up process is not completely correct for Qt 5.x, however, because in addition to the Qt libraries, Qt also depends on a platform plugin libqcocoa.dylib. This plugin also needs to be copied into the app bundle and the Qt libraries need to be made aware that they should look inside the app bundle for libqcocoa.dylib instead of searching for the systemwide version.

The result of this installation issues is that CMake.app crashes on startup due to the following sequence of events:
1. The CMake executable loads.
2. Since the executable now depends on the Qt frameworks inside the application bundle, those frameworks are loaded.
3. The Qt frameworks inside the application bundle attempts to load the libqcocoa.dylib from the systemwide installation of Qt (since libqcocoa.dylib has not been properly copied and set up).
4. The libqcocoa.dylib plugin has a dependency on the systemwide copies of the Qt frameworks, so these frameworks are loaded.
5. There are now two copies of the Qt frameworks loaded.
6. Crash.
1. Build CMake with QtWidgets enabled with Qt 5.x.
2. Run "make install".
3. Attempt to launch the newly installed CMake app.
To see the sequence of libraries loaded export DYLD_PRINT_LIBRARIES=1.

I am included the output of launching the application with the dyld print enabled.
No tags attached.
txt cmake-load.txt (50,749) 2013-08-17 02:33
https://public.kitware.com/Bug/file/4856/cmake-load.txt
Issue History
2013-08-17 02:33natrium1970New Issue
2013-08-17 02:33natrium1970File Added: cmake-load.txt
2016-06-10 14:29Kitware RobotNote Added: 0042352
2016-06-10 14:29Kitware RobotStatusnew => resolved
2016-06-10 14:29Kitware RobotResolutionopen => moved
2016-06-10 14:29Kitware RobotAssigned To => Kitware Robot
2016-06-10 14:31Kitware RobotStatusresolved => closed

Notes
(0042352)
Kitware Robot   
2016-06-10 14:29   
Resolving issue as `moved`.

This issue tracker is no longer used. Further discussion of this issue may take place in the current CMake Issues page linked in the banner at the top of this page.