Problem Xcode 15.3 and ARM etc

HI !
I am building on and ARM (Mac Studio M2) and many times executing on another Non-arm computer (Mac…). But since Xcode 15.3 I discovered that my Imac (non arm) will not execute that code compiled on the Mac Studio. I have set the building architecture to Standard 64 - which have worked in many versions of Xcode - latest on Xcode 15.2… Just curious if anyone else have seen this problem ?? - right now I have rolled back to Xcode 15.2… - recompiled and it’s working again…
BTW: I’m on Juce 7.0.9 …

1 Like

I wonder if this could be a side effect of a new feature introduced in Xcode 15.3 called “Override Architectures”

From the Xcode 15.3 Release Notes:

Build System

New Features

  • Schemes provide a new “Override Architectures” build option, which controls the set of architectures that will be built for all targets in the workspace, including Swift packages. The recommended option (and default for new schemes) is “Match Run Destination”. Full details are available by clicking the information icon next to the “Override Architectures” setting on the scheme build options sheet in Xcode. (66146584)

I haven’t tested the new feature yet, but based on the description this could be what is happening: if you build your project with “my mac” as the run destination, and this “Override Architectures” is set to “Match Run Destination” for the Scheme you are building, then you end up with a binary that only has the architecture for your mac, instead of the architectures that you specified in your build configuration.

Possible solutions: build your project with “Any mac” selected instead of “My mac”, or disable “Override Architectures” entirely for the Schemes you are building (I don’t know where that setting is, I haven’t installed 15.3 yet)

1 Like

OK - I see , haven’t been into the release notes… Nut I’ll lok at this. Thanks - but IF this is the case, the might be a potential for changing this at the Projucer level, as the compiler configurations is created there, and the Projucer actually have a semilar setting - but that setting, where you can select a standard 64 bit architecture, might be overridden in Xcode 15.3 - let’s see …

Thanks
/Bo

Just bumping this thread to raise awareness I’m surprised this hasn’t been mentioned more unless I missed something.

If you’re like me you’ll send your executable to people to test and find your build doesn’t work on intel macs because XCode defaults to only building for your architecture now due to this lovely 15.3 ˖⁺‧₊˚ ˚₊‧⁺˖✮ feature ✮˖⁺‧₊˚ ˚₊‧⁺˖

Theres probably a flag you can set in your project for this, but I had to go
Product → Destination and set the destination to ‘Any mac’ instead of ‘My Mac’.
Note you can only build when you do this, not build and run.

2 Likes

That’s so dumbass.

I have Xcode 16 installed and I am building with xcodebuild via command line. Adding -destination "generic/platform=macOS" did the trick for me.

You can use lipo - archs <PluginName>.vst/Contents/MacOS/<PluginName> to check if your binary contains both Intel and ARM builds. If it does, it outputs x86_64 arm64