Cmake build failing on bigsur / apple silicon

juceaide is failing to build on mac mini m1 / BigSur 11.0.1

Im trying to build native (arm) juce vst3 plugins using cmake.

(my other non-juce projects are compiling quite happily with cmake/native… just issues with juce)

-- Building juceaide
CMake Error at juce/extras/Build/juceaide/CMakeLists.txt:86 (message):
  Failed to build juceaide

just taking one of the build errors, we can see its failing on the asm(“int $3”)
my assumption is, juce is assuming MAC == INTEL

   #define JUCE_BREAK_IN_DEBUGGER       { }
   #define JUCE_BREAK_IN_DEBUGGER       { asm ("int $3"); }
  #define JUCE_BREAK_IN_DEBUGGER        { __builtin_trap(); }
  #define JUCE_BREAK_IN_DEBUGGER        { __asm int 3 }

Note: I know I can just define JUCE_NO_INLINE_ASM here to get around the issue, but that feels like its just kicking the can down the road… if other parts of JUCE are going to assume MAC=INTEL.
(e.g.dsp code with SSE will trip up next)

is there any work being done in this area?
has anyone got this working?

1 Like

Please ensure you’re using a recent version of JUCE. It looks like your version is not up to date with the current master branch:

1 Like

wow, things moving fast in this area… I think I only pulled master about a week ago :slight_smile:

thanks @reuk thats fixed it!!