[cmake-developers] [CMake 0014365]: CMake With Qt5 QtDialog Installs Broken App Bundle

Mantis Bug Tracker mantis at public.kitware.com
Sat Aug 17 02:33:36 EDT 2013


The following issue has been SUBMITTED. 
====================================================================== 
http://www.cmake.org/Bug/view.php?id=14365 
====================================================================== 
Reported By:                natrium1970
Assigned To:                
====================================================================== 
Project:                    CMake
Issue ID:                   14365
Category:                   QtDialog
Reproducibility:            always
Severity:                   crash
Priority:                   normal
Status:                     new
====================================================================== 
Date Submitted:             2013-08-17 02:33 EDT
Last Modified:              2013-08-17 02:33 EDT
====================================================================== 
Summary:                    CMake With Qt5 QtDialog Installs Broken App Bundle
Description: 
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.


Steps to Reproduce: 
1. Build CMake with QtWidgets enabled with Qt 5.x.
2. Run "make install".
3. Attempt to launch the newly installed CMake app.

Additional Information: 
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.
====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2013-08-17 02:33 natrium1970    New Issue                                    
2013-08-17 02:33 natrium1970    File Added: cmake-load.txt                    
======================================================================




More information about the cmake-developers mailing list