Problem 2571

Summary: Geant4.11.1.2 compilation error on macOS Sonoma (V14.0)
Product: Geant4 Reporter: William Shields <william.shields>
Component: globalAssignee: Gabriele Cosmo <Gabriele.Cosmo>
Status: RESOLVED INVALID    
Severity: major    
Priority: P4    
Version: 11.1   
Hardware: Apple   
OS: Mac OS X   
Attachments: Screenshot of g4.11.1.2 macOS Sonoma compilation error

Description William Shields 2023-10-30 11:50:40 CET
Created attachment 831 [details]
Screenshot of g4.11.1.2 macOS Sonoma compilation error

My student has encountered an error compiling geant-v11.1.2 on his machine running macOS Sonoma as seen in the attached screenshot.

His setup is:
Mac Model: Air 2020
Chip: Apple M1
OS: macOS Sonoma 14.0
XCode Version: 15.0.1

His project is time-limited so waiting for a patch release may not be possible. If the fix is simple, could you let me know the solution and I can fix the local version on his machine?
Comment 1 Gabriele Cosmo 2023-11-01 09:10:57 CET
Please, note that macOS-14/clang-15 is not a supported platform for Geant4 11.1 series. There is no validation of Geant4 done for such platform on older Geant4 releases.

The error reported concerns the use of FPE detection, which on macOS is *not* recommended, as on macOS FPE detection is anyhow known to not work properly.
Just use an installation with FPE detection disabled, i.e. CMAKE_BUILD_TYPE=Release, or CMAKE_BUILD_TYPE=RelWithDebInfo.