Building vst3sdk fails on macOS (Sequoia 15.4 / Apple Silicon / Xcode Version 16.3)
Issue building vst3sdk on macOS (Sequoia 15.4 / Apple Silicon / Xcode Version 16.3)
Build fails when running
cmake -GXcode -B build cmake --build build
I get several errors like the following:
/Users/username/vst3sdk/vstgui4/vstgui/uidescription/detail/../rapidjson/include/rapidjson/internal/diyfp.h:139:20: error: use of infinity is undefined behavior
due to the currently enabled floating-point options [-Werror,-Wnan-infinity-disabled]
139 | return std::numeric_limits
As well as several of these warnings: warning: ONLY_ACTIVE_ARCH=YES requested with multiple ARCHS and no active architecture could be computed; building for all applicable architectures (in target 'vstgui_uidescription' from project 'vstsdk')
And just before the build fails I get the following error: The following build commands failed: CompileC /Users/username/vst3sdk/build/build/vstgui_uidescription.build/Debug/Objects-normal/x86_64/uijsonpersistence.o /Users/username/vst3sdk/vstgui4/vstgui/uidescription/detail/uijsonpersistence.cpp normal x86_64 c++ com.apple.compilers.llvm.clang.1_0.compiler (in target 'vstgui_uidescription' from project 'vstsdk')
Specifying arm64 architecture also fails: cmake -GXcode -DCMAKE_OSX_ARCHITECTURES="arm64" -B build cmake --build build
The configure / generate stage of CMake completes successfully. Here is the output:
-- [SMTG] Check C++ compiler -- Looking for a CXX compiler -- Looking for a CXX compiler - /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -- [SMTG] Building with Xcode version: 16.3 -- The C compiler identification is AppleClang 17.0.0.17000013 -- The CXX compiler identification is AppleClang 17.0.0.17000013 -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang - skipped -- Detecting C compile features -- Detecting C compile features - done -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ - skipped -- Detecting CXX compile features -- Detecting CXX compile features - done -- [SMTG] SMTG_VSTGUI_SOURCE_DIR is set to: /Users/myname/Documents/Programming/Audio_Programming/steinberg/vst3sdk/vstgui4 -- Found EXPAT: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/usr/lib/libexpat.tbd (found version "2.6.3") -- VSTGUI will use the Expat library at /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/usr/lib/libexpat.tbd -- VSTGUI will use the Expat header found in /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/usr/include -- [SMTG] Neither SMTG_AUDIOUNIT_SDK_PATH nor SMTG_COREAUDIO_SDK_PATH is set. This is needed to build AudioUnit Version 2 plug-ins. -- [SMTG] SMTG_AAX_SDK_PATH is not set. If you need it, please download the AAX SDK! -- Could NOT find LIBJACK (missing: LIBJACK_LIBRARIES LIBJACK_INCLUDE_DIR) -- Performing Test SMTG_USE_STDATOMIC_H -- Performing Test SMTG_USE_STDATOMIC_H - Success -- Could NOT find LIBJACK (missing: LIBJACK_LIBRARIES LIBJACK_INCLUDE_DIR) -- [SMTG] LIBJACK_FOUND is not set. -- [SMTG] Codesign validator for local machine only -- [SMTG] Codesign moduleinfotool for local machine only -- [SMTG] Codesign adelay for local machine only -- [SMTG] Setup running moduleinfotool for adelay -- [SMTG] Setup running validator for adelay -- [SMTG] SMTG_PLUGIN_TARGET_PATH is set to: /Users/username/Library/Audio/Plug-Ins/VST3 -- [SMTG] Codesign again for local machine only -- [SMTG] Setup running moduleinfotool for again -- [SMTG] Setup running validator for again -- [SMTG] SMTG_PLUGIN_TARGET_PATH is set to: /Users/username/Library/Audio/Plug-Ins/VST3 -- [SMTG] Codesign again-simple for local machine only -- [SMTG] Setup running moduleinfotool for again-simple -- [SMTG] Setup running validator for again-simple -- [SMTG] SMTG_PLUGIN_TARGET_PATH is set to: /Users/username/Library/Audio/Plug-Ins/VST3 -- [SMTG] Codesign again_auv3_macos for local machine only -- [SMTG] Codesign again_auv3_macos_appextension_macos for local machine only -- [SMTG] Codesign again-sample-accurate for local machine only -- [SMTG] Setup running moduleinfotool for again-sample-accurate -- [SMTG] Setup running validator for again-sample-accurate -- [SMTG] SMTG_PLUGIN_TARGET_PATH is set to: /Users/usernameLibrary/Audio/Plug-Ins/VST3 -- [SMTG] Codesign channel-context for local machine only -- [SMTG] Setup running moduleinfotool for channel-context -- [SMTG] Setup running validator for channel-context -- [SMTG] SMTG_PLUGIN_TARGET_PATH is set to: /Users/username/Library/Audio/Plug-Ins/VST3 -- [SMTG] Codesign data-exchange for local machine only -- [SMTG] Setup running moduleinfotool for data-exchange -- [SMTG] Setup running validator for data-exchange -- [SMTG] SMTG_PLUGIN_TARGET_PATH is set to: /Users/username/Library/Audio/Plug-Ins/VST3 -- [SMTG] Codesign host-checker for local machine only -- [SMTG] Setup running moduleinfotool for host-checker -- [SMTG] Setup running validator for host-checker -- [SMTG] SMTG_PLUGIN_TARGET_PATH is set to: /Users/username/Library/Audio/Plug-Ins/VST3 -- [SMTG] Codesign legacy-midicc-out for local machine only -- [SMTG] Setup running moduleinfotool for legacy-midicc-out -- [SMTG] Setup running validator for legacy-midicc-out -- [SMTG] SMTG_PLUGIN_TARGET_PATH is set to: /Users/username/Library/Audio/Plug-Ins/VST3 -- [SMTG] Codesign mda-vst3 for local machine only -- [SMTG] Setup running moduleinfotool for mda-vst3 -- [SMTG] Setup running validator for mda-vst3 -- [SMTG] SMTG_PLUGIN_TARGET_PATH is set to: /Users/username/Library/Audio/Plug-Ins/VST3 -- [SMTG] Codesign multiple-program-changes for local machine only -- [SMTG] Setup running moduleinfotool for multiple-program-changes -- [SMTG] Setup running validator for multiple-program-changes -- [SMTG] SMTG_PLUGIN_TARGET_PATH is set to: /Users/username/Library/Audio/Plug-Ins/VST3 -- [SMTG] Codesign note-expression-synth for local machine only -- [SMTG] Setup running moduleinfotool for note-expression-synth -- [SMTG] Setup running validator for note-expression-synth -- [SMTG] SMTG_PLUGIN_TARGET_PATH is set to: /Users/username/Library/Audio/Plug-Ins/VST3 -- [SMTG] Codesign notexpsynth_auv3_macos for local machine only -- [SMTG] Codesign notexpsynth_auv3_macos_appextension_macos for local machine only -- [SMTG] Codesign note-expression-text for local machine only -- [SMTG] Setup running moduleinfotool for note-expression-text -- [SMTG] Setup running validator for note-expression-text -- [SMTG] SMTG_PLUGIN_TARGET_PATH is set to: /Users/username/Library/Audio/Plug-Ins/VST3 -- [SMTG] Codesign panner for local machine only -- [SMTG] Setup running moduleinfotool for panner -- [SMTG] Setup running validator for panner -- [SMTG] SMTG_PLUGIN_TARGET_PATH is set to: /Users/username/Library/Audio/Plug-Ins/VST3 -- [SMTG] Codesign pitch-names for local machine only -- [SMTG] Setup running moduleinfotool for pitch-names -- [SMTG] Setup running validator for pitch-names -- [SMTG] SMTG_PLUGIN_TARGET_PATH is set to: /Users/username/Library/Audio/Plug-Ins/VST3 -- [SMTG] Codesign prefetchable for local machine only -- [SMTG] Setup running moduleinfotool for prefetchable -- [SMTG] Setup running validator for prefetchable -- [SMTG] SMTG_PLUGIN_TARGET_PATH is set to: /Users/username/Library/Audio/Plug-Ins/VST3 -- [SMTG] Codesign program-change for local machine only -- [SMTG] Setup running moduleinfotool for program-change -- [SMTG] Setup running validator for program-change -- [SMTG] SMTG_PLUGIN_TARGET_PATH is set to: /Users/username/Library/Audio/Plug-Ins/VST3 -- [SMTG] Codesign remap-paramid for local machine only -- [SMTG] Setup running moduleinfotool for remap-paramid -- [SMTG] Setup running validator for remap-paramid -- [SMTG] SMTG_PLUGIN_TARGET_PATH is set to: /Users/username/Library/Audio/Plug-Ins/VST3 -- [SMTG] Codesign sync-delay for local machine only -- [SMTG] Setup running moduleinfotool for sync-delay -- [SMTG] Setup running validator for sync-delay -- [SMTG] SMTG_PLUGIN_TARGET_PATH is set to: /Users/username/Library/Audio/Plug-Ins/VST3 -- [SMTG] Codesign utf16-name for local machine only -- [SMTG] Setup running moduleinfotool for utf16-name -- [SMTG] Setup running validator for utf16-name -- [SMTG] SMTG_PLUGIN_TARGET_PATH is set to: /Users/username/Library/Audio/Plug-Ins/VST3 -- Configuring done (10.9s) -- Generating done (0.2s) -- Build files have been written to: /Users/username/Documents/Programming/Audio_Programming/steinberg/vst3sdk/build
Xcode 16.3 was released after the current VSTSDK release, please use Xcode 16.2. We will investicate this issue for the next update of the VST SDK
Ah got it, thank you! I rolled back to Xcode 16.2 and also 16.0 but I'm still getting the following (different) build error:
** BUILD FAILED **
The following build commands failed: PhaseScriptExecution CMake\ PostBuild\ Rules /Users/username/steinberg/vst3sdk/build/build/utf16-name.build/Debug/Script-2856EC9F33458A4D6C105DD1.sh (in target 'utf16-name' from project 'vstsdk')
The last successful step was:
Result: 47 tests passed, 0 tests failed [SMTG] Validator finished. ln: /Users/username/Library/Audio/Plug-Ins/VST3: Directory not empty Command PhaseScriptExecution failed with a nonzero exit code
Apple did change the ln command line tool in macOS 15.4. To prevent the issue until we release the next update you can turn off the cmake option SMTG_CREATE_PLUGIN_LINK.
That did the trick, build is successful now! Thank you very much!
Change
/vst3sdk/vstgui4/vstgui/uidescription/CMakeLists.txt
if(CMAKE_HOST_APPLE)
- target_compile_options(${target} PRIVATE -Wall -Werror)
+ target_compile_options(${target} PRIVATE -Wall -Werror -Wno-error=nan-infinity-disabled)
endif()
and
/VST_SDK/vst3sdk/vstgui4/vstgui/lib/CMakeLists.txt
if(CMAKE_HOST_APPLE)
- target_compile_options(${target} PRIVATE -Wall -Werror
+ target_compile_options(${target} PRIVATE -Wall -Werror -Wno-error=nan-infinity-disabled -Wno-unused-but-set-variable)
fixed in VST SDK 3.7.14