Total ROOT/Terminal newbie here, was trying to run root on my mac and was going flawlessly until a few days ago, when it returned an error about a corrupt AST file. I’ve found posts on here explaining that an older branch needs to be used, and I’ve struggled to figure out how to install an older branch from brew or git or the binary distributions.
When trying brew install root@6.32.00, I keep getting:
Warning: No available formula with the name "root@6.32.00".
==> **Searching for similarly named formulae and casks...**
Error: No formulae or casks found for root@6.32.00.
When trying to download from source the program works fine until running cmake --build . -- install -j4, at which point once it reaches 77% I receive the following string of errors:
/Users/dhruv/root_build/etc/cling/std_darwin.modulemap:466:10: error: header 'setjmp.h' not found
header "setjmp.h"
^
input_line_1:1:10: note: submodule of top-level module 'std' implicitly imported here
#include <new>
^
Warning in cling::IncrementalParser::CheckABICompatibility():
Failed to extract C++ standard library version.
Warning in cling::IncrementalParser::CheckABICompatibility():
Possible C++ standard library mismatch, compiled with _LIBCPP_ABI_VERSION '1'
Extraction of runtime standard library version was: ''
While building module 'Core':
While building module 'Cling_Runtime' imported from input_line_2:1:
While building module 'Cling_Runtime_Extra' imported from /Users/dhruv/root_build/etc/cling/Interpreter/RuntimeUniverse.h:27:
/Users/dhruv/root_build/etc/cling/std_darwin.modulemap:466:10: error: header 'setjmp.h' not found
header "setjmp.h"
^
/Users/dhruv/root_build/etc/cling/Interpreter/DynamicExprInfo.h:13:10: note: submodule of top-level module 'std' implicitly imported here
#include <string>
^
/Users/dhruv/root_build/etc/cling/Interpreter/DynamicExprInfo.h:40:7: error: use of undeclared identifier 'std'
std::string m_Result;
^
While building module 'Core':
While building module 'Cling_Runtime' imported from input_line_2:1:
While building module 'Cling_Runtime_Extra' imported from /Users/dhruv/root_build/etc/cling/Interpreter/RuntimeUniverse.h:27:
/Users/dhruv/root_build/etc/cling/std_darwin.modulemap:466:10: error: header 'setjmp.h' not found
header "setjmp.h"
^
/Users/dhruv/root_build/etc/cling/Interpreter/DynamicLookupLifetimeHandler.h:12:10: note: submodule of top-level module 'std' implicitly imported here
#include <string>
^
/Users/dhruv/root_build/etc/cling/Interpreter/DynamicLookupLifetimeHandler.h:56:7: error: use of undeclared identifier 'std'
std::string m_Type;
^
While building module 'Core':
While building module 'Cling_Runtime' imported from input_line_2:1:
While building module 'Cling_Runtime_Extra' imported from /Users/dhruv/root_build/etc/cling/Interpreter/RuntimeUniverse.h:27:
/Users/dhruv/root_build/etc/cling/std_darwin.modulemap:466:10: error: header 'setjmp.h' not found
header "setjmp.h"
^
/Users/dhruv/root_build/etc/cling/Interpreter/Value.h:15:10: note: submodule of top-level module 'std' implicitly imported here
#include <cstdint> // for uintptr_t
^
/Users/dhruv/root_build/etc/cling/Interpreter/Value.h:152:23: error: use of undeclared identifier 'uintptr_t'
return (T) (uintptr_t) V.getAs<void*>();
^
/Users/dhruv/root_build/etc/cling/Interpreter/Value.h:166:24: error: use of undeclared identifier 'uintptr_t'
return (T*) (uintptr_t) V.getAs<void*>();
^
/Users/dhruv/root_build/etc/cling/Interpreter/Value.h:313:25: error: use of undeclared identifier 'uintptr_t'
return (void*)getAs<uintptr_t>();
^
While building module 'Core':
While building module 'Cling_Runtime' imported from input_line_2:1:
In file included from <module-includes>:1:
/Users/dhruv/root_build/etc/cling/Interpreter/RuntimeUniverse.h:27:10: fatal error: could not build module 'Cling_Runtime_Extra'
#include "cling/Interpreter/Visibility.h"
~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Stack dump without symbol names (ensure you have llvm-symbolizer in your PATH or set the environment var `LLVM_SYMBOLIZER_PATH` to point to it):
As someone relatively new to command line tools and root, I’ve spent the past few days doing everything I’ve seen on the root website, online videos, and other posts on this forum to no avail. Is there a specific command I can use to install an older version of root from brew? Otherwise, how can I go about building from source successfully?
I believe the easiest path for you, while you wait for the updated ROOT version (which is already making its way with a release candidate) is to install ROOT via conda as described at Installing ROOT - ROOT. In that case try with setting the ROOT version explicitly like root==6.32.02.
Thank you for your quick response! I installed conda and tried installing root on the 6-32-00 version, which seemed successful except it unfortunately gave an error that seems to stop me running anything. It says:
/Users/dhruv/Desktop/miniconda3/envs/CondaEnv/etc/cling/std_darwin.modulemap:153:10: error: header 'mdspan' not found
header "mdspan"
^
input_line_1:1:10: note: submodule of top-level module 'std' implicitly imported here
#include <new>
Is there anything I can do to remedy this? I’ve seen a lot of errors that are from darwin, even in the previous one, but I’m unsure what happened to create those.
Yes this is building ROOT from source. I cloned the repo and with tag v6-36-00 I was able to run:
cmake -DCMAKE_BUILD_TYPE=Debug -Dtesting=OFF -Dasimage=OFF -Dopengl=OFF ../src
make -j8
and the build succeeds, but switching to tag v6-36-02, creating a new build directory, and running the same as above fails with:
[ 54%] Building CXX object core/metacling/src/CMakeFiles/MetaCling.dir/TClingTypeInfo.cxx.o
/path/to/cmake-build-debug-636p2/etc/cling/std_darwin.modulemap:466:10: error: header 'setjmp.h' not found
header "setjmp.h"
^
input_line_1:1:10: note: submodule of top-level module 'std' implicitly imported here
#include <new>
^
Warning in cling::IncrementalParser::CheckABICompatibility():
Failed to extract C++ standard library version.
Warning in cling::IncrementalParser::CheckABICompatibility():
Possible C++ standard library mismatch, compiled with _LIBCPP_ABI_VERSION '1'
Extraction of runtime standard library version was: ''
While building module 'Core':
While building module 'Cling_Runtime' imported from input_line_2:1:
While building module 'Cling_Runtime_Extra' imported from /path/to/cmake-build-debug-636p2/etc/cling/Interpreter/RuntimeUniverse.h:27:
....
Is there some more information you need to help understand why this happens?
Nothing else changed. This is running both these commands on my machine, yesterday. I literally just changed the ROOT repo tag, that’s all.
I even re-ran the 6.36.00 build after the 6.36.02 failure, and the rebuild of 6.36.00 succeeded. So this really looks like something changing between these two versions that conflicts with my system
xcode-select: note: Command line tools are already installed. Use "Software Update" in System Settings or the softwareupdate command line interface to install updates
So its as if mac knows that I still have xcode installed, I can’t just rename the folder. So I put the folder back the way it was and did:
softwareupdate -l
and it told me 16.2 command line tools were available to me (I am still on Sonoma) so I installed those:
softwareupdate -i "Command Line Tools for Xcode-16.2"
This then seems to have given me the 15.2 SDK:
lrwxr-xr-x 1 root wheel 14 Aug 20 11:37 MacOSX.sdk -> MacOSX15.2.sdk
drwxr-xr-x 7 root wheel 224 May 12 2023 MacOSX13.3.sdk
lrwxr-xr-x 1 root wheel 14 Nov 27 2024 MacOSX13.sdk -> MacOSX13.3.sdk
drwxr-xr-x 7 root wheel 224 Feb 20 2024 MacOSX14.4.sdk
drwxr-xr-x 7 root wheel 224 Aug 20 11:41 MacOSX14.5.sdk
lrwxr-xr-x 1 root wheel 14 Aug 20 11:36 MacOSX14.sdk -> MacOSX14.5.sdk
drwxr-xr-x 7 root wheel 224 Nov 21 2024 MacOSX15.2.sdk
lrwxr-xr-x 1 root wheel 14 Aug 20 11:34 MacOSX15.sdk -> MacOSX15.2.sdk
I then tried the 6.36.02 build again, but I ran into the exact same error. So updating the sdk to 15.2 (from 15.1) doesn’t seem to have fixed things. I can confirm that the new SDK was picked up because in the cmake configure I saw:
-- Using SDK path: /Library/Developer/CommandLineTools/SDKs/MacOSX15.2.sdk
With any of the other SDKs still there, it seems like the modulemap stuff that happens in the build causes the std_darwin.modulemap to include things to do with multiple SDKs in it.
The SDK folder cleaned up as above, and a fresh build started, it all works. This is consistent with the ROOT CI where there is only one SDK as well.