XCode 12.2 and jassert build errors

Just updated XCode to 12.2. When building I’m now getting “Invalid token in expression” and “Invalid operand” errors wherever “jassertfalse” and “jassert” are called. Anyone else experiencing this?

Are you using latest JUCE? You are probably compiling a universal binary now and using an older JUCE that doesn’t support macOS for ARM.

We’re not. We forked off a while ago to make some customizations, so updating is a bit arduous and only done as needed. I just wanted to check here first to see if others were experiencing it regardless of version.

Will update and check back in if it’s still broken.

You’ll want to add

#elif JUCE_MAC && JUCE_CLANG && JUCE_ARM
  #define JUCE_BREAK_IN_DEBUGGER        { __builtin_debugtrap(); }

in juce_PlatformDefs.h

There are a few other changes you’ll require for ARM as well. Probably a good idea to update to latest juce.

thank you! That did get rid of the error, but now it’s running into another. Time for an update!

You’ll need at least https://github.com/juce-framework/JUCE/commit/b27017a5e3db1d6acf11d89f35adfe7de8bdb600 (part of 6.0.2) and a few other commits (probably https://github.com/juce-framework/JUCE/commit/f9f5caa5cc5495c39454b310241b0710fcfdd57b and https://github.com/juce-framework/JUCE/commit/3ad48358549c0daebb7733bf5f3f9bdc4192d501).

2 Likes

Hello,
I’m building with XCode 12.2 on BigSur and had this issue with JUCE 5. After upgrading to JUCE 6 the jassert build errors have subsided but now I’ve ran into a new issue.

As you can see, even with the global path including our copy of the VST2_SDK headers, JUCE6 is not bringing them into the build. I double checked the XCode exporter to make sure it points to the correct directory for the VST Legacy Folder. Any ideas on what else I may be missing?

Thank you,
Christopher Soderquist – Polyverse

What do you have set for the VST2 path in the projects exporter? Maybe you have conflicting paths?

I’ve got the field empty so as to default to the global path

EDIT: Hmmm it seems as though it is exporter related. I created a brand new XCode exporter with default settings and now the build completes with no errors. I will investigate further and report back with the difference/cause if I find it, that way others who run into this issue will know what’s going on.

EDIT2: I made a mistake as I’m not used to XCode. Please see my lower post about header names not matching up.

Can you post a diff in what changed in the .jucer file?

I made a mistake. XCode automatically switched to SharedCode instead of All, so I thought the build succeeded when in fact it did not. I had an id10t moment.

Even with the new exporter it still fails giving me the issue with missing VST2 headers. All modules are set to global paths. Exporter uses global path. Global path is set to the VST2_SDK directory.

Did the names of the VST 2 header files change at any point? On closer look it seems as though the header names are different than what JUCE expects. I did a quick search on Google for VST 2 example and all use the long name audioeffectx, but JUCE is expecting aeffectx?

Thank you all again for the help.

Chris Soderquist - Polyverse

EDIT: A screenshot of what I mean:

EDIT 2:
And I solved it. My apologies for all the posts in this thread.

This post clued me off, it’s our first time migrating to JUCE 6.

SOLUTION: I copied the headers from the VST2 folder into VST3, set the legacy folder as the VST3_SDK, and now the build passes. I understand that this is a wrapper of sorts with VST3 but that’s okay. This allows us to support VST and OS11 so it’s a win for us.

Cheers and thank you again!

Chris Soderquist - Polyverse