VST/AU builds fail after upgrading to Xcode 15

I have been having problems compiling any projects at all, including the provided examples. I followed your instructions and while I was able to compile ProJuicer, I was not able to compile the demo projects. I am still getting the same 2 errors:

"If you are using Link Time Optimisation (LTO), the new linker introduced in Xcode 15 may produce a broken binary. As a workaround, add either ‘-Wl,-weak_reference_mismatches,weak’ or ‘-Wl,-ld_classic’ to your linker flags.

Once you’ve selected a workaround, you can add JUCE_SILENCE_XCODE_15_LINKER_WARNING to your preprocessor definitions to silence this warning."

and

"“Static assertion failed due to requirement ‘std::string_view(“15.0.0 (clang-1500.0.40.1)”) != std::string_view(“15.0.0 (clang-1500.0.40.1)”)’: The new linker introduced in Xcode 15.0 will produce broken binaries when targeting older platforms. To work around this issue, bump your deployment target to macOS 13 or iOS 15, re-enable the old linker by adding ‘-Wl,-ld_classic’ to your link flags, or update to Xcode 15.1. Once you’ve selected a workaround, you can add JUCE_SILENCE_XCODE_15_LINKER_WARNING to your preprocessor definitions to silence this warning.”

I have tried this to no avail. Yesterday, by manually editing these fields in the Build Settings, I was able to build the project I was working on, but when I reopened the project in Xcode, it appears these settings were lost, and editing them no longer fixes this.

I’m on Xcode 15.0.1 for MacOS 13.5

@mydearzampano that is expected.

On some of the most popular projects (listed below) we have enabled the -Wl,-weak_reference_mismatches,weak linker flag, and silenced the warning to make things easier for customers

  • Projucer
  • DemoRunner
  • AudioPluginHost
  • UnitTestRunner
  • BinaryBuilder
  • juceaide

This isn’t foolproof as if these projects are run on anything less than macOS 13 or iOS 15 they will likely crash! For the public version of the Projucer on our website it uses the -Wl,-ld_classic flag which will mean it can run on older platforms.

For any project not listed above (including your own) you’ll have to read the warning and or error message and decide how you would like to proceed. There isn’t an easy option we can offer.

Here’s what I suggest.


If you know you’ll always be building with Xcode 15 (that includes all the developers working on the project and your CI!)

  • Enable the -Wl,-ld_classic linker flag
  • Add the JUCE_SILENCE_XCODE_15_LINKER_WARNING preprocessor definition

Once the linker flag is added the project will NOT build using older versions of Xcode, this is why we can’t just enable this by default.


If you need to support older versions of Xcode and you only need to support macOS 13+ and/or iOS 15+

  • Enable the -Wl,-weak_reference_mismatches,weak linker flags
  • Update your deployment targets
  • Add the JUCE_SILENCE_XCODE_15_LINKER_WARNING preprocessor definition

We currently support macOS 10.9+ and iOS 9+ jumping up to these version would not be very popular hence we can’t take this option.


If you need to support older versions of Xcode AND you need to support versions less than macOS 13 and/or iOS 15 and you are using an older version of Xcode to build binaries released to your customers

  • Enable the -Wl,-weak_reference_mismatches,weak linker flags
  • Add the JUCE_SILENCE_XCODE_15_LINKER_WARNING preprocessor definition
  • WARNING: Builds made using Xcode 15 will not run on devices running version less than macOS 13 and/or iOS 15

Again, we currently support macOS 10.9+ and iOS 9+ causing crashes on these versions would not be very popular hence we can’t take this option.


If you need to support older versions of Xcode AND you need to support versions less than macOS 13 and/or iOS 15 and you are using Xcode 15 to build binaries released to your customers

  • Just on builds made using Xcode 15 you’ll need to find a way to inject the -Wl,-ld_classic linker flag without also imposing this flag on builds made using older versions of Xcode
  • Add the JUCE_SILENCE_XCODE_15_LINKER_WARNING preprocessor definition

There is no easy way for us to do this automatically for you otherwise that is what we would probably do.


As you can see there is no easy answer, these are known issues with the new linker in Xcode 15 (see here) and there is nothing much we can do about it. The warning / error is there to let you know rather than finding out by releasing a product to customers and then having them reporting back crashes that are hard for you to debug or reproduce.

It’s worth noting that once Xcode 15.1 is officially released we’ll likely drop support for Xcode 15.0 altogether, but unfortunately it looks like only one of the two issues is likely to be solved in the next version so these problems are unlikely to completely disappear.

Wherever possible I would strongly recommend not upgrading to Xcode 15 until these problems are fully resolved.

1 Like

Just to add if you’re using CMake and linking against juce_recommended_lto_flags the -Wl,-weak_reference_mismatches,weak linker flags are now being added for you.

2 Likes

@anthony-nicholls looking at the 15.1 beta notes, says one of these issues has been fixed
Do I understand correctly, once it is released we can enable the -Wl,-weak_reference_mismatches,weak linker flags, and build (taking advantage of the new linker speed-up), and software will run fine on macOS older than 13?

Yes it does look like that is the case, so it should be a lot simpler once you’re on Xcode 15.1 as then you can just enable -Wl,-weak_reference_mismatches,weak to make things easier we’ll likely review adding this to all projects by default.

This fixed it for me and my projects are building again. I suspect that yesterday the Build Settings may not have updated in Xcode because the code for the project itself had not changed and the IDE attempted to launch the most recent (failed) build… Thanks for your patience and all of the help, Anthony. :slight_smile:

1 Like

I upgraded to JUCE 7.0.8 and am able to use Projucer as the source of truth and am able to build and create my MAC OS X installer. I’m unblocked from testing MAC OS X. Will share updates here.

I also confirm: JUCE 7.0.8 + Xcode 15.1 = build goodness. No workarounds needed.

1 Like

This ended up fixing the build error for my project! I don’t seem to understand why that helped because my Projucer always worked but I’m not complaining lol.

The Projucer generates the project files so it’s important that when you update your JUCE source, that you also rebuild or redownload the latest version of the Projucer as there may be changes to it in order to accommodate for any required changes.

1 Like

Can confirm this fixed my problems (after updating to Xcode 15.1 and Juce 7.0.8)

1 Like

I have updated to XCode 15.1 and Juce 7.0.8, added -Wl,-ld_classic linker flags and JUCE_SILENCE_XCODE_15_LINKER_WARNING preprocessor definition (both to the Projucer Xcode export settings) and am still receiving the build error "Command CodeSign failed with a nonzero exit code
". I’m getting frustrated as I am completely new to JUCE and am pretty excited to learn it but this error has been in the way for a day now. Could anyone help? I’m on Macbook M1 Air 2020 if it matters.

“Command CodeSign failed with a nonzero exit code” is a very different error, it seems something is going wrong when you’re trying to sign your binary. Without more information it’s hard to say what it might be.

In Xcode you can probably find out more by working through the following steps (See the screenshot below)…

  1. Select the report navigator in the left hand pane
  2. Select the failed build in the same pane
  3. Select the sign step in the main window pane
  4. Select the three lines at the far right of that step

This should reveal the output of the step, from there you should hopefully have more information about what went wrong during the signing step. At a guess you’ll probably either need to sign up for a developer account from Apple or add your login details tp Xcode, alternatively there is something called “adhoc” signing which would allow you to build and run your apps/plugins on your local machine only.

This post looks like it would have some useful information to help you get started.

1 Like

In my experience, it is far more likely to be caused by a bug (or undocumented behaviour) in Xcode, than it is by you having an error in your configuration.

I wrote a somewhat detailed post about my experiences here:

Following those steps (any knowing about the pit falls now) always fixed it for me.

This resolved the problem. Thank you so much!

2 Likes

@anthony-nicholls ,
Is there any workaround if I’m using Xcode 15.1 and Producer 6.1.6 and have the error “Cycle inside project - AAX; building could produce unreliable results”?

Thank you

In general, Xcode versions released after a particular JUCE version can’t be expected to work with that version’s Projucer. This is because the build behaviours in new Xcode versions sometimes change in ways that cannot be predicted. My advice would be to either downgrade your Xcode version to one contemporary with JUCE 6.1.6, or to upgrade your JUCE project to use a version of JUCE released after Xcode 15.1 (which in practice would mean updating to the current develop branch).

Thank you for the reply.
So if I understand correctly, if I updated to the last Juce version everything must be ok and the problem will be solved?

I believe this issue was fixed on develop, yes.

1 Like