Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LMMS won't launch on OS X #2862

Closed
tresf opened this issue Jun 19, 2016 · 6 comments
Closed

LMMS won't launch on OS X #2862

tresf opened this issue Jun 19, 2016 · 6 comments
Assignees

Comments

@tresf
Copy link
Member

tresf commented Jun 19, 2016

Latest master branch with #2861 applied, I can get a reliable .dmg file, however there seems to be something wrong with the QtWidgets library within the bundle.

The error is:

  Library not loaded: /usr/local/Cellar/qt5/5.6.1/lib/QtGui.framework/Versions/5/QtGui
  Referenced from: /Applications/LMMS.app/Contents/Frameworks/QtWidgets.framework/Versions/5/QtWidgets

What appears to be happening is the macdeployqt command isn't changing Qt's own references from static libraries to relative paths as can be observed by the Homebrew path prefix in the error log.

At a glance it looks very similar to these bugs:

Homebrew/legacy-homebrew#42191
https://bugreports.qt.io/browse/QTBUG-47868
http://stackoverflow.com/a/18499762/3196753
https://bugreports.qt.io/browse/QTBUG-53533
https://bugreports.qt.io/browse/QTBUG-56814
https://bugreports.qt.io/browse/QTBUG-54086

Whether this is upstream or not, this completely breaks loading on Apple, so we may have to employ a workaround.

One possible workaround is to hard-code some Qt 5.6-specific install_name_tool commands into the end of our apple bundler script, which I consider a last-resort.

Thoughts welcome.

@tresf tresf added the bug label Jun 19, 2016
@tresf tresf added this to the 1.2.0 milestone Jun 19, 2016
@tresf tresf self-assigned this Jun 19, 2016
@tresf
Copy link
Member Author

tresf commented Jun 21, 2016

This is getting stranger by the day...

So with 47b3378, I finally have Qt linking properly (even the 3rd party utility seems to miss the QtXml linking) but now I'm hitting some issues with the linking of BerkleyDB (I assume from libjack).

The exact error is:

Dyld Error Message:
  Library not loaded: /usr/local/lib/libdb-6.1.dylib
  Referenced from: /Applications/LMMS.app/Contents/Frameworks/libjack.0.dylib
  Reason: image not found

But what's really happening is macdeployqt isn't picking up the non-Qt libraries.

It appears macdeployqt with Qt5 and Homebrew is in very bad shape. Linking the BerkleyDB libraries manually will require a lot of hard-coding of copying/linking.

How important is Jack support on Apple?

@unfa
Copy link
Contributor

unfa commented Jun 21, 2016

I might be able to help out with testing this - I have asccess to a Mac machine but it runs OS X 10.7.5 (not the newest) and can't run homebrew. But I installed stable LMMS and it was working (apart from ZynAddSubFX).

@tresf
Copy link
Member Author

tresf commented Jun 21, 2016

Thanks @unfa. In this case, the help I need is packaging and I'm not sure we have a whole lot of Mac developers on this forum to assist.

In the case of my latest DMG, it installs LMMS.app to /Applications with shared libraries (.dylib's) that point to /usr/local/lib/foo.dylib, rather than copying and relinking.

This process is done largely in part with a utility called macdeployqt which seems to have some unresolved issues with Qt5 (Qt4's macdeployqt did a pretty good job of bundling)

@tresf
Copy link
Member Author

tresf commented Jun 21, 2016

Ok, I reverted to Qt 5.5 (versus the default Qt 5.6.1) and at a glance, things are looking much better.

To do this with Homebrew, I had to replace the brew install qt5 with brew install qt55 as well as brew --prefix qt5 with brew --prefix qt55 for any place that cared about the Qt5 prefix (such as cmake and the updated version of the bundling script).

I'll do some more testing and report results here.

@tresf
Copy link
Member Author

tresf commented Jun 21, 2016

Confirmed, Qt 5.5 fixes things...

@unfa here you are: https://github.com/tresf/lmms/releases/tag/v1.1.91

I'll just have to change my own build/package procedures to use Qt55. I'll sanitize the build process against the older-but-working Qt version.

tresf added a commit to tresf/lmms that referenced this issue Jun 22, 2016
Instead of defaulting to Qt 5.6+ per LMMS#2862
@tresf tresf added not our bug and removed bug labels Jun 22, 2016
@tresf tresf removed this from the 1.2.0 milestone Jun 22, 2016
@tresf
Copy link
Member Author

tresf commented Jun 22, 2016

Updated tutorial to reflect Qt 5.5. Closing as this is not our bug. Left the details in QTBUG-53533. Will repeat for Homebrew's Qt5 package if necessary. Although there are some enhancements to get packaging working with Qt5, they're really #2611 tasks and will be is covered when since #2861 is merged.

@tresf tresf closed this as completed Jun 22, 2016
sdasda7777 pushed a commit to sdasda7777/lmms that referenced this issue Jun 28, 2022
Instead of defaulting to Qt 5.6+ per LMMS#2862
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants