Fix macOS 26 CLING runtime dictionary errors caused by Homebrew/SDK header conflicts #15
Reference in New Issue
Block a user
Delete Branch "macOS_dict_issue_fix"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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>