VST3 build with JUCE 7.0.6 on MacOS is Broken

Try:

OTHER_CODE_SIGN_FLAGS = --deep

Rail

Thanks! This worked. It builds perfectly now.

iā€™m seeing this problem after updating to 7.0.7 (from 6.x) in both debug and production builds.

i have no custom xcode flags or custom build settings beyond Use App Sandbox and Enable Hardened Runtime.

how can i bypass this step? found it - revert this change, rebuild projucer, disable manifest generation in project settings, and everything works again.

juce folks, any chance you can officially restore the ability for developers to bypass the manifest generation?

1 Like

Thanks for reporting, fixed here:

2 Likes

this works for me, thanks @reuk

After update to last commit [9ecd9eb61] our pipelines still failing:

xcodebuild

In architecture: x86_64
/My Project Folder/Builds/MacOSX/build/My Project Name.build/Release/My Project Name - VST3.build/Script-1087FC8968FCA95716F6DC05.sh: line 6: 9926 Segmentation fault: 11 ā€œ$CONFIGURATION_BUILD_DIR/juce_vst3_helperā€ -create -version ā€œ1.2.0ā€ -path ā€œ$CONFIGURATION_BUILD_DIR/$FULL_PRODUCT_NAMEā€ -output ā€œ$CONFIGURATION_BUILD_DIR/$FULL_PRODUCT_NAME/Contents/Resources/moduleinfo.jsonā€
Command PhaseScriptExecution failed with a nonzero exit code

msbuild

C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(161,5): 
Error MSB3073: The command "copy /Y "D:\a\1\s\My Project Folder\Builds\VisualStudio2022\x64\Release\VST3\\My Project Name.dll" "D:\a\1\s\My Project Folder\Builds\VisualStudio2022\x64\Release\VST3\\My Project Name.vst3\Contents\x86_64-win\My Project Name.vst3" del /s /q "D:\a\1\s\My Project Folder\Builds\VisualStudio2022\x64\Release\VST3\/My Project Name.vst3\Contents\moduleinfo.json" if not exist "D:\a\1\s\My Project Folder\Builds\VisualStudio2022\x64\Release\VST3\/My Project Name.vst3\Contents\Resources\" del /s /q "D:\a\1\s\My Project Folder\Builds\VisualStudio2022\x64\Release\VST3\/My Project Name.vst3\Contents\Resources" && mkdir "D:\a\1\s\My Project Folder\Builds\VisualStudio2022\x64\Release\VST3\/My Project Name.vst3\Contents\Resources" "D:\a\1\s\My Project Folder\Builds\VisualStudio2022\x64\Release\VST3 Manifest Helper\juce_vst3_helper.exe" -create -version "1.2.0" -path "D:\a\1\s\My Project Folder\Builds\VisualStudio2022\x64\Release\VST3\/My Project Name.vst3" -output "D:\a\1\s\My Project Folder\Builds\VisualStudio2022\x64\Release\VST3\/My Project Name.vst3\Contents\Resources\moduleinfo.json" :VCEnd" exited with code -1073741819.

The segfault looks a bit unusual. Itā€™s hard to tell whether itā€™s crashing in the plugin loader, or in the plugin itself. Given that the example plugins work, I think the crash is more likely to stem from the plugin.

Please can you try running the juce_vst3_helper with the same commandline in a debugger and find out where it crashes?

ok thanks, Iā€™ll try to set up this test, but it will take a while as every time the pipeline downloads everything in a clean system.

And unfortunally canā€™t reproduce the issue locally, maybe there are some issue with spaces/characters of virtual machine. Iā€™ve no custom xcode flags, no custom build settings, App Sandbox and Hardened Runtime are disabled.

Just

1- build Projucer

xcodebuild -configuration Release -project Projucer.xcodeproj -scheme "Projucer - App" -destination platform=macOS

2- re-save

Projucer --resave "My Project Name.jucer"

3- build Project

xcodebuild -configuration Release -project "My Project Name.xcodeproj"

Do you have a copy protection system in place, or anything else you can think of that might prevent the plugin from being loaded during the build?

1 Like

Solved! My plugin would not load without external resources (added only after installation) thanks for the help!

Hi @attila,

Iā€™m in the same situation as emvoice, where I need to copy specific dylibs in the VST3/AU bundles. Unfortunately the solution you suggest (copying the dylibs from the prebuild script) wonā€™t work in my case, because we use the following process in our build system (running python scripts):

  • running cmake -G Xcode ā€¦
  • building my VST3 or AU bundle
  • finding the dylibs dependcies of the bundle using ā€œotool -l ā€¦ā€
  • copying the found dylibs and updating the rpaths in the bundle

Hence, itā€™s not possible to know the lib dependency list before the bundle has been built, so I need the bundle build to be complete in order to find and copy the dylibs.

Any chance to find a way to overcome this ? I really need to update to JUCE >= 7.0.6 because itā€™s providing important fixes for other issues.

I see. Thatā€™s a bit of a pickle.

Am I right in thinking that with our current develop branch you can add your dylib copying to the post build script, and it works everywhere except maybe in Visual Studio?

We should probably figure out something for VS as well.

The whole ā€œfind dependencies, copy dylibs and update rpathā€ is done from a python script for now.
Do you think a solution would be to run this python script from a cmake post build command ?
If so will it be run before the JUCE post build actions ?

If you truly need to do this (you can probably just figure out the list of dependencies and hard code it in a cmake file), you can write a script to intercept the linker calls and invoke it with -fuse-ld=/path/to/my-script (for clang).

The script will give you all the linker arguments, which includes -l lib-name and -L search-path. You can use these to identify which dynamic libraries will be linked into your program and copy them to the same output folder as the original dylib.

Yes, in CMake it would run before the manifest generation.

Is this at all related?

I just tried to add my script in the postbuild command, and I see it runs the juce_vst3_helper before running my script, hence it fails as before. I do this in my CMakeLists.txt:

add_custom_command(
    TARGET ${PROJECT_NAME}_VST3
    POST_BUILD
    COMMAND python3 ${CMAKE_SOURCE_DIR}/../scripts/dynamic-link.py
)

Is that what you had in mind ?

You can set VST3_AUTO_MANIFEST to FALSE in your juce_add_plugin call, and then call juce_enable_vst3_manifest_step later on in the build, after your add_custom_command call. There are more details in CMake API.md.

3 Likes

It works thank you !

I use CMake and Xcode 15.0. The manifest creation fails because the plugin is not yet codesigned (Xcode signs the plugin after the CMake Post Build Rules).

So, if I want to solve this issue, I should set VST3_AUTO_MANIFEST to FALSE, then add a script to codesign the plugin in the CMake Post Build Rules, and then add the script that generates the manifest using juce_enable_vst3_manifest_step(). Is that it?

By the way, XCode will re-sign the plugin again after the CMake Post Build Rules.