# Problem compiling locally on Mac

**URL:** <https://root-forum.cern.ch/t/problem-compiling-locally-on-mac/27197>\
**Category:** ROOT\
**Created:** [December 6, 2017, 1:57pm UTC](https://root-forum.cern.ch/t/problem-compiling-locally-on-mac/27197 "2017-12-06T13:57:14Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Martin\_Aleksa](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/m/6a8cbe/32.png) [@Martin\_Aleksa](https://root-forum.cern.ch/u/Martin_Aleksa)\
**Post date:** [December 6, 2017, 1:57pm UTC](https://root-forum.cern.ch/t/problem-compiling-locally-on-mac/27197/1 "2017-12-06T13:57:14Z")

</div>

Hello,

I have a problem compiling locally on my Mac (macOS 10.12.6, Xcode 9.2) using root v6.10.8 (root\_v6.10.08). My problem looks a lot like described in [https://sft.its.cern.ch/jira/browse/ROOT-9015](https://sft.its.cern.ch/jira/browse/ROOT-9015), but as mentioned in the Jira it should have been fixed with the latest version. However I still experience exactly this problem with my little test program:

test.C:

#include   
#include \<TString.h\>  
int main()  
{  
std::cout \<\< “Hello World” \<\< std::endl;  
return 0;  
}

… using

g++ -O -Wall -fPIC -pthread -stdlib=libc++ -std=c++11 -m64 -I/Applications/root\_v6.10.08/include -c -o test.o test.C

…I still get:

In file included from test.C:3:  
In file included from /Applications/root\_v6.10.08/include/TString.h:28:  
/Applications/root\_v6.10.08/include/RStringView.h:35:12: error: unknown type name 'basic\_string\_view’  
typedef basic\_string\_view string\_view;  
^  
/Applications/root\_v6.10.08/include/RStringView.h:35:29: error: expected unqualified-id  
typedef basic\_string\_view string\_view;  
…

Please tell me, what is wrong, I thought this issue is fixed in the new version of root v6?  
Cheers,  
Martin

---

<div class="post-metadata">

**Author:** ![ksmith](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/ksmith/32/12567_2.png) [@ksmith](https://root-forum.cern.ch/u/ksmith)\
**Post date:** [December 6, 2017, 3:13pm UTC](https://root-forum.cern.ch/t/problem-compiling-locally-on-mac/27197/2 "2017-12-06T15:13:37Z")

</div>

First a remark on posting code snippets:

> [@Getting the same histograms after cuts](https://root-forum.cern.ch/t/getting-the-same-histograms-after-cuts/24719/2):
>
> Remark on the way to post code snippets: When you post pieces of code on the forum enclose it with ``` . That makes your post much more readable (I systematically edit your posts that way) . So do: ``` // this is a C++ piece of code. ``` And it will display as: // this is a C++ piece of code.

Second, it is most likely that XCode was updated and ROOT was not recompiled ( I just went through this two days ago):

> [@TString.h \`no template name 'basic\_string\_view'\`](https://root-forum.cern.ch/t/tstring-h-no-template-name-basic-string-view/27176/3):
>
> This indicates that XCode was updated but ROOT was not recompiled from scratch. Because of changed in XCode the configuration step (the cmake command) must be redone from ‘scratch’ (at the very least delete CMakeCache.txt) otherwise cmake will keep the information it gather about the previous compiler version. Cheers, Philippe.

---

<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 20, 2017, 3:13pm UTC](https://root-forum.cern.ch/t/problem-compiling-locally-on-mac/27197/3 "2017-12-20T15:13:38Z")

</div>

Closed on December 20, 2017, 3:13pm UTC

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