Thank you so much for your response. I did this and it worked for a while, but I got another error:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/math.h:175:5: note:
expanded from macro 'isinf'
175 | ( sizeof(x) == sizeof(float) ? __inline_isinff((float)(x)) \
| ^
In file included from /Users/user/openCARP/numerics/basics.cc:27:
In file included from /Users/user/openCARP/numerics/basics.h:40:
In file included from /opt/homebrew/opt/petsc/include/petscsys.h:44:
In file included from /opt/homebrew/opt/petsc/include/petscsystypes.h:570:
/opt/homebrew/Cellar/llvm/21.1.1/bin/../include/c++/v1/complex:1033:12: error:
expected unqualified-id
1033 | if (std::isinf(__theta)) {
| ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/math.h:175:5: note:
expanded from macro 'isinf'
175 | ( sizeof(x) == sizeof(float) ? __inline_isinff((float)(x)) \
| ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
gmake[2]: *** [numerics/CMakeFiles/numerics.dir/build.make:79: numerics/CMakeFiles/numerics.dir/basics.cc.o] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:565: numerics/CMakeFiles/numerics.dir/all] Error 2
gmake: *** [Makefile:156: all] Error 2
Then while I was trying to fix this error, I deleted the CMakeCache.txt and the CMakeFiles folder, and then somehow I got the previous error again:
gmake[2]: /usr/local/Cellar/llvm/5.0.1/bin/clang++: No such file or directory
I checked the PATH and other environment again and they have all been set up correctly. Please let me know if you have any ideas on how to fix this. Thank you again.