CLion Setup

Hi there,

i’m struggling with setting up CLion and building a first CMake demo plugin ‘AudioPlugin’.
I’ve copied Juce into the project root and edited CMakeLists.txt:

add_subdirectory(/Users/me/Development/cpp/AudioPlugin/JUCE-6.1.4)

When trying to build for Debug mode i get these errors:

/Applications/CLion.app/Contents/bin/cmake/mac/bin/cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_MAKE_PROGRAM=/Applications/CLion.app/Contents/bin/ninja/mac/ninja -G Ninja /Users/me/Development/cpp/AudioPlugin -- Configuring juceaide
CMake Error at JUCE-6.1.4/extras/Build/juceaide/CMakeLists.txt:76 (message):
  Failed to configure juceaide

  CMake Error: CMake was unable to find a build program corresponding to
  "Ninja".  CMAKE_MAKE_PROGRAM is not set.  You probably need to select a
  different build tool.

  CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage

  CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage

  -- Configuring incomplete, errors occurred!

cmake and ninja are present and i don’t see anything missing in the Toolchains area of CLion.
Could someone please enlighten me what i’m missing here in order to build successfully?
I use most recent versions of Juce and CLion.
Thanks a lot.

Do you have Ninja on your path? That is, if you run ninja from a console window, is the program located successfully?

I’d strongly advise against using an absolute path here, as this will make it tricky to distribute the project. Imagine you need to work on a different computer for a while (e.g. to test on Windows) - the hard-coded path won’t work. Instead, I’d suggest using a relative path to JUCE. If JUCE has been copied into your project directory, then you could just write add_subdirectory(JUCE-6.1.4)

No it’s not, but is it necessary if the full path to it is defined for DCMAKE_MAKE_PROGRAM?

The CMAKE_MAKE_PROGRAM from the outer build is not propagated to the inner build of juceaide, although the CMAKE_GENERATOR is. This means that currently, it’s necessary for the make program to be on the path.

Ok i’m a step further and now get these errors:

/Applications/CLion.app/Contents/bin/cmake/mac/bin/cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_MAKE_PROGRAM=/Applications/CLion.app/Contents/bin/ninja/mac/ninja -G Ninja /Users/valley/Development/cpp/AudioPlugin
-- Configuring juceaide
-- Building juceaide
CMake Error at JUCE-6.1.4/extras/Build/juceaide/CMakeLists.txt:89 (message):
  Failed to build juceaide

  [0/2] Re-checking globbed directories...

  [1/5] Building CXX object
  extras/Build/juceaide/CMakeFiles/juceaide.dir/__/__/__/modules/juce_events/juce_events.mm.o


  FAILED:
  extras/Build/juceaide/CMakeFiles/juceaide.dir/__/__/__/modules/juce_events/juce_events.mm.o


  /Library/Developer/CommandLineTools/usr/bin/c++ -DDEBUG=1
  -DJUCE_DISABLE_JUCE_VERSION_PRINTING=1
  -DJUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1
  -DJUCE_MODULE_AVAILABLE_juce_build_tools=1
  -DJUCE_MODULE_AVAILABLE_juce_core=1
  -DJUCE_MODULE_AVAILABLE_juce_data_structures=1
  -DJUCE_MODULE_AVAILABLE_juce_events=1
  -DJUCE_MODULE_AVAILABLE_juce_graphics=1
  -DJUCE_MODULE_AVAILABLE_juce_gui_basics=1 -DJUCE_STANDALONE_APPLICATION=1
  -DJUCE_USE_CURL=0 -D_DEBUG=1
  -I/Users/valley/Development/cpp/AudioPlugin/cmake-build-debug/JUCE-6.1.4/tools/extras/Build/juceaide/juceaide_artefacts/JuceLibraryCode
  -I/Users/valley/Development/cpp/AudioPlugin/JUCE-6.1.4/extras/Build
  -I/Users/valley/Development/cpp/AudioPlugin/JUCE-6.1.4/modules -arch arm64
  -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX12.1.sdk
  -mmacosx-version-min=11.6 -g -O0 -Wall -Wshadow-all -Wshorten-64-to-32
  -Wstrict-aliasing -Wuninitialized -Wunused-parameter -Wconversion
  -Wsign-compare -Wint-conversion -Wconditional-uninitialized
  -Wconstant-conversion -Wsign-conversion -Wbool-conversion -Wextra-semi
  -Wunreachable-code -Wcast-align -Wshift-sign-overflow
  -Wno-missing-field-initializers -Wnullable-to-nonnull-conversion
  -Wno-ignored-qualifiers -Wswitch-enum -Wpedantic
  -Wzero-as-null-pointer-constant -Wunused-private-field -Woverloaded-virtual
  -Wreorder -Winconsistent-missing-destructor-override -std=c++14 -MD -MT
  extras/Build/juceaide/CMakeFiles/juceaide.dir/__/__/__/modules/juce_events/juce_events.mm.o
  -MF
  extras/Build/juceaide/CMakeFiles/juceaide.dir/__/__/__/modules/juce_events/juce_events.mm.o.d
  -o
  extras/Build/juceaide/CMakeFiles/juceaide.dir/__/__/__/modules/juce_events/juce_events.mm.o
  -c
  /Users/valley/Development/cpp/AudioPlugin/JUCE-6.1.4/modules/juce_events/juce_events.mm


  In file included from
  /Users/valley/Development/cpp/AudioPlugin/JUCE-6.1.4/modules/juce_events/juce_events.mm:23:


  In file included from
  /Users/valley/Development/cpp/AudioPlugin/JUCE-6.1.4/modules/juce_events/juce_events.cpp:42:


  In file included from
  /Users/valley/Development/cpp/AudioPlugin/JUCE-6.1.4/modules/juce_events/juce_events.h:52:


  In file included from
  /Users/valley/Development/cpp/AudioPlugin/JUCE-6.1.4/modules/juce_core/juce_core.h:197:


  In file included from
  /Users/valley/Development/cpp/AudioPlugin/JUCE-6.1.4/modules/juce_core/native/juce_BasicNativeHeaders.h:45:


  In file included from
  /Library/Developer/CommandLineTools/SDKs/MacOSX12.1.sdk/System/Library/Frameworks/Cocoa.framework/Headers/Cocoa.h:12:


  In file included from
  /Library/Developer/CommandLineTools/SDKs/MacOSX12.1.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:12:


  
  /Library/Developer/CommandLineTools/SDKs/MacOSX12.1.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSBundle.h:91:143:
  error: function does not return NSString

  - (NSAttributedString *)localizedAttributedStringForKey:(NSString *)key
  value:(nullable NSString *)value table:(nullable NSString *)tableName
  NS_FORMAT_ARGUMENT(1) NS_REFINED_FOR_SWIFT API_AVAILABLE(macos(12.0),
  ios(15.0), watchos(8.0), tvos(15.0));

                                                           ~~~~~~~~~~~~~~                                                                       ^                  ~

  
  /Library/Developer/CommandLineTools/SDKs/MacOSX12.1.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSObjCRuntime.h:103:48:
  note: expanded from macro 'NS_FORMAT_ARGUMENT'

          #define NS_FORMAT_ARGUMENT(A) __attribute__ ((format_arg(A)))
                                                        ^          ~

  1 error generated.

  [2/5] Building CXX object
  extras/Build/juceaide/CMakeFiles/juceaide.dir/__/__/__/modules/juce_graphics/juce_graphics.mm.o


  FAILED:
  extras/Build/juceaide/CMakeFiles/juceaide.dir/__/__/__/modules/juce_graphics/juce_graphics.mm.o


  /Library/Developer/CommandLineTools/usr/bin/c++ -DDEBUG=1
  -DJUCE_DISABLE_JUCE_VERSION_PRINTING=1
  -DJUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1
  -DJUCE_MODULE_AVAILABLE_juce_build_tools=1
  -DJUCE_MODULE_AVAILABLE_juce_core=1
  -DJUCE_MODULE_AVAILABLE_juce_data_structures=1
  -DJUCE_MODULE_AVAILABLE_juce_events=1
  -DJUCE_MODULE_AVAILABLE_juce_graphics=1
  -DJUCE_MODULE_AVAILABLE_juce_gui_basics=1 -DJUCE_STANDALONE_APPLICATION=1
  -DJUCE_USE_CURL=0 -D_DEBUG=1
  -I/Users/valley/Development/cpp/AudioPlugin/cmake-build-debug/JUCE-6.1.4/tools/extras/Build/juceaide/juceaide_artefacts/JuceLibraryCode
  -I/Users/valley/Development/cpp/AudioPlugin/JUCE-6.1.4/extras/Build
  -I/Users/valley/Development/cpp/AudioPlugin/JUCE-6.1.4/modules -arch arm64
  -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX12.1.sdk
  -mmacosx-version-min=11.6 -g -O0 -Wall -Wshadow-all -Wshorten-64-to-32
  -Wstrict-aliasing -Wuninitialized -Wunused-parameter -Wconversion
  -Wsign-compare -Wint-conversion -Wconditional-uninitialized
  -Wconstant-conversion -Wsign-conversion -Wbool-conversion -Wextra-semi
  -Wunreachable-code -Wcast-align -Wshift-sign-overflow
  -Wno-missing-field-initializers -Wnullable-to-nonnull-conversion
  -Wno-ignored-qualifiers -Wswitch-enum -Wpedantic
  -Wzero-as-null-pointer-constant -Wunused-private-field -Woverloaded-virtual
  -Wreorder -Winconsistent-missing-destructor-override -std=c++14 -MD -MT
  extras/Build/juceaide/CMakeFiles/juceaide.dir/__/__/__/modules/juce_graphics/juce_graphics.mm.o
  -MF
  extras/Build/juceaide/CMakeFiles/juceaide.dir/__/__/__/modules/juce_graphics/juce_graphics.mm.o.d
  -o
  extras/Build/juceaide/CMakeFiles/juceaide.dir/__/__/__/modules/juce_graphics/juce_graphics.mm.o
  -c
  /Users/valley/Development/cpp/AudioPlugin/JUCE-6.1.4/modules/juce_graphics/juce_graphics.mm


  In file included from
  /Users/valley/Development/cpp/AudioPlugin/JUCE-6.1.4/modules/juce_graphics/juce_graphics.mm:26:


  In file included from
  /Users/valley/Development/cpp/AudioPlugin/JUCE-6.1.4/modules/juce_graphics/juce_graphics.cpp:41:


  In file included from
  /Users/valley/Development/cpp/AudioPlugin/JUCE-6.1.4/modules/juce_graphics/juce_graphics.h:58:


  In file included from
  /Users/valley/Development/cpp/AudioPlugin/JUCE-6.1.4/modules/juce_core/juce_core.h:197:


  In file included from
  /Users/valley/Development/cpp/AudioPlugin/JUCE-6.1.4/modules/juce_core/native/juce_BasicNativeHeaders.h:45:


  In file included from
  /Library/Developer/CommandLineTools/SDKs/MacOSX12.1.sdk/System/Library/Frameworks/Cocoa.framework/Headers/Cocoa.h:12:


  In file included from
  /Library/Developer/CommandLineTools/SDKs/MacOSX12.1.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:12:


  
  /Library/Developer/CommandLineTools/SDKs/MacOSX12.1.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSBundle.h:91:143:
  error: function does not return NSString

  - (NSAttributedString *)localizedAttributedStringForKey:(NSString *)key
  value:(nullable NSString *)value table:(nullable NSString *)tableName
  NS_FORMAT_ARGUMENT(1) NS_REFINED_FOR_SWIFT API_AVAILABLE(macos(12.0),
  ios(15.0), watchos(8.0), tvos(15.0));

                                                           ~~~~~~~~~~~~~~                                                                       ^                  ~

  
  /Library/Developer/CommandLineTools/SDKs/MacOSX12.1.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSObjCRuntime.h:103:48:
  note: expanded from macro 'NS_FORMAT_ARGUMENT'

          #define NS_FORMAT_ARGUMENT(A) __attribute__ ((format_arg(A)))
                                                        ^          ~

  1 error generated.

  [3/5] Building CXX object
  extras/Build/juceaide/CMakeFiles/juceaide.dir/__/__/__/modules/juce_core/juce_core.mm.o


  FAILED:
  extras/Build/juceaide/CMakeFiles/juceaide.dir/__/__/__/modules/juce_core/juce_core.mm.o


  /Library/Developer/CommandLineTools/usr/bin/c++ -DDEBUG=1
  -DJUCE_DISABLE_JUCE_VERSION_PRINTING=1
  -DJUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1
  -DJUCE_MODULE_AVAILABLE_juce_build_tools=1
  -DJUCE_MODULE_AVAILABLE_juce_core=1
  -DJUCE_MODULE_AVAILABLE_juce_data_structures=1
  -DJUCE_MODULE_AVAILABLE_juce_events=1
  -DJUCE_MODULE_AVAILABLE_juce_graphics=1
  -DJUCE_MODULE_AVAILABLE_juce_gui_basics=1 -DJUCE_STANDALONE_APPLICATION=1
  -DJUCE_USE_CURL=0 -D_DEBUG=1
  -I/Users/valley/Development/cpp/AudioPlugin/cmake-build-debug/JUCE-6.1.4/tools/extras/Build/juceaide/juceaide_artefacts/JuceLibraryCode
  -I/Users/valley/Development/cpp/AudioPlugin/JUCE-6.1.4/extras/Build
  -I/Users/valley/Development/cpp/AudioPlugin/JUCE-6.1.4/modules -arch arm64
  -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX12.1.sdk
  -mmacosx-version-min=11.6 -g -O0 -Wall -Wshadow-all -Wshorten-64-to-32
  -Wstrict-aliasing -Wuninitialized -Wunused-parameter -Wconversion
  -Wsign-compare -Wint-conversion -Wconditional-uninitialized
  -Wconstant-conversion -Wsign-conversion -Wbool-conversion -Wextra-semi
  -Wunreachable-code -Wcast-align -Wshift-sign-overflow
  -Wno-missing-field-initializers -Wnullable-to-nonnull-conversion
  -Wno-ignored-qualifiers -Wswitch-enum -Wpedantic
  -Wzero-as-null-pointer-constant -Wunused-private-field -Woverloaded-virtual
  -Wreorder -Winconsistent-missing-destructor-override -std=c++14 -MD -MT
  extras/Build/juceaide/CMakeFiles/juceaide.dir/__/__/__/modules/juce_core/juce_core.mm.o
  -MF
  extras/Build/juceaide/CMakeFiles/juceaide.dir/__/__/__/modules/juce_core/juce_core.mm.o.d
  -o
  extras/Build/juceaide/CMakeFiles/juceaide.dir/__/__/__/modules/juce_core/juce_core.mm.o
  -c
  /Users/valley/Development/cpp/AudioPlugin/JUCE-6.1.4/modules/juce_core/juce_core.mm


  In file included from
  /Users/valley/Development/cpp/AudioPlugin/JUCE-6.1.4/modules/juce_core/juce_core.mm:23:


  In file included from
  /Users/valley/Development/cpp/AudioPlugin/JUCE-6.1.4/modules/juce_core/juce_core.cpp:37:


  In file included from
  /Users/valley/Development/cpp/AudioPlugin/JUCE-6.1.4/modules/juce_core/juce_core.h:197:


  In file included from
  /Users/valley/Development/cpp/AudioPlugin/JUCE-6.1.4/modules/juce_core/native/juce_BasicNativeHeaders.h:45:


  In file included from
  /Library/Developer/CommandLineTools/SDKs/MacOSX12.1.sdk/System/Library/Frameworks/Cocoa.framework/Headers/Cocoa.h:12:


  In file included from
  /Library/Developer/CommandLineTools/SDKs/MacOSX12.1.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:12:


  
  /Library/Developer/CommandLineTools/SDKs/MacOSX12.1.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSBundle.h:91:143:
  error: function does not return NSString

  - (NSAttributedString *)localizedAttributedStringForKey:(NSString *)key
  value:(nullable NSString *)value table:(nullable NSString *)tableName
  NS_FORMAT_ARGUMENT(1) NS_REFINED_FOR_SWIFT API_AVAILABLE(macos(12.0),
  ios(15.0), watchos(8.0), tvos(15.0));

                                                           ~~~~~~~~~~~~~~                                                                       ^                  ~

  
  /Library/Developer/CommandLineTools/SDKs/MacOSX12.1.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSObjCRuntime.h:103:48:
  note: expanded from macro 'NS_FORMAT_ARGUMENT'

          #define NS_FORMAT_ARGUMENT(A) __attribute__ ((format_arg(A)))
                                                        ^          ~

  1 error generated.

  [4/5] Building CXX object
  extras/Build/juceaide/CMakeFiles/juceaide.dir/__/__/__/modules/juce_gui_basics/juce_gui_basics.mm.o


  FAILED:
  extras/Build/juceaide/CMakeFiles/juceaide.dir/__/__/__/modules/juce_gui_basics/juce_gui_basics.mm.o


  /Library/Developer/CommandLineTools/usr/bin/c++ -DDEBUG=1
  -DJUCE_DISABLE_JUCE_VERSION_PRINTING=1
  -DJUCE_GLOBAL_MODULE_SETTINGS_INCLUDED=1
  -DJUCE_MODULE_AVAILABLE_juce_build_tools=1
  -DJUCE_MODULE_AVAILABLE_juce_core=1
  -DJUCE_MODULE_AVAILABLE_juce_data_structures=1
  -DJUCE_MODULE_AVAILABLE_juce_events=1
  -DJUCE_MODULE_AVAILABLE_juce_graphics=1
  -DJUCE_MODULE_AVAILABLE_juce_gui_basics=1 -DJUCE_STANDALONE_APPLICATION=1
  -DJUCE_USE_CURL=0 -D_DEBUG=1
  -I/Users/valley/Development/cpp/AudioPlugin/cmake-build-debug/JUCE-6.1.4/tools/extras/Build/juceaide/juceaide_artefacts/JuceLibraryCode
  -I/Users/valley/Development/cpp/AudioPlugin/JUCE-6.1.4/extras/Build
  -I/Users/valley/Development/cpp/AudioPlugin/JUCE-6.1.4/modules -arch arm64
  -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX12.1.sdk
  -mmacosx-version-min=11.6 -g -O0 -Wall -Wshadow-all -Wshorten-64-to-32
  -Wstrict-aliasing -Wuninitialized -Wunused-parameter -Wconversion
  -Wsign-compare -Wint-conversion -Wconditional-uninitialized
  -Wconstant-conversion -Wsign-conversion -Wbool-conversion -Wextra-semi
  -Wunreachable-code -Wcast-align -Wshift-sign-overflow
  -Wno-missing-field-initializers -Wnullable-to-nonnull-conversion
  -Wno-ignored-qualifiers -Wswitch-enum -Wpedantic
  -Wzero-as-null-pointer-constant -Wunused-private-field -Woverloaded-virtual
  -Wreorder -Winconsistent-missing-destructor-override -std=c++14 -MD -MT
  extras/Build/juceaide/CMakeFiles/juceaide.dir/__/__/__/modules/juce_gui_basics/juce_gui_basics.mm.o
  -MF
  extras/Build/juceaide/CMakeFiles/juceaide.dir/__/__/__/modules/juce_gui_basics/juce_gui_basics.mm.o.d
  -o
  extras/Build/juceaide/CMakeFiles/juceaide.dir/__/__/__/modules/juce_gui_basics/juce_gui_basics.mm.o
  -c
  /Users/valley/Development/cpp/AudioPlugin/JUCE-6.1.4/modules/juce_gui_basics/juce_gui_basics.mm


  In file included from
  /Users/valley/Development/cpp/AudioPlugin/JUCE-6.1.4/modules/juce_gui_basics/juce_gui_basics.mm:26:


  In file included from
  /Users/valley/Development/cpp/AudioPlugin/JUCE-6.1.4/modules/juce_gui_basics/juce_gui_basics.cpp:46:


  In file included from
  /Users/valley/Development/cpp/AudioPlugin/JUCE-6.1.4/modules/juce_gui_basics/juce_gui_basics.h:57:


  In file included from
  /Users/valley/Development/cpp/AudioPlugin/JUCE-6.1.4/modules/juce_graphics/juce_graphics.h:58:


  In file included from
  /Users/valley/Development/cpp/AudioPlugin/JUCE-6.1.4/modules/juce_core/juce_core.h:197:


  In file included from
  /Users/valley/Development/cpp/AudioPlugin/JUCE-6.1.4/modules/juce_core/native/juce_BasicNativeHeaders.h:45:


  In file included from
  /Library/Developer/CommandLineTools/SDKs/MacOSX12.1.sdk/System/Library/Frameworks/Cocoa.framework/Headers/Cocoa.h:12:


  In file included from
  /Library/Developer/CommandLineTools/SDKs/MacOSX12.1.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:12:


  
  /Library/Developer/CommandLineTools/SDKs/MacOSX12.1.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSBundle.h:91:143:
  error: function does not return NSString

  - (NSAttributedString *)localizedAttributedStringForKey:(NSString *)key
  value:(nullable NSString *)value table:(nullable NSString *)tableName
  NS_FORMAT_ARGUMENT(1) NS_REFINED_FOR_SWIFT API_AVAILABLE(macos(12.0),
  ios(15.0), watchos(8.0), tvos(15.0));

                                                           ~~~~~~~~~~~~~~                                                                       ^                  ~

  
  /Library/Developer/CommandLineTools/SDKs/MacOSX12.1.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSObjCRuntime.h:103:48:
  note: expanded from macro 'NS_FORMAT_ARGUMENT'

          #define NS_FORMAT_ARGUMENT(A) __attribute__ ((format_arg(A)))
                                                        ^          ~

  1 error generated.

  ninja: build stopped: subcommand failed.



-- Configuring incomplete, errors occurred!
See also "/Users/valley/Development/cpp/AudioPlugin/cmake-build-debug/CMakeFiles/CMakeOutput.log".
See also "/Users/valley/Development/cpp/AudioPlugin/cmake-build-debug/CMakeFiles/CMakeError.log".

[Finished]

Do you have multiple toolchains installed? Are you using a custom clang to build?

From a quick search, it looks like this error can surface when using an older compiler that doesn’t understand some of the newer keywords used in the 12.1 SDK (relevant thread here).

I’m using the default toolchain in CLion.
CMake is the bundled one (version 3.21.1).
Built-in Clang version is 14.0.0

I’m not sure what you mean by built-in Clang, but I’m surprised to see that it is version 14.

I’m using the latest Xcode here, and clang++ --version gives me this:

Apple clang version 13.0.0 (clang-1300.0.29.30)

Is it possible that you’re using another non-Apple clang?

Built-in means bundled with CLion. I didn’t install XCode, but only xcode-select.
The Apple Clang version says version 12.0.5

I’m not sure whether the system framework headers can be expected to compile with a non-Apple clang. I’d recommend switching to Apple clang and seeing whether that improves things.

Strange, whatever i choose (g++, clang) in /usr/bin i always get the same errors.
I wonder if the installed xcode-select is not ok.

Ok, meanwhile i got it working on the console with the commands

cmake -Bbuild
cmake --build build

Plugin Versions AU and VST3 are generated, but when i copy them to the corresponding plugin folders and open Reaper they do not show up.
I’m on MacOS 11.6.2 M1.
Any tips here?

Are you using an Arm build of REAPER? I suspect your plugin will have been built for Arm, so you must use an Arm-compatible host too.

You’re absolutely right, that was the problem.
Is there a possibility that i can build plugins for Intel and Arm on my M1 Mac?

Yes, the technique is explained here:

Awesome, it works. Thank you very much.