1

I want to build a dmg with a executable with debug symbols so I can take to another machine and debug it there. If I use macdeployqt with -use-debug-libs the dmg does seem to have debug symbols and I can use it on the machine it was built on.

But when I copy the dmg to another mac it fails with:

Library not loaded: @rpath/QtOpenGL.framework/Versions/5/QtOpenGL
Reason: image not found

If I build the dmg without -use-debug-libs and copy the dmg to another machine it does work. This seems like a bug in macdeployqt.

More info:

They both reference the same lib:

@rpath/QtOpenGL.framework/Versions/5/QtOpenGL (compatibility version 5.5.0, current version 5.5.1)

The non-debug Frameworks dir has this:

lrwxrwxr-x  1 LarryMartell  staff   25 Mar 15 11:00 QtOpenGL -> Versions/Current/QtOpenGL
lrwxrwxr-x  1 LarryMartell  staff   26 Mar 15 11:00 Resources -> Versions/Current/Resources
drwxrwxr-x@ 4 LarryMartell  staff  136 Mar 15 11:00 Versions

And the debug one has this:

lrwxrwxr-x  1 LarryMartell  staff   31 Mar 15 10:41 QtOpenGL_debug -> Versions/Current/QtOpenGL_debug
lrwxrwxr-x  1 LarryMartell  staff   26 Mar 15 10:41 Resources -> Versions/Current/Resources
drwxrwxr-x@ 4 LarryMartell  staff  136 Mar 15 10:41 Versions
8
  • Yeah that doesn't seem right. What QtOpenGL.framework is the non-debug executable using on this other machine? Commented Mar 15, 2016 at 14:59
  • I updated the question with more info. Commented Mar 15, 2016 at 15:12
  • So this is a .app with the Qt frameworks shipped in the Frameworks folder of the app bundle? Also have you checked the runpath of the executable (I think you use otool for that too)? Commented Mar 15, 2016 at 15:17
  • Yes, the QT frameworks are in the Frameworks folder of the app bundle. Not sure how to check the runpath. But this may be a known bug: bugreports.qt.io/browse/QTBUG-48800 Commented Mar 15, 2016 at 15:21
  • See this. Commented Mar 15, 2016 at 15:23

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.