# ROOT 6.22 binary on macOS with C++14/17

**URL:** <https://root-forum.cern.ch/t/root-6-22-binary-on-macos-with-c-14-17/42319>\
**Category:** ROOT\
**Tags:** build\
**Created:** [November 16, 2020, 12:19pm UTC](https://root-forum.cern.ch/t/root-6-22-binary-on-macos-with-c-14-17/42319 "2020-11-16T12:19:40Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![zhubacek](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/z/9de0a6/32.png) [@zhubacek](https://root-forum.cern.ch/u/zhubacek)\
**Post date:** [November 16, 2020, 12:19pm UTC](https://root-forum.cern.ch/t/root-6-22-binary-on-macos-with-c-14-17/42319/1 "2020-11-16T12:19:40Z")

</div>

Hello,  
Is there a plan to provide a binary distribution for macOS (10.15 or 11) with C++14/17 support or should I try to compile it from source (I never compiled it myself so I’m a bit worried about features/dependencies)

Thanks,  
Zdenek

_ROOT Version:_ 6.22/02  
_Platform:_ macOS 10.15 or 11  
_Compiler:_ clang12

* * *

---

<div class="post-metadata">

**Author:** ![jblomer](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/j/439d5e/32.png) [@jblomer](https://root-forum.cern.ch/u/jblomer)\
**Post date:** [November 16, 2020, 1:41pm UTC](https://root-forum.cern.ch/t/root-6-22-binary-on-macos-with-c-14-17/42319/2 "2020-11-16T13:41:00Z")

</div>

For macOS 11 with the current master branch, we are building with C++17. That should be released with ROOT 6.24 (@Axel please correct me if I’m wrong).

---

<div class="post-metadata">

**Author:** ![Axel](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/axel/32/11084_2.png) [@Axel](https://root-forum.cern.ch/u/Axel)\
**Post date:** [November 16, 2020, 4:34pm UTC](https://root-forum.cern.ch/t/root-6-22-binary-on-macos-with-c-14-17/42319/3 "2020-11-16T16:34:55Z")

</div>

…and you can grab the nightly from [https://root.cern/download/nightly/?C=M;O=D](https://root.cern/download/nightly/?C=M;O=D)

That said: our macOS nightlies are broken! I’ll fix them; once done they will include a macOS 11 Big Sur build for you to try. I’ll be back…

---

<div class="post-metadata">

**Author:** ![Axel](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/axel/32/11084_2.png) [@Axel](https://root-forum.cern.ch/u/Axel)\
**Post date:** [November 18, 2020, 2:09pm UTC](https://root-forum.cern.ch/t/root-6-22-binary-on-macos-with-c-14-17/42319/4 "2020-11-18T14:09:52Z")

</div>

Once [https://github.com/root-project/root/pull/6832](https://github.com/root-project/root/pull/6832) is in we will get  
macOS nightlies, including Big Sur.

---

<div class="post-metadata">

**Author:** ![Axel](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/axel/32/11084_2.png) [@Axel](https://root-forum.cern.ch/u/Axel)\
**Post date:** [November 20, 2020, 3:58pm UTC](https://root-forum.cern.ch/t/root-6-22-binary-on-macos-with-c-14-17/42319/5 "2020-11-20T15:58:18Z")

</div>

Hi,

Grab it here: `curl -O https://root.cern/download/nightly/root_v6.23.01.macosx64-10.15-clang120.debug.tar.gz`

Let us know whether you see any problems!

Cheers, Axel.

---

<div class="post-metadata">

**Author:** ![zhubacek](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/z/9de0a6/32.png) [@zhubacek](https://root-forum.cern.ch/u/zhubacek)\
**Post date:** [November 22, 2020, 8:32pm UTC](https://root-forum.cern.ch/t/root-6-22-binary-on-macos-with-c-14-17/42319/6 "2020-11-22T20:32:40Z")

</div>

> [@Axel](#):
>
> [Index of /download/nightly](https://root.cern/download/nightly)

Hi,  
This version is still C++11 only?

When I started it for the first time, I got

```auto
IncrementalExecutor::executeFunction: symbol '_ZN4Vc_16Common15checkLibraryAbiEjjPKc' unresolved while linking function '_GLOBAL__sub_I_cling_module_1'!
You are probably missing the definition of Vc_1::Common::checkLibraryAbi(unsigned int, unsigned int, char const*)

```

but it doesn’t happen on subsequent starts

My problem with C++11/14 is that my code uses auto lambda functions for RDataFrame (`'auto' return without trailing return type; deduced return types are a C++14 extension`) so it won’t compile with C++11, when I switch to C++14  
I get errors with

```auto
.../root_623/root/include/ROOT/RDF/ActionHelpers.hxx:1451:26:error: 
      reference to 'index_sequence_for' is ambiguous
      using ind_t = std::index_sequence_for<ColTypes...>;

```

Cheers,  
Zdenek

---

<div class="post-metadata">

**Author:** ![Axel](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/axel/32/11084_2.png) [@Axel](https://root-forum.cern.ch/u/Axel)\
**Post date:** [November 23, 2020, 4:17pm UTC](https://root-forum.cern.ch/t/root-6-22-binary-on-macos-with-c-14-17/42319/7 "2020-11-23T16:17:13Z")

</div>

We build with whatever the compiler’s default version is; `root [0] __cplusplus` will tell you. If that’s not what you need then you’d have to build ROOT yourself.

---

<div class="post-metadata">

**Author:** ![zhubacek](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/z/9de0a6/32.png) [@zhubacek](https://root-forum.cern.ch/u/zhubacek)\
**Post date:** [November 23, 2020, 4:48pm UTC](https://root-forum.cern.ch/t/root-6-22-binary-on-macos-with-c-14-17/42319/8 "2020-11-23T16:48:16Z")

</div>

I’m not an expert, but I thought that c++14 is the default in clang++ for some time?  
(but I don’t know if this concerns xcode/apple/llvm version)?

in my case

```auto
root [0] __cplusplus
(long) 201103

```

for root\_v6.23.01.macosx64-10.15-clang120.debug.tar.gz  
but my `Apple clang version 12.0.0 (clang-1200.0.32.27)` with `man clang++` shows `gnu++14` as default

---

<div class="post-metadata">

**Author:** ![Axel](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/axel/32/11084_2.png) [@Axel](https://root-forum.cern.ch/u/Axel)\
**Post date:** [November 25, 2020, 10:45am UTC](https://root-forum.cern.ch/t/root-6-22-binary-on-macos-with-c-14-17/42319/9 "2020-11-25T10:45:35Z")

</div>

Try this:

```auto
echo '__cplusplus' | clang++ -E -x c++ -

```

For me and my clang 12.0.0 it says `199711L`. Which we change to C++11 because we need it. I see what `man clang++` says (it says it for me, too) but that seems to have only a weak correlation with reality 🙂

---

<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:** [December 9, 2020, 10:55am UTC](https://root-forum.cern.ch/t/root-6-22-binary-on-macos-with-c-14-17/42319/10 "2020-12-09T10:55:51Z")

</div>

Closed on December 9, 2020, 10:55am UTC

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