Thread_local issue

Hi,
I’ve (unfortunately ?) updated Xcode to 6.3 (6D570) and trying to recompile ROOT 6-03-02 from source I get this error:

clang++ -O2 -DNDEBUG -m64 -std=c++11 -stdlib=libc++ -pipe -Wshadow -W -Wall -Woverloaded-virtual -fsigned-char -fno-common -Iinclude -pthread -Icore/base/src -MMD -MP -o core/base/src/TRegexp.o -c /Applications/ROOT/root-v6-03-02Compiled/core/base/src/TRegexp.cxx /Applications/ROOT/root-v6-03-02Compiled/core/base/src/TRegexp.cxx:146:4: error: thread-local storage is not supported for the current target thread_local char buf[fgMaxpat]; ^ /Applications/ROOT/root-v6-03-02Compiled/core/base/src/TRegexp.cxx:200:11: warning: address of stack memory associated with local variable 'buf' returned [-Wreturn-stack-address] return buf; ^~~ 1 warning and 1 error generated. make: *** [core/base/src/TRegexp.o] Error 1

I’m running OSX 10.10.3; I’ve also tried a clean install but no luck:

sudo make clean sudo ./configure --enable-rpath --enable-soversion --all sudo make -j 8

Any idea on what’s going on?

Thanks.

Bye…

Hi, I had the same experience. Updated to Xcode 6.3 on Mac OS X 10.10.3 and then when recompiling ROOT it failed complaining about thread-local. Tried various download versions of ROOT: 6.02/05, 6.03/02, all had the same problem.

Since I didn’t wipe my previous version of ROOT I could still run root more or less as normal. However, when I tried to run a previously working piece of code, using my previous version of ROOT, but with the new c++, clang, i.e. command line tools that came with 6.3, I got the following error message:

'/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/…/include/c++/v1/memory’
modified since it was first processed
Warning in TInterpreter::TCling::RegisterModule: Problems declaring payload for module Cluster_C_ACLiC_dict.

This was in response to a root command:

root > .L Cluster.C++

Not sure if it is related to the thread-local error but just another piece of information.

Yeah, I had the same problem yesterday. For the interim, I reverted back to Xcode 6.2.

Hi,

See devforums.apple.com/message/1101679#1101679

They fixed a bug in clang where lack of TLS support was not diagnosed. We will need to adapt ROOT to that missing support now that we are aware of it. This will only happen after CHEP, i.e. in about 10 days from now.

Axel.

Good to know!

Thanks Axel.

Bye…

Hi,

Just to say that I was in the same situation, but it turn out that downgrading Xcode is a relatively easy task, all it take is:

  1. Remove the Xcode.app folder in the Application folder
  2. Restart your system
  3. Download and install Xcode 6.2 and Xcode command line tool for Xcode 6.2 here:
    developer.apple.com/downloads/index.action

After that Root 6 was compiling and running fine.

Hi,

v6-02-00-patches and master are now fixed. We will likely release a new v6-02 patches release (/10) soon.

Cheers, Axel.

I also have this problem. If a fix will be posted soon, I will not back up to the previous version of Xcode because it takes a very long time to download the previous version of Xcode, due to the slow internet to which I have access. I can still run Root, but not my compiled code: I get “fatal error: file ‘/Library/Developer/CommandLineTools/usr/bin/…/include/c++/v1/__locale’ modified since it was first processed
Warning in TInterpreter::TCling::RegisterModule:”

I can wait until after CHEP, though :slight_smile:

Hi,

See sft.its.cern.ch/jira/browse/ROOT-7243

Axel.

6-02-08 works for me!

Thanks a lot.

Bye…

I tried recompiling v6.02.08 and I’m still running into the same issue in TRegexp.cxx.

error: thread-local storage is not supported for the current target
thread_local char buf[fgMaxpat];
^
root-6.02.08/core/base/src/TRegexp.cxx:200:11: warning: address of stack memory associated with local variable ‘buf’ returned [-Wreturn-stack-address]
return buf;
^~~
1 warning and 1 error generated.
make: *** [core/base/src/TRegexp.o] Error 1

Not sure if I’m alone on this or not.

[quote=“bpnuke”]I tried recompiling v6.02.08 and I’m still running into the same issue in TRegexp.cxx.

Not sure if I’m alone on this or not.[/quote]

I had interpreted the links above to say that it was necessary to apply patches to make it work. I downloaded the system to patch it, but it wasn’t obvious to me that the fix was included in the patches. 6.02.08 out of the box definitely does not work, that was the one I started with above.

how come? out of the box, even with Xcode 6.3.1 it doesn’t compile.

[quote=“TShirt”]6-02-08 works for me!
Thanks a lot.
Bye…[/quote]

My mistake. I tried on another machine that did not update XCode automatically.
So thanks to your comments I’ll still wait to update this one.

Sorry for the confusion.

Bye…

Hi,

To clarify the situation: v6.02/08 does not work. We will roll a new patch release in the coming days / week(s).

Until then please use git and check out v6-02-00-patches.

Cheers, Axel.

Hi,
I’ve just received an email that announces the new v6.03/04. Is it still affected by this issue?

Bye…

I was able to compile ROOT v. 6.03/04 with Xcode 6.3.1, Build version 6D1002; I also ran a few codes and didn’t have any issues.

Hi,

so when will there be Root pro version that will work on Macs (Xcode 6.3.1)?
I cannot use Root on my Mac, I had to work on lxplus for almost 2 months…

cheers,
Marek

I believe that ROOT 6.02/10 works with it already; I haven’t had any other issues with 6.03/04 and am currently on Xcode 6.3.2, build 6D2105.