Cannot compile root on mac

$ uname -a
Darwin fcamac-2.home 24.1.0 Darwin Kernel Version 24.1.0: Thu Oct 10 21:02:27 PDT 2024; root:xnu-11215.41.3~2/RELEASE_X86_64 x86_64

$ sw_vers
ProductName: macOS
ProductVersion: 15.1.1
BuildVersion: 24B91

$ git st
On branch v6-34-00-patches
Your branch is up to date with ‘origin/v6-34-00-patches’.

$ cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -Dbuiltin_glew=ON -DCMAKE_INSTALL_PREFIX=/usr/local/root
-Dxrootd=OFF -Dfitsio=OFF -Dgfal=OFF -DCMAKE_CXX_STANDARD=17 -DCMAKE_CXX_STANDARD_STRING=17
-DOPENSSL_ROOT_DIR=/usr/local/Cellar/openssl@3/3.4.0 -Doracle=OFF -Dvdt=OFF -Dproof=OFF
-Droot7=OFF -Dpythia8=OFF -Dbuiltin_gsl=ON -Dmysql=OFF …

$ make
[…]

[ 28%] Building CXX object interpreter/cling/lib/Utils/CMakeFiles/obj.clingUtils.dir/AST.cpp.o
In file included from /usr/local/root-git/interpreter/cling/lib/Utils/AST.cpp:12:
In file included from /usr/local/include/clang/AST/ASTContext.h:18:
In file included from /usr/local/include/clang/AST/ASTTypeTraits.h:20:
In file included from /usr/local/include/clang/AST/Decl.h:17:
In file included from /usr/local/include/clang/AST/APValue.h:17:
/usr/local/include/clang/Basic/LLVM.h:25:10: fatal error: ‘llvm/ADT/None.h’ file not found
25 | #include “llvm/ADT/None.h”
| ^~~~~~~~~~~~~~~~~
1 error generated.
make[2]: *** [interpreter/cling/lib/Utils/CMakeFiles/obj.clingUtils.dir/build.make:79: interpreter/cling/lib/Utils/CMakeFiles/obj.clingUtils.dir/AST.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:46637: interpreter/cling/lib/Utils/CMakeFiles/obj.clingUtils.dir/all] Error 2
make: *** [Makefile:156: all] Error 2

find /usr/local/root-git -name "None.h"


Please read tips for efficient and successful posting and posting code

Please fill also the fields below. Note that root -b -q will tell you this info, and starting from 6.28/06 upwards, you can call .forum bug from the ROOT prompt to pre-populate a topic.

_ROOT Version: v6-34-00-patches
_Platform: MacBook Pro 2.4 GHz 8-Core Intel Core i9, Sequoia 15.1.1
Compiler: Apple clang version 16.0.0 (clang-1600.0.26.4)


Solved, I have a copy of clang in /usr/local which is incompatible. You can close. Sorry for the bother.

Hi Federico,

Thanks for the follow up!

D

Yep,
but it died just after:

[ 79%] Generating G__Graf.cxx, …/…/lib/Graf.pcm
In file included from <<< cling interactive line includer >>>:1:
In file included from /usr/local/root-git/buildroot/include/TArc.h:24:
In file included from /usr/local/root-git/buildroot/include/TEllipse.h:16:
In file included from /usr/local/root-git/buildroot/include/TObject.h:17:
In file included from /usr/local/root-git/buildroot/include/Rtypes.h:23:
In file included from /usr/local/root-git/buildroot/include/RtypesCore.h:28:
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/cstddef:46:5: error: tried including <stddef.h> but didn’t find libc++'s <stddef.h> header. This usually means that your header search paths are not configured properly. The header search paths should contain the C++ Standard Library headers before any C Standard Library, and you are probably using compiler flags that make that not be the case.

error tried including <stddef.h> but didn’t find libc++'s <stddef.h> header. \

^
In file included from <<< cling interactive line includer >>>:1:
In file included from /usr/local/root-git/buildroot/include/TArc.h:24:
In file included from /usr/local/root-git/buildroot/include/TEllipse.h:16:
In file included from /usr/local/root-git/buildroot/include/TObject.h:17:
In file included from /usr/local/root-git/buildroot/include/Rtypes.h:27:
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/cstdio:104:5: error: tried including <stdio.h> but didn’t find libc++'s <stdio.h> header. This usually means that your header search paths are not configured properly. The header search paths should contain the C++ Standard Library headers before any C Standard Library, and you are probably using compiler flags that make that not be the case.

error tried including <stdio.h> but didn’t find libc++'s <stdio.h> header. \

^
In file included from <<< cling interactive line includer >>>:1:
In file included from /usr/local/root-git/buildroot/include/TArc.h:24:
In file included from /usr/local/root-git/buildroot/include/TEllipse.h:16:
In file included from /usr/local/root-git/buildroot/include/TObject.h:17:
In file included from /usr/local/root-git/buildroot/include/Rtypes.h:28:
In file included from /usr/local/root-git/buildroot/include/strtok.h:6:
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/cstring:66:5: error: tried including <string.h> but didn’t find libc++'s <string.h> header. This usually means that your header search paths are not configured properly. The header search paths should contain the C++ Standard Library headers before any C Standard Library, and you are probably using compiler flags that make that not be the case.

error tried including <string.h> but didn’t find libc++'s <string.h> header. \

^
In file included from <<< cling interactive line includer >>>:1:
In file included from /usr/local/root-git/buildroot/include/TArc.h:24:
In file included from /usr/local/root-git/buildroot/include/TEllipse.h:16:
In file included from /usr/local/root-git/buildroot/include/TObject.h:17:
In file included from /usr/local/root-git/buildroot/include/Rtypes.h:31:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/type_traits:508:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__type_traits/is_trivially_copyable.h:14:
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/cstdint:149:5: error: tried including <stdint.h> but didn’t find libc++'s <stdint.h> header. This usually means that your header search paths are not configured properly. The header search paths should contain the C++ Standard Library headers before any C Standard Library, and you are probably using compiler flags that make that not be the case.

error tried including <stdint.h> but didn’t find libc++'s <stdint.h> header. \

^
In file included from <<< cling interactive line includer >>>:1:
In file included from /usr/local/root-git/buildroot/include/TArc.h:24:
In file included from /usr/local/root-git/buildroot/include/TEllipse.h:16:
In file included from /usr/local/root-git/buildroot/include/TObject.h:17:
In file included from /usr/local/root-git/buildroot/include/Rtypes.h:34:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/typeinfo:386:
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/cstdlib:90:5: error: tried including <stdlib.h> but didn’t find libc++'s <stdlib.h> header. This usually means that your header search paths are not configured properly. The header search paths should contain the C++ Standard Library headers before any C Standard Library, and you are probably using compiler flags that make that not be the case.

error tried including <stdlib.h> but didn’t find libc++'s <stdlib.h> header. \

^
In file included from <<< cling interactive line includer >>>:1:
In file included from /usr/local/root-git/buildroot/include/TArc.h:24:
In file included from /usr/local/root-git/buildroot/include/TEllipse.h:16:
In file included from /usr/local/root-git/buildroot/include/TObject.h:17:
In file included from /usr/local/root-git/buildroot/include/Rtypes.h:35:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/atomic:621:
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/cmath:322:5: error: tried including <math.h> but didn’t find libc++'s <math.h> header. This usually means that your header search paths are not configured properly. The header search paths should contain the C++ Standard Library headers before any C Standard Library, and you are probably using compiler flags that make that not be the case.

error tried including <math.h> but didn’t find libc++'s <math.h> header. \

^
In file included from <<< cling interactive line includer >>>:1:
In file included from /usr/local/root-git/buildroot/include/TArc.h:24:
In file included from /usr/local/root-git/buildroot/include/TEllipse.h:16:
In file included from /usr/local/root-git/buildroot/include/TObject.h:17:
In file included from /usr/local/root-git/buildroot/include/Rtypes.h:198:
In file included from /usr/local/root-git/buildroot/include/TGenericClassInfo.h:21:
In file included from /usr/local/root-git/buildroot/include/TSchemaHelper.h:17:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/string:573:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__algorithm/remove.h:12:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__algorithm/find.h:31:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/cwchar:112:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/cwctype:54:
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/cctype:43:5: error: tried including <ctype.h> but didn’t find libc++'s <ctype.h> header. This usually means that your header search paths are not configured properly. The header search paths should contain the C++ Standard Library headers before any C Standard Library.

error tried including <ctype.h> but didn’t find libc++'s <ctype.h> header. \

^
In file included from <<< cling interactive line includer >>>:1:
In file included from /usr/local/root-git/buildroot/include/TArc.h:24:
In file included from /usr/local/root-git/buildroot/include/TEllipse.h:16:
In file included from /usr/local/root-git/buildroot/include/TObject.h:17:
In file included from /usr/local/root-git/buildroot/include/Rtypes.h:198:
In file included from /usr/local/root-git/buildroot/include/TGenericClassInfo.h:21:
In file included from /usr/local/root-git/buildroot/include/TSchemaHelper.h:17:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/string:573:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__algorithm/remove.h:12:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__algorithm/find.h:31:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/cwchar:112:
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/cwctype:59:5: error: tried including <wctype.h> but didn’t find libc++'s <wctype.h> header. This usually means that your header search paths are not configured properly. The header search paths should contain the C++ Standard Library headers before any C Standard Library, and you are probably using compiler flags that make that not be the case.

error tried including <wctype.h> but didn’t find libc++'s <wctype.h> header. \

^
In file included from <<< cling interactive line includer >>>:1:
In file included from /usr/local/root-git/buildroot/include/TArc.h:24:
In file included from /usr/local/root-git/buildroot/include/TEllipse.h:16:
In file included from /usr/local/root-git/buildroot/include/TObject.h:17:
In file included from /usr/local/root-git/buildroot/include/Rtypes.h:198:
In file included from /usr/local/root-git/buildroot/include/TGenericClassInfo.h:21:
In file included from /usr/local/root-git/buildroot/include/TSchemaHelper.h:17:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/string:573:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__algorithm/remove.h:12:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__algorithm/find.h:31:
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/cwchar:117:5: error: tried including <wchar.h> but didn’t find libc++'s <wchar.h> header. This usually means that your header search paths are not configured properly. The header search paths should contain the C++ Standard Library headers before any C Standard Library, and you are probably using compiler flags that make that not be the case.

error tried including <wchar.h> but didn’t find libc++'s <wchar.h> header. \

^
In file included from <<< cling interactive line includer >>>:1:
In file included from /usr/local/root-git/buildroot/include/TArc.h:24:
In file included from /usr/local/root-git/buildroot/include/TEllipse.h:16:
In file included from /usr/local/root-git/buildroot/include/TObject.h:17:
In file included from /usr/local/root-git/buildroot/include/Rtypes.h:198:
In file included from /usr/local/root-git/buildroot/include/TGenericClassInfo.h:22:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/vector:325:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__format/formatter_bool.h:20:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__format/formatter_integral.h:13:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__charconv/to_chars_integral.h:17:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__charconv/to_chars_result.h:14:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__system_error/errc.h:104:
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/cerrno:31:5: error: tried including <errno.h> but didn’t find libc++'s <errno.h> header. This usually means that your header search paths are not configured properly. The header search paths should contain the C++ Standard Library headers before any C Standard Library, and you are probably using compiler flags that make that not be the case.

error tried including <errno.h> but didn’t find libc++'s <errno.h> header. \

^
In file included from <<< cling interactive line includer >>>:1:
In file included from /usr/local/root-git/buildroot/include/TArc.h:24:
In file included from /usr/local/root-git/buildroot/include/TEllipse.h:16:
In file included from /usr/local/root-git/buildroot/include/TObject.h:17:
In file included from /usr/local/root-git/buildroot/include/Rtypes.h:198:
In file included from /usr/local/root-git/buildroot/include/TGenericClassInfo.h:22:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/vector:325:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__format/formatter_bool.h:20:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__format/formatter_integral.h:35:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/locale:202:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__locale:20:
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/clocale:43:5: error: tried including <locale.h> but didn’t find libc++'s <locale.h> header. This usually means that your header search paths are not configured properly. The header search paths should contain the C++ Standard Library headers before any C Standard Library, and you are probably using compiler flags that make that not be the case.

error tried including <locale.h> but didn’t find libc++'s <locale.h> header. \

^
In file included from <<< cling interactive line includer >>>:5:
In file included from /usr/local/root-git/buildroot/include/TCandle.h:21:
In file included from /usr/local/root-git/buildroot/include/TMath.h:576:
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/cfloat:78:5: error: tried including <float.h> but didn’t find libc++'s <float.h> header. This usually means that your header search paths are not configured properly. The header search paths should contain the C++ Standard Library headers before any C Standard Library, and you are probably using compiler flags that make that not be the case.

error tried including <float.h> but didn’t find libc++'s <float.h> header. \

^
Error: Parsing #pragma failed /usr/local/root-git/graf2d/graf/inc/LinkDef.h
make[2]: *** [graf2d/graf/CMakeFiles/G__Graf.dir/build.make:155: graf2d/graf/G__Graf.cxx] Error 1
make[1]: *** [CMakeFiles/Makefile2:54001: graf2d/graf/CMakeFiles/G__Graf.dir/all] Error 2
make: *** [Makefile:156: all] Error 2

Federico Carminati
av Ste Cécile 29
1217 Meyrin
Switzerland/Suisse
Tel: +41797732246

Hi Federico,

can you exclude the presence of multiple sdks or other compilers (and std libraries) interfering with each other on your system?

Cheers,
D

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