JUCE and macOS 11 / ARM

I found this and had to put set my signing ID in the xcode exporter settings in projucer. Works fine now for testing.

1 Like

Thanks, that indeed seems to fix it! Iā€™m using cmake so I used the instructions in the CMake api doc to add the code sign identity and development team. I couldnā€™t figure out how to apply them to the DemoRunner but I followed the instructions for building the basic GUI app and that worked.

I must say itā€™s still strange that changing these settings in Xcode isnā€™t enough. And itā€™s also strange that creating a project in Xcode (and downloading one from appleā€™s dev site) happily profile without the need for this. My guess would be that thereā€™s something configured wrong in the JUCE generated projects. Or maybe Apple is giving preferential abilities for itā€™s own project files or something? Thatā€™s probably far-fetched but who knows.

I double checked on my other machine using the same test setup (Cmake GuiApp example) and confirmed that the signing information is not required for profiling with that setup.

Machine 1 (no signing required) : intel, Catelina 10.15.6, Xcode 12.1
Machine 2 (signing required): m1, Big Sur 11.0.1, Xcode 12.2

Both machines used current JUCE master with CMake 3.19.1

Iā€™ve now discovered that changing anything in the project file from within Xcode will cause Instruments to stop showing the symbols again. Between this and swift projects not requiring signing I think Iā€™ll chalk this all up to bugs in Xcode.

@ graeme-2 how did you get cmake to with juce ?

Im having issues with juceadie compiling, it appears to be assuming mac are intel?

Ive got cmake (from homebrew) building my other cmake native projects successfullyā€¦ but juce is throwing errors.


FIXED: needed to pull new version of juce - thanks @reuk for the info

another small issueā€¦

I created universal binaries for vst2 and vst3.
both show up in AudioPluginHost without issue.

however, Intel hosts specically Ableton Live 11 (beta)/Bitwig 3.3 , only the vst3 shows up. neither show the VST2 ā€¦ if I do file on the vst2, it shows both the arm and x86 build.

note: this is using cmake, but not sure if this is relevant or not.

Has anyone been able to profile an ARM release build and see per line performance metrics in your source code? I have set up my signing ID in projucer, disabled Strip Local Symbols, and added the suggested Xcode flags, but when profiling via Instruments Iā€™m only able to see the machine code, not the C++.

@DavidCNAntonia, @graeme-2 - does this work for you?

Hi ericsen. Sorry, I ended up returning the M1 so I donā€™t know anything more about the issue.

1 Like

i donā€™t have an ARM but iā€™ve noticed that on my (intel) mac when i select ā€œprofileā€ from xcode the first run never has symbols. i have to stop it in instruments, go back to xcode, then ā€œprofile without buildingā€, then i get symbols.

Thanks, but the ā€œProfile without buildingā€ is greyed out here. I am getting symbols though, Iā€™m just not able to dig into the source code too see exactly where bottlenecks might be. However, it seems itā€™s not ARM specific. I am able to do this in Visual Studio and on my older Mac/Xcode, but on BigSur/Xcode12 I canā€™t get it to show on neither Intel or Apple Silicon builds.

As Iā€™m barely one level above moron I might be missing something obvious, but Iā€™m wondering if anyone is able to get ā€œper lineā€ profiling to work on BigSur/Xcode12?

Would you elaborate on the lines you added to patch the AAX SDK? Could you post a git gist somewhere?

On May 19th, Avid made an announcement titled ā€œCompiling AAX SDK 2.3.2 for Apple Siliconā€ on their developer forum.
You can also find a link to that announcement/article from the Avid Developer Newsletter 127.

5 Likes

Iā€™m still a bit confused about arm64 vs arm64e architectures: which one is needed for a plugin or app to run on apple silicon macs? I read that appleā€™s own binaries use arm64e ?

arm64.

arm64e is still ONLY for kernel related code and requires extra signing from Apple. It might be changed in the future but thatā€™s the state at least with macOS 11 and 12 with M1 chips.

5 Likes

It looks like Apple intends for it to be more widely used than just things in the kernel. What limits us using it now?

https://developer.apple.com/documentation/security/preparing_your_app_to_work_with_pointer_authentication

1 Like

Mind the -

Test your app against the arm64e architecture to ensure that it works seamlessly with enhanced security features.

You should also prepare for deprecating AUv2, OpenGL and more.

Currently for plug-ins (and apps) - arm64 is the most compatible and recommended.

So itā€™s indeed important to test and evaluate ahead (similar to getting a DTK to get yourself ready when itā€™ll be the recommended)

2 Likes