Closed JelleBakker closed 2 months ago
That looks like an error in juce?
2024-08-05T15:11:01.7916990Z /bin/sh: ./juce_vst3_helper: Bad CPU type in executable
Could this be that the runner is x86_64 and you're trying to build arm64 only?
It could be that whatever is in juce_vst3_helper
(is this Steinberg code?) needs to read a native binary?
The runner is Intel and it's building for arm64. So yes this is probably the issue. But building for arm on intel should be possible, right. At least I've been doing this without issues before.
Yes, it's just that I don't know if juce supports building just an arm binary.
I'm just guessing here but I think that is a steinberg tool that juce packages up. If it expects the native architecture of the build machine, it's going to look for an x86_64 binary. If it doesn't find that, it seems to be failing.
Is there a reason you're not building a Universal Binary? I.e. x86_64 & arm64 in the same build? There's a fair chance that will work as it will be able to get whatever info it needs from the x86_64 part.
Does this work?
-DCMAKE_OSX_ARCHITECTURES="arm64;x86_64"
That worked indeed.
I asked it on the JUCE forum: https://forum.juce.com/t/cannot-build-for-apple-silicon-on-intel/62395/3
So, It seems like what I'm trying to do is not really supported.
The reason I'm doing it this way is because I have another library that I use that has a seperate binary for Apple Silicon and Intel, but I'll attempt to merge those into a Universal one and avoid building JUCE for Intel and Silicon seperately.
Ok, I'll close this then.
BTW, it's quite easy to merge an arm and x64 binary in to a fat binary using lipo
Detailed steps on how to reproduce the bug
What is the expected behaviour?
I expect it to build without errors
Unit test to reproduce the error?
No response
Operating systems
macOS
What versions of the operating systems?
Tested with an Azure macos-13 image: https://github.com/actions/runner-images/blob/main/images/macos/macos-13-Readme.md
Architectures
x86_64
Stacktrace
Plug-in formats (if applicable)
No response
Plug-in host applications (DAWs) (if applicable)
No response
Testing on the
develop
branchThe bug is present on the
develop
branchCode of Conduct