kunz
September 19, 2024, 10:14am
1
We are still getting reports that the plugins do not work on macOS 10.11, because of the iTunes library bug.
I want to remove all relations to that library in our plugins. We don’t have a standalone and do not need MIDI Bluetooth. I would expect that we can build the plugin without a reference to this library.
But as soon as I add the juce::MidiKeyboardComponent I have a dependency on that library and get an error when I strip away CoreAudioKit.framework in the CMake script. Does anyone have an Idea, how this component is related to the iTunes library? Shouldn’t it be independent of low-level libraries?
We remove the dependency with this CMake snipped mentioned in this thread:
Seems I caught this one too, finally. Thanks everyone here for figuring this one out!
I’m looking into removing CoreAudioKit from my CMake builds as well, but having to patch the JUCE submodule messes up my git and versioning concept. So I’ve figured out a solution that works without patching, simply by removing linkage to CoreAudioKit from affected modules after the fact.
Note that this will break Standalone builds, so I only do this for Release builds where I don’t build Standalone anyway.
A…
reuk
September 19, 2024, 10:20am
2
What does the error say? If it’s a linker error, does it say what function is undefined?
kunz
September 19, 2024, 10:30am
3
This is the error:
[4/4] Linking CXX CFBundle shared module AudioPlugin_artefacts/Debug/VST/TAL-U-NO-LX-V2.vst/Contents/MacOS/TAL-U-NO-LX-V2
FAILED: AudioPlugin_artefacts/Debug/VST/TAL-U-NO-LX-V2.vst/Contents/MacOS/TAL-U-NO-LX-V2
: && /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ -g -arch arm64 -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk -mmacosx-version-min=10.11 -bundle -Wl,-headerpad_max_install_names -o AudioPlugin_artefacts/Debug/VST/TAL-U-NO-LX-V2.vst/Contents/MacOS/TAL-U-NO-LX-V2 CMakeFiles/AudioPlugin_VST.dir/Users/patrickkunz/Develop/tal/juce/modules/juce_audio_plugin_client/juce_audio_plugin_client_AAX_utils.cpp.o CMakeFiles/AudioPlugin_VST.dir/Users/patrickkunz/Develop/tal/juce/modules/juce_audio_plugin_client/juce_audio_plugin_client_ARA.cpp.o CMakeFiles/AudioPlugin_VST.dir/Users/patrickkunz/Develop/tal/juce/modules/juce_audio_plugin_client/juce_audio_plugin_client_Standalone.cpp.o CMakeFiles/AudioPlugin_VST.dir/Users/patrickkunz/Develop/tal/juce/modules/juce_audio_plugin_client/juce_audio_plugin_client_Unity.cpp.o CMakeFiles/AudioPlugin_VST.dir/Users/patrickkunz/Develop/tal/juce/modules/juce_audio_plugin_client/juce_audio_plugin_client_AAX.mm.o CMakeFiles/AudioPlugin_VST.dir/Users/patrickkunz/Develop/tal/juce/modules/juce_audio_plugin_client/juce_audio_plugin_client_AU_1.mm.o CMakeFiles/AudioPlugin_VST.dir/Users/patrickkunz/Develop/tal/juce/modules/juce_audio_plugin_client/juce_audio_plugin_client_AU_2.mm.o CMakeFiles/AudioPlugin_VST.dir/Users/patrickkunz/Develop/tal/juce/modules/juce_audio_plugin_client/juce_audio_plugin_client_AUv3.mm.o CMakeFiles/AudioPlugin_VST.dir/Users/patrickkunz/Develop/tal/juce/modules/juce_audio_plugin_client/juce_audio_plugin_client_LV2.mm.o CMakeFiles/AudioPlugin_VST.dir/Users/patrickkunz/Develop/tal/juce/modules/juce_audio_plugin_client/juce_audio_plugin_client_VST2.mm.o CMakeFiles/AudioPlugin_VST.dir/Users/patrickkunz/Develop/tal/juce/modules/juce_audio_plugin_client/juce_audio_plugin_client_VST3.mm.o AudioPlugin_artefacts/Debug/libTAL-U-NO-LX-V2_SharedCode.a {CMAKE_CURRENT_BINARY_DIR}/clap-juce-extensions/libclap_juce_extensions.a libBinaryData.a -Xlinker -framework -Xlinker WebKit -weak_framework Metal -weak_framework MetalKit -Xlinker -framework -Xlinker DiscRecording -Xlinker -framework -Xlinker CoreAudio -Xlinker -framework -Xlinker CoreMIDI -Xlinker -framework -Xlinker AudioToolbox -Xlinker -framework -Xlinker QuartzCore -Xlinker -framework -Xlinker Accelerate -Xlinker -framework -Xlinker Cocoa -Xlinker -framework -Xlinker Foundation -Xlinker -framework -Xlinker IOKit -Xlinker -framework -Xlinker Security && cd /Users/patrickkunz/Develop/tal/tal-u-no-lx-v2/cmake-build-debug && /Applications/CLion.app/Contents/bin/cmake/mac/bin/cmake -E copy /Users/patrickkunz/Develop/tal/tal-u-no-lx-v2/cmake-build-debug/AudioPlugin_artefacts/JuceLibraryCode/AudioPlugin_VST/PkgInfo /Users/patrickkunz/Develop/tal/tal-u-no-lx-v2/cmake-build-debug/AudioPlugin_artefacts/Debug/VST/TAL-U-NO-LX-V2.vst/Contents && cd /Users/patrickkunz/Develop/tal/tal-u-no-lx-v2/cmake-build-debug && /Applications/CLion.app/Contents/bin/cmake/mac/bin/cmake -Dsrc=/Users/patrickkunz/Develop/tal/tal-u-no-lx-v2/cmake-build-debug/AudioPlugin_artefacts/Debug/VST/TAL-U-NO-LX-V2.vst -P /Users/patrickkunz/Develop/tal/juce/extras/Build/CMake/checkBundleSigning.cmake && cd /Users/patrickkunz/Develop/tal/tal-u-no-lx-v2/cmake-build-debug && /Applications/CLion.app/Contents/bin/cmake/mac/bin/cmake -Dsrc=/Users/patrickkunz/Develop/tal/tal-u-no-lx-v2/cmake-build-debug/AudioPlugin_artefacts/Debug/VST/TAL-U-NO-LX-V2.vst -Ddest=/Users/patrickkunz/Library/Audio/Plug-Ins/VST -P /Users/patrickkunz/Develop/tal/juce/extras/Build/CMake/copyDir.cmake
Undefined symbols for architecture arm64:
"_OBJC_CLASS_$_CABTLEMIDIWindowController", referenced from:
objc-class-ref in libTAL-U-NO-LX-V2_SharedCode.a(juce_audio_utils.mm.o)
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
kunz
September 19, 2024, 10:34am
4
I’m trying to strip away the library at the end of the CMake file.
reuk
September 19, 2024, 10:49am
5
I think what’s going on is that the MidiKeyboardComponent uses function implementations in juce_audio_utils.cpp, but juce_audio_utils also includes an implementation of the BluetoothMidiDevicePairingDialogue which in turn depends on the CABTLEMIDIWindowController.
You could investigate linker flags for dead code stripping to see whether that helps. Otherwise, you may need to rebuild after removing the BluetoothMidiDevicePairingDialogue from the juce_audio_utils module.
kunz
September 19, 2024, 11:37am
6
Thanks for the information and the Ideas. I wasn’t able to strip away this with compiler or linker flags in the CMake.
I don’t want to patch the JUCE code. I leave this for now if no one has a clean solution.