Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-40660

macdeployqt deploys wrong libraries in debug builds

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P3: Somewhat important
    • None
    • 5.3.1
    • None
    • qt is configured with -developer-build -no-framework
    • macOS

    Description

      my application is linked against several qt dylibs. in the debug mode, the _debug.dylibs are linked.

      trying to deploy with macdeployqt, copies the _debug.dylibs, but the plugins compiled in release mode. these plugins then pull in the release dylibs of qt.

      so it generates the following directory structure:

      Contents/
      ├── Frameworks
      │   ├── libQt5Core.5.dylib
      │   ├── libQt5Core_debug.5.dylib
      │   ├── libQt5Gui.5.dylib
      │   ├── libQt5Gui_debug.5.dylib
      │   ├── libQt5Network_debug.5.dylib
      │   ├── libQt5PrintSupport.5.dylib
      │   ├── libQt5Qml_debug.5.dylib
      │   ├── libQt5Quick_debug.5.dylib
      │   └── libQt5Widgets.5.dylib
      [snip]
      ├── PlugIns
      │   ├── imageformats
      │   │   ├── libqdds.dylib
      │   │   ├── libqgif.dylib
      │   │   ├── libqicns.dylib
      │   │   ├── libqico.dylib
      │   │   ├── libqjp2.dylib
      │   │   ├── libqjpeg.dylib
      │   │   ├── libqmng.dylib
      │   │   ├── libqtga.dylib
      │   │   ├── libqtiff.dylib
      │   │   ├── libqwbmp.dylib
      │   │   └── libqwebp.dylib
      │   ├── platforms
      │   │   └── libqcocoa.dylib
      │   └── printsupport
      │       └── libcocoaprintersupport.dylib
      

      the application then fails to start:

      On Mac OS X, you might be loading two sets of Qt binaries into the same process. Check that all plugins are compiled against the right Qt binaries. Export DYLD_PRINT_LIBRARIES=1 and check that only one set of binaries are being loaded.
      This application failed to start because it could not find or load the Qt platform plugin "cocoa".
      
      Available platform plugins are: cocoa.
      
      Reinstalling the application may fix this problem.
      

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            sorvig Morten Sørvig
            timblechmann tim blechmann
            Veli-Pekka Heinonen Veli-Pekka Heinonen
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes