Open requested to merge 415-undefined-symbols-for-architecture-x86_64-_feenableexcept-on-macos into master
Lukas and I have investigated the problem with
feenableexcept on MacOS. We found several problems:
- The solution for MacOS, implemented in
corsika/detail/framework/utility/CorsikaFenvFallback.inl, is not working on all MacOS architectures anymore due to changes in apple-clang headers
- The detection that we are on a MacOS architecture using
#ifdef CORSIKA_OS_MACdid not work reliably, since it is not correctly propagated from CMake
- Our detection mechanism which sets
cmake/corsikaDefines.cmakejust checks for the existence of
fenv.h, while it should actually look for the existence of the
These are all points that should/will be addressed in new issues.
For now, we implement that on MacOS machines, we always use the fallback solution, which means that floating point exception will not be caught. This is important to keep in mind for developers. However, within our CI, the floating point exceptions will still be caught, since the CI runs on Linux machines. This of course requires that our testing is sufficient.
But this means that compiling is possible again on MacOS.