# Compiler flag errors

**URL:** <https://root-forum.cern.ch/t/compiler-flag-errors/61908>\
**Category:** Newbie\
**Tags:** root\
**Created:** [October 10, 2024, 1:02pm UTC](https://root-forum.cern.ch/t/compiler-flag-errors/61908 "2024-10-10T13:02:08Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![petros](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/petros/32/37779_2.png) [@petros](https://root-forum.cern.ch/u/petros)\
**Post date:** [October 10, 2024, 1:02pm UTC](https://root-forum.cern.ch/t/compiler-flag-errors/61908/1 "2024-10-10T13:02:08Z")

</div>

Hello everyone, i’ve been trying to compile ROOT (git cloning latest) as a dependency to gate on a MacM3 (Sequioa 15.0.1, XCode 16.0 (16A242d)) as a dependency to GATE9.0.

I was getting these errors with multiple versions of the precompiled binaries.

```auto
/opt/ROOT/install/include/ROOT/RConfig.hxx:48:2: error: "ROOT requires support for C++17 or higher."
   48 | #error "ROOT requires support for C++17 or higher."
      | ^
/opt/ROOT/install/include/ROOT/RConfig.hxx:50:2: error: "Pass `-std=c++17` as compiler argument."
   50 | #error "Pass `-std=c++17` as compiler argument."
      | ^

```

As such i decided to build it on my own and while i did force all the relevant flags (not just in ROOT also in Geant4):

```auto
CMAKE_CXX_STANDARD 17 
CXX_STANDARD_STRING 17 
CMAKE_CXX_FLAGS -std=c++17

```

The pesky error persists. I’m not sure why this is.  
As a final note, if you comment out the lines RConfig.hxx it builds just fine.  
However (and this is unrelated later i’m getting some linker errors on GATE, but it’s something probably coming off ITK.

```auto
Undefined symbols for architecture arm64:
  "gdcm::Filename::GetPath()", referenced from:
      GateDICOMImage::Read(std:: __1::basic_string<char, std::__ 1::char_traits<char>, std::__1::allocator<char>>) in GateDICOMImage.cc.o
ld: symbol(s) not found for architecture arm64
c++: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [Gate] Error 1

```

What i want to understand is why after building it with c++17 i’m still getting these errors.  
As a final note, i was restarting the shell (zsh) with each different version and compilation (also tried c++14 but it’s not supported on the latest version of root) and sourcing the new thisroot.

---

<div class="post-metadata">

**Author:** ![Danilo](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/danilo/32/34528_2.png) [@Danilo](https://root-forum.cern.ch/u/Danilo)\
**Post date:** [October 10, 2024, 1:06pm UTC](https://root-forum.cern.ch/t/compiler-flag-errors/61908/2 "2024-10-10T13:06:49Z")

</div>

Hi Petros,

Welcome to the ROOT Community!

I am not sure I understand the series of problems you list in detail.  
I propose to start by confirming that you are able to build ROOT standalone from sources, and if not, to clearly point to the problem which is stopping the build.

Cheers,  
Danilo

---

<div class="post-metadata">

**Author:** ![petros](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/petros/32/37779_2.png) [@petros](https://root-forum.cern.ch/u/petros)\
**Post date:** [October 10, 2024, 1:29pm UTC](https://root-forum.cern.ch/t/compiler-flag-errors/61908/3 "2024-10-10T13:29:38Z")

</div>

Hello,

I’m sorry if i wasn’t clear.  
I’m managing to build ROOT from sources.  
However when it’s used as a dependency it’s throwing and error coming from the RConfig.hxx file. I’ve already built it with c++17, so i’m unsure of how to troubleshoot this or if it’s even an inherent problem with ROOT or GATE.

---

<div class="post-metadata">

**Author:** ![pcanal](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/pcanal/32/12439_2.png) [@pcanal](https://root-forum.cern.ch/u/pcanal)\
**Post date:** [October 10, 2024, 3:08pm UTC](https://root-forum.cern.ch/t/compiler-flag-errors/61908/4 "2024-10-10T15:08:08Z")

</div>

> [@petros](#):
>
> I’ve already built it with c++17,

The error message clearly indicates that the the compiler does not believe that the source is being compiled in C++17 mode.

To debug this, re-run the failed build in debug mode (i.e. `make VERBOSE=true` or `ninja -v`), capture the command line that is leading to the failing compile and examine it (and/or copy/paste it here). Most likely than not something went wrong in the configuration or re-configuration of the failing build.

---

<div class="post-metadata">

**Author:** ![Wile\_E\_Coyote](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/wile_e_coyote/32/12417_2.png) [@Wile\_E\_Coyote](https://root-forum.cern.ch/u/Wile_E_Coyote)\
**Post date:** [October 10, 2024, 4:53pm UTC](https://root-forum.cern.ch/t/compiler-flag-errors/61908/5 "2024-10-10T16:53:45Z")

</div>

Your source code may be “sensitive” to the “`ROOT_CXX_FLAGS`” and “`ROOT_CXX_STANDARD`” variables (which come from [ROOT](https://root.cern/manual/integrate_root_into_my_cmake_project/)).

The problem is that you may have (note “`undefined`”):

```plaintext
ROOT_CXX_FLAGS -std=c++17 -pipe -fsigned-char -pthread
ROOT_CXX_STANDARD undefined

```

or (note the missing “`-std=c++17`”):

```plaintext
ROOT_CXX_FLAGS -pipe -fsigned-char -pthread
ROOT_CXX_STANDARD 17

```

Try the simple “`CMakeLists.txt`” file from (just execute “`cmake .`”):

> [@CMake variable ROOT\_CXX\_STANDARD not set](https://root-forum.cern.ch/t/cmake-variable-root-cxx-standard-not-set/59207):
>
> ROOT Version: 6.08.06 - 6.30.06 Platform: Ubuntu 22.04 Compiler: gcc According to [Integrating ROOT into CMake projects - ROOT](https://root.cern/manual/integrate_root_into_my_cmake_project/) "Calling find\_package(ROOT) makes the following variables available Variable Type Description ROOT\_INCLUDE\_DIRS PATH Include directories for the ROOT installation. ROOT\_LIBRARIES LIST Libraries to link against. The actual list of libraries is composed using the COMPONENTS listed in the find\_package(…) command. ROOT\_DEFINITIONS STRING Compile definitions …

> [@Getting the c++ standard if ROOT\_CXX\_STANDARD is not set](https://root-forum.cern.ch/t/getting-the-c-standard-if-root-cxx-standard-is-not-set/59439):
>
> The original topic got closed, but in case anyone else encounters this problem: If the ROOT\_CXX\_STANDARD variable is not set in cmake (ROOT versions 6.30.06 and earlier), I found the code can be used to get the c++ standard used to compile the ROOT version in use: if(NOT ROOT\_CXX\_VERSION) string(REGEX REPLACE ".\*-std=.+\\+\\+([0-9][0-9]).\*" "\\1" ROOT\_CXX\_VERSION ${ROOT\_CXX\_FLAGS}) if(${CMAKE\_MATCH\_COUNT} EQUAL "1") message("Got ROOT\_CXX\_VERSION=${ROOT\_CXX\_VERSION} from \"${ROOT\_CX…

---

<div class="post-metadata">

**Author:** ![petros](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/petros/32/37779_2.png) [@petros](https://root-forum.cern.ch/u/petros)\
**Post date:** [October 11, 2024, 8:55am UTC](https://root-forum.cern.ch/t/compiler-flag-errors/61908/6 "2024-10-11T08:55:06Z")

</div>

Hello, thanks for the input everyone.  
Out of curiosity i did open up root in cli to see if everything worked (on the version that managed to build).  
However i encountered the following hinting at a severe problem with either pathing or the compiler itself. I’ll try to regenerate my entire env and try again and hopefully update this post if something comes up.

```auto
/Users/pki % root 
ERROR in cling::CIFactory::createCI(): cannot extract standard library include paths!
Invoking:
  LC_ALL=C /Library/Developer/CommandLineTools/usr/bin/c++ -O2 -DNDEBUG -xc++ -E -v /dev/null 2>&1 >/dev/null | awk '/^#include </,/^End of search/{if (!/^#include </ && !/^End of search/){ print }}' | GREP_OPTIONS= grep -E "(c|g)\+\+"
Results was:
With exit code 256
warning: no such sysroot directory: '/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk'
input_line_1:1:10: fatal error: 'new' file not found
#include <new>
         ^ ~~~~
input_line_3:37:10: fatal error: 'string' file not found
#include <string>
         ^ ~~~~~~~
   ------------------------------------------------------------
  | Welcome to ROOT 6.18/04 https://root.cern |
  | (c) 1995-2019, The ROOT Team |
  | Built for macosx64 on Sep 11 2019, 15:38:23 |
  | From tags/v6-18-04@v6-18-04 |
  | Try '.help', '.demo', '.license', '.credits', '.quit'/'.q' |
   ------------------------------------------------------------

input_line_7:1:10: fatal error: 'iostream' file not found
#include <iostream>
         ^ ~~~~~~~~~
root [0] exit
IncrementalExecutor::executeFunction: symbol '_ZN5cling7runtime6gClingE' unresolved while linking [cling interface function]!
You are probably missing the definition of cling::runtime::gCling
Maybe you need to load the corresponding shared library?
root [1] ^C

```

---

<div class="post-metadata">

**Author:** ![vpadulan](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/vpadulan/32/25315_2.png) [@vpadulan](https://root-forum.cern.ch/u/vpadulan)\
**Post date:** [October 11, 2024, 9:40am UTC](https://root-forum.cern.ch/t/compiler-flag-errors/61908/7 "2024-10-11T09:40:34Z")

</div>

> [@petros](#):
>
> `warning: no such sysroot directory: '/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk'`

Dear @petros ,

I just took a quick look at your last post and I saw this, indicating the SDK for MacOSX10.14. But in your first post you wrote your machine is a Sequioa 15.0.1, XCode 16.0. There seems to be some mismatch between your machine and the compiler infrastructure you are using to compile the code.

Cheers,  
Vincenzo

---

<div class="post-metadata">

**Author:** ![petros](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/petros/32/37779_2.png) [@petros](https://root-forum.cern.ch/u/petros)\
**Post date:** [October 11, 2024, 10:08am UTC](https://root-forum.cern.ch/t/compiler-flag-errors/61908/8 "2024-10-11T10:08:20Z")

</div>

I’m guessing i should check the flags again…?  
I do however see that macOS is using previous SDKs and points them to newer versions…

```auto
% ls -la /Library/Developer/CommandLineTools/SDKs/ 
total 0
drwxr-xr-x 7 root wheel 224 Oct 2 23:05 .
drwxr-xr-x 5 root wheel 160 Oct 1 20:56 ..
lrwxr-xr-x 1 root wheel 14 Oct 2 23:04 MacOSX.sdk -> MacOSX15.0.sdk
drwxr-xr-x 7 root wheel 224 May 1 00:16 MacOSX14.5.sdk
lrwxr-xr-x 1 root wheel 14 Oct 2 23:04 MacOSX14.sdk -> MacOSX14.5.sdk
drwxr-xr-x 7 root wheel 224 Aug 21 17:15 MacOSX15.0.sdk
lrwxr-xr-x 1 root wheel 14 Oct 2 23:04 MacOSX15.sdk -> MacOSX15.0.sdk

```

Maybe i could create one from 10.14 and point it to 15.0!

```auto
/Library/Developer/CommandLineTools/SDKs % ln -s MacOSX15.0.sdk MacOSX10.14.sdk
ln: MacOSX10.14.sdk: Permission denied
/Library/Developer/CommandLineTools/SDKs % sudo !!
sudo ln -s MacOSX15.0.sdk MacOSX10.14.sdk
/Library/Developer/CommandLineTools/SDKs % l
total 0
lrwxr-xr-x 1 root wheel 14 Oct 2 23:04 MacOSX.sdk -> MacOSX15.0.sdk
lrwxr-xr-x 1 root wheel 14 Oct 11 12:03 MacOSX10.14.sdk -> MacOSX15.0.sdk
drwxr-xr-x 7 root wheel 224 May 1 00:16 MacOSX14.5.sdk
lrwxr-xr-x 1 root wheel 14 Oct 2 23:04 MacOSX14.sdk -> MacOSX14.5.sdk
drwxr-xr-x 8 root wheel 256 Oct 11 12:01 MacOSX15.0.sdk
lrwxr-xr-x 1 root wheel 14 Oct 2 23:04 MacOSX15.sdk -> MacOSX15.0.sdk
/Library/Developer/CommandLineTools/SDKs % root
ERROR in cling::CIFactory::createCI(): cannot extract standard library include paths!
Invoking:
  LC_ALL=C /Library/Developer/CommandLineTools/usr/bin/c++ -O2 -DNDEBUG -xc++ -E -v /dev/null 2>&1 >/dev/null | awk '/^#include </,/^End of search/{if (!/^#include </ && !/^End of search/){ print }}' | GREP_OPTIONS= grep -E "(c|g)\+\+"
Results was:
With exit code 256
In file included from input_line_3:39:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/c++/v1/cassert:19:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/c++/v1/__assert:13:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/c++/v1/__assertion_handler:13:
/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/c++/v1/__config:48:8: warning: "Libc++ only supports Clang 16 and later" [-W#warnings]
# warning "Libc++ only supports Clang 16 and later"
       ^
In file included from input_line_3:39:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/c++/v1/cassert:19:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/c++/v1/__assert:13:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/c++/v1/__assertion_handler:14:
/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/c++/v1/__verbose_abort:20:1: error: expected identifier or '{'
_LIBCPP_BEGIN_NAMESPACE_STD
^
/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/c++/v1/__config:901:81: note: expanded from macro '_LIBCPP_BEGIN_NAMESPACE_STD'
# define _LIBCPP_BEGIN_NAMESPACE_STD namespace _LIBCPP_TYPE_VISIBILITY_DEFAULT std { \
                                                                                ^
In file included from input_line_3:39:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/c++/v1/cassert:19:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/c++/v1/__assert:13:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/c++/v1/__assertion_handler:14:
/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/c++/v1/__verbose_abort:20:1: error: C++ requires a type specifier for all declarations
/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/c++/v1/__config:901:81: note: expanded from macro '_LIBCPP_BEGIN_NAMESPACE_STD'
# define _LIBCPP_BEGIN_NAMESPACE_STD namespace _LIBCPP_TYPE_VISIBILITY_DEFAULT std { \
                                                                                ^
In file included from input_line_3:39:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/c++/v1/cassert:19:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/c++/v1/__assert:13:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/c++/v1/__assertion_handler:14:
/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/c++/v1/__verbose_abort:20:1: error: expected expression
/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/c++/v1/__config:902:32: note: expanded from macro '_LIBCPP_BEGIN_NAMESPACE_STD'
                               inline namespace _LIBCPP_ABI_NAMESPACE {
                               ^
In file included from input_line_3:39:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/c++/v1/cassert:19:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/c++/v1/__assert:13:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/c++/v1/__assertion_handler:14:
/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/c++/v1/__verbose_abort:51:26: error: expected ';' after top level declarator
_LIBCPP_END_NAMESPACE_STD
                         ^
   ------------------------------------------------------------
  | Welcome to ROOT 6.18/04 https://root.cern |
  | (c) 1995-2019, The ROOT Team |
  | Built for macosx64 on Sep 11 2019, 15:38:23 |
  | From tags/v6-18-04@v6-18-04 |
  | Try '.help', '.demo', '.license', '.credits', '.quit'/'.q' |
   ------------------------------------------------------------

root [0] exit
(void (*)(int) __attribute__ ((noreturn))) Function @0x7ff8043ab69c
  at /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/stdlib.h:145:
void exit(int) _

root [1] %                                                                                                                                                            

```

Well, that was not very smart.

---

<div class="post-metadata">

**Author:** ![petros](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/petros/32/37779_2.png) [@petros](https://root-forum.cern.ch/u/petros)\
**Post date:** [October 11, 2024, 10:19am UTC](https://root-forum.cern.ch/t/compiler-flag-errors/61908/9 "2024-10-11T10:19:26Z")

</div>

Oh wait, that was actually very very smart.

I forgot that i had in my rc file an older precompiled version from some experiments last night.

```auto
## >>> Root testing >>>
#source /opt/ROOT/prebuilt/root/bin/thisroot.sh
source /opt/ROOT/install/bin/thisroot.sh
cdir=$PWD
cd /opt/Geant4/install/bin
source geant4.sh
cd ${cdir}
## <<< Root testing <<<

```

This indeed will launch ROOT without an error!

```auto
/Library/Developer/CommandLineTools/SDKs % rc-update
/Library/Developer/CommandLineTools/SDKs % root
   ------------------------------------------------------------------
  | Welcome to ROOT 6.32.06 https://root.cern |
  | (c) 1995-2024, The ROOT Team; conception: R. Brun, F. Rademakers |
  | Built for macosxarm64 on Oct 10 2024, 13:23:47 |
  | From tags/6-32-06@6-32-06 |
  | With Apple clang version 16.0.0 (clang-1600.0.26.3) |
  | Try '.help'/'.?', '.demo', '.license', '.credits', '.quit'/'.q' |
   ------------------------------------------------------------------

root [0] .q
/Library/Developer/CommandLineTools/SDKs % rc-show   

```

---

<div class="post-metadata">

**Author:** ![petros](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/petros/32/37779_2.png) [@petros](https://root-forum.cern.ch/u/petros)\
**Post date:** [October 11, 2024, 10:29am UTC](https://root-forum.cern.ch/t/compiler-flag-errors/61908/10 "2024-10-11T10:29:19Z")

</div>

OH MY!  
This was indeed the source of my troubles!

```auto
[100%] Built target GateDigit_hits_digitizer
[100%] Built target GateDigit_coincidence_processor
[100%] Linking CXX executable Gate
ld: warning: ignoring duplicate libraries: '-lpthread'
[100%] Built target Gate
/opt/GATE/build % 

```

A RESOUNDING VICTORY!  
Thank you everyone, having more eyes look at something is surely more efficient than me banging my head against a wall and trying to bruteforce the changes.

---

<div class="post-metadata">

**Author:** ![hugonluz](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/h/4da419/32.png) [@hugonluz](https://root-forum.cern.ch/u/hugonluz)\
**Post date:** [November 11, 2024, 3:23pm UTC](https://root-forum.cern.ch/t/compiler-flag-errors/61908/11 "2024-11-11T15:23:04Z")

</div>

Hello,

Sorry to invade this thread, but it is recent and I seem to be having the very same problem as Petros.  
However I was not able to understand what you did to solve it. I am trying to install root 28.04 in Mac OS Sequoia 15.1, updated command line tools and xcode and everything without any change in the final result that comes after 3 or 4 hours of expectation (up to 76% of the compilation). I get millions of different errors alternating with warnings stating that clang 16 is required (I am using clang 16).

I leave here a very tiny sample of the disaster:

```auto
While building module 'Core':
While building module 'std_new' imported from input_line_1:1:
While building module 'std_private_assert' imported from /Library/Developer/CommandLineTools/SDKs/MacOSX15.1.sdk/usr/include/c++/v1/new:89:
In file included from <module-includes>:1:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX15.1.sdk/usr/include/c++/v1/__assert:13:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX15.1.sdk/usr/include/c++/v1/__assertion_handler:13:
/Library/Developer/CommandLineTools/SDKs/MacOSX15.1.sdk/usr/include/c++/v1/__config:48:8: warning: "Libc++ only supports Clang 16 and later" [-W#warnings]
# warning "Libc++ only supports Clang 16 and later"
       ^
While building module 'Core':
While building module 'std_new' imported from input_line_1:1:
While building module 'std_private_assert' imported from /Library/Developer/CommandLineTools/SDKs/MacOSX15.1.sdk/usr/include/c++/v1/new:89:
While building module 'std_private_verbose_abort' imported from /Library/Developer/CommandLineTools/SDKs/MacOSX15.1.sdk/usr/include/c++/v1/__assertion_handler:14:
In file included from <module-includes>:1:
/Library/Developer/CommandLineTools/SDKs/MacOSX15.1.sdk/usr/include/c++/v1/__verbose_abort:20:1: error: expected identifier or '{'
_LIBCPP_BEGIN_NAMESPACE_STD
^
/Library/Developer/CommandLineTools/SDKs/MacOSX15.1.sdk/usr/include/c++/v1/__config:901:81: note: expanded from macro '_LIBCPP_BEGIN_NAMESPACE_STD'
# define _LIBCPP_BEGIN_NAMESPACE_STD namespace _LIBCPP_TYPE_VISIBILITY_DEFAULT std { \
                                                                                ^
While building module 'Core':
While building module 'std_new' imported from input_line_1:1:
While building module 'std_private_assert' imported from /Library/Developer/CommandLineTools/SDKs/MacOSX15.1.sdk/usr/include/c++/v1/new:89:
While building module 'std_private_verbose_abort' imported from /Library/Developer/CommandLineTools/SDKs/MacOSX15.1.sdk/usr/include/c++/v1/__assertion_handler:14:
In file included from <module-includes>:1:
/Library/Developer/CommandLineTools/SDKs/MacOSX15.1.sdk/usr/include/c++/v1/__verbose_abort:20:1: error: C++ requires a type specifier for all declarations
/Library/Developer/CommandLineTools/SDKs/MacOSX15.1.sdk/usr/include/c++/v1/__config:901:81: note: expanded from macro '_LIBCPP_BEGIN_NAMESPACE_STD'
# define _LIBCPP_BEGIN_NAMESPACE_STD namespace _LIBCPP_TYPE_VISIBILITY_DEFAULT std { \
                                                                                ^
While building module 'Core':
While building module 'std_new' imported from input_line_1:1:
While building module 'std_private_assert' imported from /Library/Developer/CommandLineTools/SDKs/MacOSX15.1.sdk/usr/include/c++/v1/new:89:
While building module 'std_private_verbose_abort' imported from /Library/Developer/CommandLineTools/SDKs/MacOSX15.1.sdk/usr/include/c++/v1/__assertion_handler:14:
In file included from <module-includes>:1:
/Library/Developer/CommandLineTools/SDKs/MacOSX15.1.sdk/usr/include/c++/v1/__verbose_abort:20:1: error: expected expression
/Library/Developer/CommandLineTools/SDKs/MacOSX15.1.sdk/usr/include/c++/v1/__config:902:32: note: expanded from macro '_LIBCPP_BEGIN_NAMESPACE_STD'
                               inline namespace _LIBCPP_ABI_NAMESPACE {
                               ^
While building module 'Core':
While building module 'std_new' imported from input_line_1:1:
While building module 'std_private_assert' imported from /Library/Developer/CommandLineTools/SDKs/MacOSX15.1.sdk/usr/include/c++/v1/new:89:
While building module 'std_private_verbose_abort' imported from /Library/Developer/CommandLineTools/SDKs/MacOSX15.1.sdk/usr/include/c++/v1/__assertion_handler:14:
In file included from <module-includes>:1:
/Library/Developer/CommandLineTools/SDKs/MacOSX15.1.sdk/usr/include/c++/v1/__verbose_abort:51:26: error: expected ';' after top level declarator
_LIBCPP_END_NAMESPACE_STD
                         ^
While building module 'Core':
While building module 'std_new' imported from input_line_1:1:
While building module 'std_private_assert' imported from /Library/Developer/CommandLineTools/SDKs/MacOSX15.1.sdk/usr/include/c++/v1/new:89:
In file included from <module-includes>:1:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX15.1.sdk/usr/include/c++/v1/__assert:13:
/Library/Developer/CommandLineTools/SDKs/MacOSX15.1.sdk/usr/include/c++/v1/__assertion_handler:14:10: fatal error: could not build module 'std_private_verbose_abort'
#include <__verbose_abort>
 ~~~~~~~~ ^
While building module 'Core':
While building module 'std_new' imported from input_line_1:1:
In file included from <module-includes>:1:
/Library/Developer/CommandLineTools/SDKs/MacOSX15.1.sdk/usr/include/c++/v1/new:89:10: fatal error: could not build module 'std_private_assert'
#include <__assert> // all public C++ headers provide the assertion handler
 ~~~~~~~~ ^
While building module 'Core':
While building module 'std_new' imported from input_line_1:1:
While building module 'std_private_type_traits_is_function' imported from /Library/Developer/CommandLineTools/SDKs/MacOSX15.1.sdk/usr/include/c++/v1/new:93:
In file included from <module-includes>:1:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX15.1.sdk/usr/include/c++/v1/__type_traits/is_function.h:12:
/Library/Developer/CommandLineTools/SDKs/MacOSX15.1.sdk/usr/include/c++/v1/__config:48:8: warning: "Libc++ only supports Clang 16 and later" [-W#warnings]
# warning "Libc++ only supports Clang 16 and later"

```

It starts like this and goes on over thousands of lines.

Does anyone have an idea of what I can be doing wrong?

---

<div class="post-metadata">

**Author:** ![pcanal](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/pcanal/32/12439_2.png) [@pcanal](https://root-forum.cern.ch/u/pcanal)\
**Post date:** [November 11, 2024, 6:10pm UTC](https://root-forum.cern.ch/t/compiler-flag-errors/61908/12 "2024-11-11T18:10:39Z")

</div>

> [@hugonluz](#):
>
> am trying to install root 28.04 in Mac OS Sequoia 15.1

This combination is not supported. Please update to the lastest version of v6.32.

---

<div class="post-metadata">

**Author:** ![hugonluz](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/h/4da419/32.png) [@hugonluz](https://root-forum.cern.ch/u/hugonluz)\
**Post date:** [November 12, 2024, 9:27am UTC](https://root-forum.cern.ch/t/compiler-flag-errors/61908/13 "2024-11-12T09:27:14Z")

</div>

Ok, this worked!

It is a pity, though, because I had some things ready for v6.28… I guess I must improve my way of coding not to rely so much in the same version of root… 😉

Thank you very much.
