Cannot build for Apple Silicon on Intel

Hi,

I’m getting the following error when building for Apple Silicon only on Intel:

/Users/runner/work/1/s/build/examples/Plugins/WebViewPluginDemo_artefacts/Release/VST3/WebViewPluginDemo.vst3: code has no resources but signature indicates they must be present
-- Replacing invalid signature with ad-hoc signature
/Users/runner/work/1/s/build/examples/Plugins/WebViewPluginDemo_artefacts/Release/VST3/WebViewPluginDemo.vst3: replacing existing signature
removing moduleinfo.json
/bin/sh: ../CMake/AudioPlugin/juce_vst3_helper: Bad CPU type in executable
make[3]: *** [examples/Plugins/WebViewPluginDemo_artefacts/Release/VST3/WebViewPluginDemo.vst3/Contents/MacOS/WebViewPluginDemo] Error 126
make[3]: *** Deleting file `examples/Plugins/WebViewPluginDemo_artefacts/Release/VST3/WebViewPluginDemo.vst3/Contents/MacOS/WebViewPluginDemo'
make[2]: *** [examples/Plugins/CMakeFiles/WebViewPluginDemo_VST3.dir/all] Error 2
make[1]: *** [examples/Plugins/CMakeFiles/WebViewPluginDemo_VST3.dir/rule] Error 2
make: *** [WebViewPluginDemo_VST3] Error 2

I used this code to compile:

git clone --recurse-submodules https://github.com/juce-framework/JUCE.git
cd JUCE
cd ..
mkdir build
cd build
cmake ../JUCE -DCMAKE_BUILD_TYPE=Release -DCMAKE_OSX_ARCHITECTURES=arm64 -DJUCE_BUILD_EXAMPLES=ON
cmake --build . --config Release --parallel 8 --target WebViewPluginDemo_VST3

Building a universal binary instead works as expected, which makes me wonder if building for Apple Silicon only on Intel is not supported by JUCE…?

Best,

Jelle

The juce_vst3_helper has to run the plugin at build-time in order to generate the moduleinfo.json that gets included in the plugin bundle. If the juce_vst3_helper can’t load the plugin, then this step will fail. You can search the forum to find some methods for temporarily disabling the manifest generation step if necessary, but I’d recommend including the moduleinfo.json if possible.

Thanks @reuk, if I understand it correctly, building a VST3 including building the manifest for Apple Silicon on Intel is not supported?

That’s correct, yes. It may be able to support this workflow by building a universal binary, generating the manifest, and then postprocessing the universal binary to remove the Intel portion of the binary using lipo -thin.

1 Like

I had another library dependency with seperate libraries for intel and silicon which made me decide to build JUCE the same way, but I’ll just change my approach and use lipo to make the library a universal one as well, and build JUCE universal. Thanks for the reply.

3 Likes

I’m having the same problem in the other direction. Building on Silicon but targeting for Intel. I’ve been doing this successfully for awhile using Juce 7.0.8. Now I’m setting up a new build machine, and downloaded Juce 8.0.1. Same .projucer and source files on both machines, and it’s failing under 8.0.1. Both machines are Silicon Sonoma 14.6.

Is this a Juce 8.x artifact? I don’t have an Intel build machine anymore. I suppose I could try the universal binary hack, or just capture the files on the “good” build machine and copy them manually. Or go back to 7.x and call it a day. But I’m curious about why this is happening.

See Xcode Override Architectures

Do you have Rosetta 2 on the Arm mac? You’ll need that installed in order to run Intel-only binaries. If you don’t want to install Rosetta 2, then building a universal binary might be a good alternative.

Yes! That was it. It builds fine now, thank you.