jamulus icon indicating copy to clipboard operation
jamulus copied to clipboard

Xcode build crashes if PlugIns directory is not present

Open ann0see opened this issue 2 years ago • 5 comments

Describe the bug

The Xcode build of Jamulus after the merge of #3076 crashes with the error message - allocated port number: 22134 qt.qpa.plugin: Could not find the Qt platform plugin "cocoa" in "" This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

To Reproduce

Compile Jamulus with Xcode. To do so run qmake -spec macx-xcode Jamulus.pro Run the app via Xcode and observe a crash. Running the binary from the command line from the Debug folder gives this error message.

Strange enough, if the I build with qmake Jamulus.pro; make the created binary works as expected but doesn't seem to have a PlugIns directory in Jamulus.app/Contents. If I copy the PlugIns directory from a previous build to the crashing build, everything works. Expected behavior

Xcode builds don't crash Screenshots

/ Operating system

macOS 13.4; Xcode 14.2 Version of Jamulus

Build form 10c7eaf4a7ecb59c6a79dd65f3bd6bd172e217dd Additional context

this Mac runs an unsupported version of macOS, so it could be another issue (https://github.com/dortania/OpenCore-Legacy-Patcher/discussions/1046) but I doubt that.

ann0see avatar Jun 05 '23 21:06 ann0see

Maybe macdeployqt must be run somehow

ann0see avatar Aug 20 '23 10:08 ann0see

Maybe copying missing files from a successful build via deploy_mac.sh works?

ann0see avatar Jul 30 '24 19:07 ann0see

maybe related: https://forum.qt.io/topic/133532/how-to-solve-could-not-load-the-qt-platform-plugin-cocoa-in-even-though-it-was-found/8

ann0see avatar Jul 30 '24 19:07 ann0see

Ok. It seems that you must run macdeployqt on the produced binary on macOS. Maybe this can be incorporated somehow in the Xcode build process? If I run macdeployqt, the app starts.

ann0see avatar Aug 10 '24 20:08 ann0see