# ROOT 6.26.10 compile problem on MacOSX Ventura

**URL:** <https://root-forum.cern.ch/t/root-6-26-10-compile-problem-on-macosx-ventura/53201>\
**Category:** ROOT\
**Tags:** root\
**Created:** [January 21, 2023, 4:01pm UTC](https://root-forum.cern.ch/t/root-6-26-10-compile-problem-on-macosx-ventura/53201 "2023-01-21T16:01:14Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![pietrogovoni](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/p/258eb7/32.png) [@pietrogovoni](https://root-forum.cern.ch/u/pietrogovoni)\
**Post date:** [January 21, 2023, 4:01pm UTC](https://root-forum.cern.ch/t/root-6-26-10-compile-problem-on-macosx-ventura/53201/1 "2023-01-21T16:01:14Z")

</div>

Dear ROOT experts,

I am trying to compile ROOT 6.26.10 on my MacBook AIR running MacOSX Ventura, after having the XCode command line tools installed, the “Apple clang version 14.0.0 (clang-1400.0.29.202)” version of C++, cmake version 3.25.1 and using the following instructions:

```auto
mkdir root_v6.26.10
mkdir root_v6.26.10_BUILD
tar xzf root_v6.26.10.source.tar.gz 
cd root_v6.26.10_BUILD/
cmake -DCMAKE_INSTALL_PREFIX=../root_v6.26.10 ../root-6.26.10 -Dbuiltin_glew=ON
cmake --build . --target install 

```

Unfortunately, I get the following error message:

```auto
[74%] Building CXX object core/base/CMakeFiles/Base.dir/src/String.cxx.o
In file included from /Users/govoni/private/job/cms/software/root-6.26.10/core/base/src/String.cxx:19:
In file included from /Users/govoni/private/job/cms/software/root-6.26.10/core/base/inc/TBuffer.h:24:
In file included from /usr/local/include/TDataType.h:26:
In file included from /usr/local/include/TDictionary.h:45:
In file included from /usr/local/include/TNamed.h:29:
In file included from /usr/local/include/TString.h:41:
**/usr/local/include/RStringView.h:24:12:**  **fatal error:**  **'experimental/string_view' file not found**
# include <experimental/string_view>
**^ ~~~~~~~~~~~~~~~~~~~~~~~~~ **
1 error generated.
make[2]: *** [core/base/CMakeFiles/Base.dir/src/String.cxx.o] Error 1
make[1]: *** [core/base/CMakeFiles/Base.dir/all] Error 2
make: *** [all] Error 2

```

How may I fix it?

Best regards,

pietro

* * *

_ROOT Version_: 6.26.10  
_Platform:_ MacOSX Ventura  
_Compiler:_ Apple clang version 14.0.0 (clang-1400.0.29.202)

* * *

---

<div class="post-metadata">

**Author:** ![jalopezg](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/jalopezg/32/25844_2.png) [@jalopezg](https://root-forum.cern.ch/u/jalopezg)\
**Post date:** [January 22, 2023, 9:10pm UTC](https://root-forum.cern.ch/t/root-6-26-10-compile-problem-on-macosx-ventura/53201/2 "2023-01-22T21:10:43Z")

</div>

Hi @pietrogovoni,

First of all, welcome to the ROOT forum!

> [@pietrogovoni](#):
>
> ```auto
> In file included from /usr/local/include/TDataType.h:26:
> In file included from /usr/local/include/TDictionary.h:45:
> In file included from /usr/local/include/TNamed.h:29:
> In file included from /usr/local/include/TString.h:41:
> 
> ```

According to the `/usr/local/include/...` paths above, it might seem that you have a previous installation of ROOT lying around there.  
FWIW, ROOT should not be picking up those headers during build anyways; I think this was solved in `master` but the proper fix wasn’t backported, @Axel.

That said, and unless otherwise justified, we discourage our users from building ROOT from source. Instead, binary distributions should be used. Please, tale a look at [Installing ROOT - ROOT](https://root.cern/install) for installation instructions. For macOS, we recommend either installing via [Conda](https://root.cern/install/#conda) or [macOS-specific procedure](https://root.cern/install/#macos-package-managers).

Cheers,  
J.

---

<div class="post-metadata">

**Author:** ![pietrogovoni](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/p/258eb7/32.png) [@pietrogovoni](https://root-forum.cern.ch/u/pietrogovoni)\
**Post date:** [January 24, 2023, 3:57pm UTC](https://root-forum.cern.ch/t/root-6-26-10-compile-problem-on-macosx-ventura/53201/3 "2023-01-24T15:57:46Z")

</div>

Dear Javier,

thanks a lot for your reply; I tried and use homebrew to install root, but something fishy happened, since when I try and compile a c++ program I get some inconsistencies:

```auto
bug:testo_e_soluzione $ c++ -o genera genera.cpp lib.cc `root-config --glibs --cflags`
ld: warning: ignoring file /usr/local/Cellar/root/6.26.06_2/lib/root/libImt.so, building for macOS-arm64 but attempting to link with file built for macOS-x86_64
ld: warning: ignoring file /usr/local/Cellar/root/6.26.06_2/lib/root/libNet.so, building for macOS-arm64 but attempting to link with file built for macOS-x86_64
ld: warning: ignoring file /usr/local/Cellar/root/6.26.06_2/lib/root/libRIO.so, building for macOS-arm64 but attempting to link with file built for macOS-x86_64
ld: warning: ignoring file /usr/local/Cellar/root/6.26.06_2/lib/root/libCore.so, building for macOS-arm64 but attempting to link with file built for macOS-x86_64
ld: warning: ignoring file /usr/local/Cellar/root/6.26.06_2/lib/root/libGraf.so, building for macOS-arm64 but attempting to link with file built for macOS-x86_64
ld: warning: ignoring file /usr/local/Cellar/root/6.26.06_2/lib/root/libHist.so, building for macOS-arm64 but attempting to link with file built for macOS-x86_64ld: warning: ignoring file /usr/local/Cellar/root/6.26.06_2/lib/root/libGpad.so, building for macOS-arm64 but attempting to link with file built for macOS-x86_64

```

which is why I tried to compile myself.  
Anyways, following your comment I removed myself all old root include files and restarted the compilation from scratch, and yet I get to the same error it seems:

```auto
[74%] Building CXX object core/base/CMakeFiles/Base.dir/src/String.cxx.o
In file included from /Users/govoni/private/job/cms/software/root-6.26.10/core/base/src/String.cxx:19:
In file included from /Users/govoni/private/job/cms/software/root-6.26.10/core/base/inc/TBuffer.h:24:
In file included from /Users/govoni/private/job/cms/software/root-6.26.10/core/meta/inc/TDataType.h:25:
In file included from /Users/govoni/private/job/cms/software/root-6.26.10/core/meta/inc/TDictionary.h:44:
In file included from /Users/govoni/private/job/cms/software/root-6.26.10/core/base/inc/TNamed.h:26:
In file included from /Users/govoni/private/job/cms/software/root-6.26.10/core/base/inc/TString.h:29:
/Users/govoni/private/job/cms/software/root-6.26.10/core/foundation/inc/ROOT/RStringView.hxx:30:12: fatal error: 'experimental/string_view' file not found
# include <experimental/string_view>
           ^ ~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
make[2]: *** [core/base/CMakeFiles/Base.dir/src/String.cxx.o] Error 1
make[1]: *** [core/base/CMakeFiles/Base.dir/all] Error 2
make: *** [all] Error 2

```

Is there anything I can do to solve this problem?  
I am not willing to compile from scratch if not needed, of course :slight\_smile 🙂

Best regards,

pietro

---

<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:** [January 24, 2023, 4:11pm UTC](https://root-forum.cern.ch/t/root-6-26-10-compile-problem-on-macosx-ventura/53201/4 "2023-01-24T16:11:37Z")

</div>

Ciao Pietro,

I just tried an installation on one of our Mac nodes by following the simple steps I outlined [here](https://root-forum.cern.ch/t/root-build-with-python-3-7-in-centos7/53162/8). I guess this should work for you as well, let me know.

Regarding the warning you saw when installing with brew, most probably they come from the conflicting installation in your system. In general, you should avoid having different versions of the same software in the same environment. Something like a Python virtual environment like the one you can create with the instructions I linked above kills two birds with one stone.

Alternatively, if you want to keep the brew installation, make sure you always have exactly one version of ROOT installed on the system (although I would advise against this in general).

Cheers,  
Vincenzo

---

<div class="post-metadata">

**Author:** ![pietrogovoni](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/p/258eb7/32.png) [@pietrogovoni](https://root-forum.cern.ch/u/pietrogovoni)\
**Post date:** [January 26, 2023, 1:31pm UTC](https://root-forum.cern.ch/t/root-6-26-10-compile-problem-on-macosx-ventura/53201/5 "2023-01-26T13:31:11Z")

</div>

Ciao Vincenzo,

thanks a lot for the hint!  
Regarding possible conflicts with Homebrew: to make sure, when I tried that I run brew uninstall root before any installation and even cleaned up the /usr/local/include from all root include files.

Anyhow, your recipe worked in the sense that the installation, which I had to do with python 3.10, worked in the sense that it seemed to end with no errors, but I cannot find root, what am I missing?

Cheers,

pietro

---

<div class="post-metadata">

**Author:** ![pietrogovoni](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/p/258eb7/32.png) [@pietrogovoni](https://root-forum.cern.ch/u/pietrogovoni)\
**Post date:** [January 26, 2023, 2:41pm UTC](https://root-forum.cern.ch/t/root-6-26-10-compile-problem-on-macosx-ventura/53201/6 "2023-01-26T14:41:28Z")

</div>

Ciao Vincenzo,

I eventually did manage to get root working, thanks to all for the help!

pietro

---

<div class="post-metadata">

**Author:** ![system](https://root-forum.cern.ch/uploads/default/original/3X/e/f/efe4f24398fd8ffeb76bccb6ecc46d9d9c003376.png) [@system](https://root-forum.cern.ch/u/system)\
**Post date:** [February 9, 2023, 2:42pm UTC](https://root-forum.cern.ch/t/root-6-26-10-compile-problem-on-macosx-ventura/53201/7 "2023-02-09T14:42:06Z")

</div>

Closed on February 9, 2023, 2:42pm UTC

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