Fix macOS 26 CLING runtime dictionary errors caused by Homebrew/SDK header conflicts

macOS 26 (Darwin 25.5.0) introduced stricter Clang module map rules in
DarwinFoundation1.modulemap: the '_c_standard_library_obsolete' module
now requires the 'found_incompatible_headers__check_search_paths' feature,
which CLING's runtime interpreter does not set. When fftw3.h (from
/opt/homebrew/include) was parsed by CLING via the inlined PStartupHandler
dictionary payload, it triggered this module map error, causing all
PStartupHandler signal/slot connections to fail.

Two fixes:
- PMusr.h: guard '#include "fftw3.h"' with '#ifndef __CLING__'. No fftw
  types appear in PMusr.h class definitions, so CLING does not need it
  for reflection. This is the primary runtime fix.
- CMakeLists.txt (src/classes and all src/external libs): replace
  '-I${FFTW3_INCLUDE}', '-I${Boost_INCLUDE_DIRS}', '-I${GSL_INCLUDE_DIRS}',
  and '-I${ROOT_INCLUDE_DIRS}' with '-isystem' in all root_generate_dictionary
  OPTIONS blocks, and change 'include_directories(${FFTW3_INCLUDE})' to
  'include_directories(SYSTEM ...)'. Internal project paths (MUSRFIT_INC,
  BMW_TOOLS_INC, NONLOCAL_INC, CMAKE_CURRENT_SOURCE_DIR, etc.) keep '-I'.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-07-15 10:29:43 +02:00
co-authored by Claude Sonnet 4.6
parent 358fc8ec6d
commit b90d0d9e8b
14 changed files with 38 additions and 33 deletions
+5
View File
@@ -39,7 +39,12 @@
//#ifdef __CINT__
//typedef struct { char a[7]; } __float128; // needed since cint doesn't know it
//#endif
// __CLING__ guard: fftw3.h includes <stddef.h> which triggers macOS module map
// errors in CLING's runtime parser when Homebrew paths are in the search path.
// No fftw types are used in this header's class definitions, so CLING doesn't need it.
#ifndef __CLING__
#include "fftw3.h"
#endif
//-------------------------------------------------------------
/**