JUCE and macOS 11 / ARM

This is pretty easy to fix, you just need at add some defines for macos and arm.

I will test this a get back to you.

3 Likes

I just tested on 10.9, 10.10 and 10.11

Fat binary DAW works on all of them
Fat binary plugin works on 10.10 and 10.11

3 Likes

Thanks so much! Just curious if the ones you tested were Notarized, Iā€™m curious if that might have an effect as well since the issue I heard about seemed to stem from code signatures.

Yes, they were signed and notarized. They were release candidate builds, so they were exactly the same builds / installers the users would get.

1 Like

Unfortunately, I canā€™t get anything to actually run in debug with logic when thread sanitiser is enabled. I used standalone to get rid of any issues that could point out with the threading. I am now managing to get it through AU validation. Here are the results I get from the consoleā€¦

Without thread sanitiser enabled:

2020-11-16 16:40:00.777959-0800 Logic Pro[2458:115901] [audiocomp] AUv3Instance.mm:817 Invalid property id 1098015046 (scope 0, element 0)

With thread sanitiser enabled:

2020-11-16 16:38:12.849887-0800 Logic Pro[2427:113602] [AUHostingService] AUHostingServiceClient.mm:231 [AUHostingService Client] connection interrupted.
2020-11-16 16:38:12.849970-0800 Logic Pro[2427:113663] [audiocomp] AUNSExtension.mm:542 Failed to open AudioUnit remotely: Error Domain=NSCocoaErrorDomain Code=4097 ā€œconnection to service on pid 2437 created from an endpointā€ UserInfo={NSDebugDescription=connection to service on pid 2437 created from an endpoint}
2020-11-16 16:38:12.850062-0800 Logic Pro[2427:113663] [audiocomp] APComponent.mm:274 error 4097 returned from OpenAsync for aufx/PLUGINID/MANUID/0x1c/0x0

I guess this latter error is down to the fact that thread sanitiser is running and it just doesnā€™t like it - AU val fails when it is enabled. No idea what the invalid property id is about though as it works everywhere else. Not quite sure where to find ā€œAUv3Instance.mmā€ to work out this oddity.

After some fixes to the above threading issues, it appears to work in Reaper thank you. I assume it will be loading the ARM version rather than the intel build?

I would not be too sure about that.

I just played around with that Reaper build on my DTK running Mac OS 11.0.1. Reaper is able to load AU and VST plugins compiled for x86_64 only, with AU being silently bridged by some layer obviously supplied by Apple (Logic uses the same) and VST being a bit more obviously bridged by Reapers own implementation that was already available to bridge e.g. 32 Bit x86 plugins running in a 64 Bit x86_64 environment. You can see that AU bridge in the activity monitor, look for AUHostingCompatibilityService (Reaper) there.

I also managed to run a universal binary VST3 natively in Reaper, but Iā€™m not sure if in case Reaper detects that the ARM part of a UB cannot be launched, the bridge is being used silently in the background?

2 Likes

Weird, when I tested with the Reaper ARM build, it loaded my universal plugins as ARM versions for all three plugin formats.

It doesnā€™t appear that AUHostingCompatibilityService is running - the only difference to my setup is that I am running Big Sur Beta 5 (Iā€™m downloading the release version as I type). The only thing reaper in activity monitor is saying that it is running as ā€œAppleā€ rather than ā€œIntelā€ in the ā€œKindā€ column.

1 Like

Out of curiosity, what happens on 10.9 for plug-ins? they arenā€™t even scanned? or they are scanned but crash on loading?
Also, does this apply to the Stand-alone version too, or that one does also run on 10.9?

They fail scanning. I believe loading the dylib is failing.

Standalone should be fine.

Finally got this working. I had to enable ā€œRuntime Exceptions: Disable Library Validationā€ for the plugin to pass AU validation with the release build. Not 100% sure why but it now works. Give it a go if your ARM builds are not validating in logic.

3 Likes

Was running into this issue myself and this was helpful! After some digging around on the Apple forums I also discovered that library validation is only available for macOS 10.9 and up. I was able to get my AUs to run in ARM mode by including the Runtime Exception you suggested, but changing the OS target to 10.9 or higher also fixed the problem without needing that exception.

Im wondering now why this is only an issue with the ARM builds, if library validation doesnā€™t work when you target 10.8 why isnā€™t that an issue for Intel builds? Seems like we might keep discovering some back compatibility quirks with these Universal Binaries for a while.

2 Likes

Itā€™s interesting you find it works with 10.9 and higher as I target 10.11 so by that theory it doesnā€™t quite match up, there must be something else going on.

1 Like

Iā€™m in the same situation as you have been (plug-in failing when rescanning in Logic because of complaint regarding ā€œarm64eā€ architecture, and manually launching ā€œauval -compā€ says that it couldnā€™t find the component)

Have you been able to find the problematic settings that cause that?

(might have to spawn a new topic about that shortly if I cannot find a solution soon)

I think removing QTKit framework from Xcode project will do the trick. Donā€™t forget to clean project before building (for a start, i suggest you to manually delete existing/non-working component file as well).

Thank you, but the fact is that QTKit has never been in the project so that canā€™t be the cause.

Iā€™m seeing the same problems with a plug-in compiled from a default plug-in project just created with Projucer. Time to create a specific topic on the subject

Done so, the new topic for that specific issue is: Default AU from Projucer fails auval on Apple Silicon Big Sur (DTK) [SOLVED]

Iā€™d be interested if @zabukowski (or whoever is happily validating AUs on their ARM64 macs) could comment there with the version number of auval that they have (and possibly of macOS, I guess that might be a factor too)

EDIT: Iā€™ve solved the issue, visit the linked topic for the detailed description of what the problem was

How are you able to target 10.8? The min Xcode version for ARM is 12 and the lowest possible target sdk appears to be 10.9 or am I missing something?

My mistake, I set the target in Projucer to 10.8 but this didnā€™t carry over to XCode and it instead was 10.9

Just picked up a new arm machine and with Xcode 12.2 Iā€™m finding Time Profiler will not show symbols for DemoRunner (and my own app). If I go to Instruments -> File -> Symbols -> Expand ā€œDemoRunnerā€ is says ā€œPermission to profile this process was denied. Applications you wish to profile must be signed with a developer codeā€. Changing signing options however doesnā€™t seem to have any effect. For testing sake I created a blank swift project in Xcode and that had no issues with symbols despite having no code signing options set. Wondering if anyoneā€™s seen this. Searching google for that error message brings up zero results.

1 Like