I know this probably isn’t supported but I thought I’d ask here in case anyone else has gone through the process.
If install LLVM19 via homebrew and then specify its use like this:
export PATH="/opt/homebrew/opt/llvm/bin:$PATH"
export CC=clang
export CXX=clang++
I can’t compile juce due to this error:
-- The C compiler identification is Clang 19.1.6
-- The CXX compiler identification is Clang 19.1.6
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - failed
-- Check for working C compiler: /opt/homebrew/opt/llvm/bin/clang
-- Check for working C compiler: /opt/homebrew/opt/llvm/bin/clang - broken
CMake Error at /opt/homebrew/share/cmake/Modules/CMakeTestCCompiler.cmake:67 (message):
The C compiler
"/opt/homebrew/opt/llvm/bin/clang"
is not able to compile a simple test program.
It fails with the following output:
Change Dir: '/Users/dave/Documents/Developement/Code/Tracktion/waveform/modules/tracktion_engine/modules/juce/cmake-clang/CMakeFiles/CMakeScratch/TryCompile-L1RBV9'
Run Build Command(s): /opt/homebrew/bin/cmake -E env VERBOSE=1 /usr/bin/make -f Makefile cmTC_7c9b0/fast
/Applications/Xcode.app/Contents/Developer/usr/bin/make -f CMakeFiles/cmTC_7c9b0.dir/build.make CMakeFiles/cmTC_7c9b0.dir/build
Building C object CMakeFiles/cmTC_7c9b0.dir/testCCompiler.c.o
/opt/homebrew/opt/llvm/bin/clang -arch arm64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.2.sdk -mmacosx-version-min=15.1 -MD -MT CMakeFiles/cmTC_7c9b0.dir/testCCompiler.c.o -MF CMakeFiles/cmTC_7c9b0.dir/testCCompiler.c.o.d -o CMakeFiles/cmTC_7c9b0.dir/testCCompiler.c.o -c /Users/dave/Documents/Developement/Code/Tracktion/waveform/modules/tracktion_engine/modules/juce/cmake-clang/CMakeFiles/CMakeScratch/TryCompile-L1RBV9/testCCompiler.c
Linking C executable cmTC_7c9b0
/opt/homebrew/bin/cmake -E cmake_link_script CMakeFiles/cmTC_7c9b0.dir/link.txt --verbose=1
ld: library 'System' not found
clang: error: linker command failed with exit code 1 (use -v to see invocation)
/opt/homebrew/opt/llvm/bin/clang -arch arm64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.2.sdk -mmacosx-version-min=15.1 -Wl,-search_paths_first -Wl,-headerpad_max_install_names CMakeFiles/cmTC_7c9b0.dir/testCCompiler.c.o -o cmTC_7c9b0
make[1]: *** [cmTC_7c9b0] Error 1
make: *** [cmTC_7c9b0/fast] Error 2
The compiler seems to be detected correctly and the -isysroot is the correct location, but it can’t seem to find the System library folder.
After reading other similar posts (Has anyone used anything other than AppleClang, e.g., LLVM Clang, to build a JUCE project on macOS?) it seems I’m doing things the correct way.
Anyone else seen this problem?
