I am trying to compile Paraview with gcc 13.2.0 (homebrew gcc), OpenMPI 4.1.1 on macOS Sonoma and VTK compilation is failing with the following error message:
The __has_feature() builtin is clang-only, it doesn’t exist on gcc.
I haven’t heard of anyone trying to build VTK on macOS with gcc recently, you might have to do a lot changes to the code to make it work. Both gcc and clang are free compilers, but clang gets a lot of support from Apple, while gcc does not.
Thank you so much for the fast response!
In general my projects also use gfortran (for standard linear algebra libraries). As an aside, I would like to ask if there are issues if clang is used along side gfortran and if extra care should be taken in general?
because GCC recognizes__has_feature as special, but not all modes “understand” it properly. Since it’s a parser-like thing, it cannot be guarded with a && short-circuit.