Installation of VTK on macOS silicon system using GCC instead of GLANG

Hello, I hope you are doing well.

I am new to VTK, and I am trying to install VTK using gcc on macOS Silicon system instead of using CLANG.

I have been following the instructions here https://gitlab.kitware.com/vtk/vtk/-/blob/master/Documentation/docs/build_instructions/build.md, however, in the last part, when I run `cmake --build ~/vtk/build, the building process stops at 52%.

Showing me the next error:

, the error code lines continue and continue.

I thought that it was because gcc on macOS does not support Cocoa, GUI, or UI, therefore I turned off those modules to see if the building could works correctly. However, I still have problems. Do you have any recommendations or any information that could work for me to guide myself? I will be attentive to your comments and thank you in advance.

Best regards,

Alejandro

Which gcc are you using? If you built gcc yourself, make sure it has the c , c++ , objc , and obj-c++ front-ends enabled, the obj-c++ is not enabled in most gcc builds.

You can also look at the following project that says they have a gcc with improved compatibility with macOS:
https://github.com/iains/gcc-darwin-arm64

There’s also a thread here on a failed attempt to build VTK with gcc on macOS:
Compilation fails on macOS Sonoma with homebrew gcc-13.2

I don’t think that it’s worth attempting. The macOS SDK was created specifically for Apple Clang, which has non-standard extensions and enhancements that gcc does not have.