CMake CXX and AfterImage errors on Mac OS 15.4

After updating to Mac OS 15.4 + latest Xcode etc I am unable to run cmake on todays origin/master:

The command I run is:

cmake -DCMAKE_INSTALL_PREFIX=/opt/hep/root/main_April4_2025 /Users/markhodgkinson/root_src_April2025 -GNinja
-DCMAKE_BUILD_TYPE=Release
-DCMAKE_CXX_STANDARD=17
-Dfail-on-missing=ON
-Dgdml=ON
-Dx11=ON
-Dpyroot=ON
-Ddataframe=ON
-Dmysql=OFF
-Doracle=OFF
-Dpgsql=OFF
-Dsqlite=OFF
-Dpythia6=OFF
-Dpythia8=OFF
-Dfftw3=OFF
-Dbuiltin_cfitsio=ON
-Dbuiltin_xxhash=ON
-Dbuiltin_afterimage=ON
-Dbuiltin_openssl=OFF
-Dbuiltin_ftgl=ON
-Dbuiltin_glew=ON
-Dbuiltin_gsl=ON
-Dbuiltin_gl2ps=ON
-Dbuiltin_xrootd=ON
-Dgfal=OFF
-Ddavix=ON
-Dbuiltin_vdt=ON
-Dxrootd=OFF
-Dtmva=ON

which gives the following errors:

– The C compiler identification is AppleClang 17.0.0.17000013

– The CXX compiler identification is AppleClang 17.0.0.17000013

– Detecting C compiler ABI info

– Detecting C compiler ABI info - done

– Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc - skipped

– Detecting C compile features

– Detecting C compile features - done

– Detecting CXX compiler ABI info

– Detecting CXX compiler ABI info - done

– Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ - skipped

– Detecting CXX compile features

– Detecting CXX compile features - done

CMake Error at CMakeLists.txt:62 (string):

string sub-command REPLACE requires at least four arguments.

Call Stack (most recent call first):

CMakeLists.txt:72 (strip_path)

CMake Error at CMakeLists.txt:62 (string):

string sub-command REPLACE requires at least four arguments.

Call Stack (most recent call first):

CMakeLists.txt:76 (strip_path)

– Found Git: /usr/bin/git (found version “2.39.5 (Apple Git-154)”)

– Building ROOT version 6.35.01

– Looking for a CUDA compiler

– Looking for a CUDA compiler - NOTFOUND

– The default C++ standard in use by the detected compiler (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++) is lower than C++17. Setting C++17 as the minimum standard.

– Performing Test CMAKE_HAVE_LIBC_PTHREAD

– Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success

– Found Threads: TRUE

– Found a macOS system

– Found an AArch64 system

– Performing Test GLIBCXX_USE_CXX11_ABI

– Performing Test GLIBCXX_USE_CXX11_ABI - Failed

– ROOT default compression algorithm: zlib

CMake Error at cmake/modules/RootBuildOptions.cmake:393 (message):

‘builtin_afterimage’ is no longer part of ROOT 6.35.01 build options.

Call Stack (most recent call first):

CMakeLists.txt:96 (include)

Is there a solution?

Cheers,

Mark

Hi @Mark_C_Hodgkinson,

Thank you for your question.

Can you try setting this OFF after installing libpng on your system? (can you try pulling the latest master, if not already? We had a few patches to fix this recently)

Cheers,
Dev

Hi,

I’m not sure how to install libpng. Can you advise?

If I set -Dbuiltin_afterimage=OFF the afterimage error vanishes, but these remain:

– Detecting CXX compile features - done
CMake Error at CMakeLists.txt:62 (string):
string sub-command REPLACE requires at least four arguments.
Call Stack (most recent call first):
CMakeLists.txt:72 (strip_path)

CMake Error at CMakeLists.txt:62 (string):
string sub-command REPLACE requires at least four arguments.
Call Stack (most recent call first):
CMakeLists.txt:76 (strip_path)

and I also see a new warning:

– Cling version (from VERSION file): ROOT_1.3~dev
CMake Warning at interpreter/cling/lib/Interpreter/CMakeLists.txt:282 (MESSAGE):
Cannot determine location of C++ headers for runtime.

I already have the latest master I think:

markhodgkinson@IT-Asset-0000002240-MacBook-Air root_src_April2025 % git fetch origin

markhodgkinson@IT-Asset-0000002240-MacBook-Air root_src_April2025 % git pull

Already up to date.

markhodgkinson@IT-Asset-0000002240-MacBook-Air root_src_April2025 %

Cheers,

Mark

I also just tried:

brew install libpng

and then rerunning cmake with the afterimage off/on - the results reported in previous messages do not change.

Thanks,

Mark

Can you check if you made any changes here (or see if there is a git diff) to get ROOT building?
Also trying a clean build might help (especially after the upgrade to a newer version of macos).

Let me know if that works.

Cheers,
Dev

I have not made any changes to ROOT (git diff confirms this) and I have a fresh clone and build directory after updating to Mac OS 15.4

Thanks,

Mark

That is strange. Maybe @couet can help?

If I switch to the 6.34 branch:

git checkout v6-34-00-patches

then all the errors vanish, except the afterimage one - that can be resolved too by choosing:

-Dbuiltin_afterimage=OFF

though I am unsure what functionality I lose by doing that.

Cheers,

Mark

Should be fine. The preinstalled one will be used.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.