What to look out for when building under macOS 14.6 14.6 - [x186_64] parallel to QT 6 in Homebrew
-
Hello everyone,
thanks to the good and concise instructions and the corresponding packages provided by Jonas, I have now been able to build the current version of the Strawberry Player myself. Here is a note from me to those who want to try to build it themselves, but also install it with Homebrew Formulae and Cask. Please check after the step "Set environment variables" in the result output in the terminal whether the following line
-- Found macdeployqt: /usr/local/opt/qt/bin/macdeployqt
can be found. This indicates that an older version of QT6 is installed and when building this tool instead of the tool from
/opt/strawberry_macos_x86_64_release/bin/macdeployqt is used.If this or something similar occurs, open the file /build/CMakeCache.txt in the build folder in an editor and search for the expression
MACDEPLOYQT_EXECUTABLE:FILEPATH=
If it says, as in my example
MACDEPLOYQT_EXECUTABLE:FILEPATH=/usr/local/opt/qt/bin/macdeployqt
this must be changed to
MACDEPLOYQT_EXECUTABLE:FILEPATH=/opt/strawberry_macos_x86_64_release/bin/macdeployqt
must be corrected.
For the ARM architecture, i.e. from M1 upwards, the paths for QT in Homebrew are slightly different.
And one more thing:
If, as described above, after the step "Set environment variables" the following line is also displayed:-- Could NOT find GTest (missing: GTEST_LIBRARY GTEST_INCLUDE_DIR GTEST_MAIN_LIBRARY)
This refers to Google Testing and Mocking Framework and can be easily installed via Homebrew
$ brew install googletest
see also https://formulae.brew.sh/formula/googletestBut I don't know if this is relevant here. Jonas will have to comment on this.
The following output of the lines is also correct:
Building strawberry version: 1.1.1-76-gefd42bc6, Qt version 6.7.2 The following components will be built: Devices: Audio CD support Devices: MTP support Devices: iPod classic support EBU R 128 loudness normalisation Engine: GStreamer backend Global shortcuts Moodbar MusicBrainz integration Song fingerprinting and tracking Streaming: Qobuz Streaming: Spotify Streaming: Subsonic Streaming: Tidal Translations The following components WILL NOT be built: ALSA integration (missing alsa) D-Bus support (disabled in CMake config) Devices: GIO device backend (Unix support) (missing Unix or Windows) Devices: GIO device backend (missing Unix or Windows) Devices: UDisks2 backend (missing D-Bus, Qt D-Bus) Engine: VLC backend (missing libvlc) PulseAudio integration (missing libpulse) X11 global shortcuts (missing X11, QX11Application, X11Extras or qpa/qplatformnativeinterface.h header)
Please do not be confused by the components that cannot be installed.
Finally, and for the sake of completeness, the error messages that occurred during my installation runs and which made me persistently search for the error:
Error message after make deploycheck: make[3]: *** [CMakeFiles/deploy] Error 1 make[2]: *** [CMakeFiles/deploy.dir/all] Error 2 make[1]: *** [CMakeFiles/deploy.dir/rule] Error 2 make: *** [deploy] Error 2 Error message after starting strawberry.app in the terminal: DEBUG unknown Could not load the Qt platform plugin ‘cocoa’ in ‘’ even though it was found. ERROR unknown This application failed to start because no Qt platform plugin could be initialised. Reinstalling the application may fix this problem. ERROR unknown ERROR unknown Available platform plugins are: cocoa. Error message after export QT_DEBUG_PLUGINS=1 Mac-Pro:build user$ /Users/user/Bastelbude/strawberry/build/strawberry.app/Contents/MacOS/strawberry Mac-Pro:build user$ /Users/user/Bastelbude/strawberry/build/strawberry.app/Contents/MacOS/strawberry 15:10:11.791 INFO main:181 Strawberry 1.1.1-76-gefd42bc6 Qt "6.7.2" 15:10:11.791 INFO main:182 "macOS 14.6 14.6 - (darwin 23.6.0) [x86_64]" 15:10:11.791 DEBUG unknown checking directory path "/Users/user/Bastelbude/strawberry/build/strawberry.app/Contents/PlugIns/platforms" ... 15:10:11.791 DEBUG unknown looking at "/Users/user/Bastelbude/strawberry/build/strawberry.app/Contents/PlugIns/platforms/libqcocoa.dylib" 15:10:11.792 DEBUG unknown Found metadata in lib /Users/user/Bastelbude/strawberry/build/strawberry.app/Contents/PlugIns/platforms/libqcocoa.dylib, metadata= 15:10:11.792 DEBUG unknown { 15:10:11.792 DEBUG unknown "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3", 15:10:11.792 DEBUG unknown "MetaData": { 15:10:11.792 DEBUG unknown "Keys": [ 15:10:11.792 DEBUG unknown "cocoa" 15:10:11.792 DEBUG unknown ] 15:10:11.792 DEBUG unknown }, 15:10:11.792 DEBUG unknown "archlevel": 2, 15:10:11.792 DEBUG unknown "className": "QCocoaIntegrationPlugin", 15:10:11.792 DEBUG unknown "debug": false, 15:10:11.792 DEBUG unknown "version": 395008 15:10:11.792 DEBUG unknown } 15:10:11.792 DEBUG unknown 15:10:11.792 DEBUG unknown 15:10:11.792 DEBUG unknown Got keys from plugin meta data QList("cocoa") 15:10:11.792 DEBUG unknown checking directory path "/Users/user/Bastelbude/strawberry/build/strawberry.app/Contents/MacOS/platforms" ... 15:10:11.796 DEBUG unknown "/Users/user/Bastelbude/strawberry/build/strawberry.app/Contents/PlugIns/platforms/libqcocoa.dylib" cannot load: Cannot load library /Users/user/Bastelbude/strawberry/build/strawberry.app/Contents/PlugIns/platforms/libqcocoa.dylib: dlopen(/Users/user/Bastelbude/strawberry/build/strawberry.app/Contents/PlugIns/platforms/libqcocoa.dylib, 0x0085): Symbol not found: __ZN28QBasicPlatformVulkanInstance12initInstanceEP15QVulkanInstanceRK5QListI10QByteArrayE 15:10:11.796 DEBUG unknown Referenced from: <B8E2693D-9121-3B77-BCC4-9C02650E263A> /Users/user/Bastelbude/strawberry/build/strawberry.app/Contents/PlugIns/platforms/libqcocoa.dylib 15:10:11.796 DEBUG unknown Expected in: <8D56D1F3-7DAD-36F4-90A3-DB85B5BAF348> /Users/user/Bastelbude/strawberry/build/strawberry.app/Contents/Frameworks/QtGui.framework/Versions/A/QtGui 15:10:11.796 DEBUG unknown QLibraryPrivate::loadPlugin failed on "/Users/user/Bastelbude/strawberry/build/strawberry.app/Contents/PlugIns/platforms/libqcocoa.dylib" : "Cannot load library /Users/user/Bastelbude/strawberry/build/strawberry.app/Contents/PlugIns/platforms/libqcocoa.dylib: dlopen(/Users/user/Bastelbude/strawberry/build/strawberry.app/Contents/PlugIns/platforms/libqcocoa.dylib, 0x0085): Symbol not found: __ZN28QBasicPlatformVulkanInstance12initInstanceEP15QVulkanInstanceRK5QListI10QByteArrayE\n Referenced from: <B8E2693D-9121-3B77-BCC4-9C02650E263A> /Users/user/Bastelbude/strawberry/build/strawberry.app/Contents/PlugIns/platforms/libqcocoa.dylib\n Expected in: <8D56D1F3-7DAD-36F4-90A3-DB85B5BAF348> /Users/user/Bastelbude/strawberry/build/strawberry.app/Contents/Frameworks/QtGui.framework/Versions/A/QtGui" 15:10:11.796 DEBUG unknown Could not load the Qt platform plugin "cocoa" in "" even though it was found. 15:10:11.796 ERROR unknown This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem. 15:10:11.796 ERROR unknown 15:10:11.796 ERROR unknown Available platform plugins are: cocoa. 15:10:11.796 ERROR unknown Abort trap: 6
Installed versions of Strawberry and macOS
Strawberry 1.1.1-76-gefd42bc6 Qt "6.7.2"
"macOS 14.6 14.6 - (darwin 23.6.0) [x86_64]"Greetings,
nfriese -
@nfriese
Sorry, but this is wrong, you should never edit the CMake Cache file.
You need to add-DMACDEPLOYQT_EXECUTABLE="/opt/strawberry_macos_x86_64_release/bin/macdeployqt"
to the CMake command. -
@jonas
Ok and thanks for the hint.
However, it is irritating that the CMakeCache.txt file contains the following text in the preamble:# This is the CMakeCache file. # For build in directory: /Users/user/Bastelbude/strawberry/build # It was generated by CMake: /opt/strawberry_macos_arm64_release/bin/cmake # You can edit this file to change values found and used by cmake. # If you do not want to change any of the values, simply exit the editor. # If you do want to change a value, simply edit, save, and exit the editor. # The syntax for the file is as follows: # KEY:TYPE=VALUE # KEY is the name of a variable in the cache. # TYPE is a hint to GUIs for the type of VALUE, DO NOT EDIT TYPE!. # VALUE is the current value for the KEY.
(Note: The file now comes from the build for the ARM architecture - that's where I successfully performed my hack).
By adding the line to the CMake command, you are referring to the “Configure build” step in https://wiki.strawberrymusicplayer.org/wiki/Build_macOS, where the expression can then be added. If this is correct, I will then adapt or revise my first post.