Hi,
I’ve been using Root 5.34/21 in mac.
But yesterday, I tried to compile some codes I’ve been using, but I got the error message as below :
root [0] .x chi2_lambda.C++
Info in <TMacOSXSystem::ACLiC>: creating shared library /Users/jskim/Documents/CMS/trilepton/mumumu/./chi2_lambda_C.so
In file included from /Users/jskim/Documents/CMS/trilepton/mumumu/chi2_lambda_C_ACLiC_dict.cxx:17:
In file included from /Users/jskim/Documents/CMS/trilepton/mumumu/chi2_lambda_C_ACLiC_dict.h:34:
In file included from /Users/jskim/Documents/CMS/trilepton/mumumu/./chi2_lambda.C:3:
In file included from /Users/jskim/Documents/CMS/header/Muon.h:1:
In file included from /usr//include/root/TChain.h:25:
In file included from /usr//include/root/TTree.h:62:
In file included from /usr//include/root/TClass.h:42:
/usr//include/root/ThreadLocalStorage.h:213:23: error: initializer for thread-local variable must be a constant expression
TTHREAD_TLS(T*) ptr(0);
^~~
/usr//include/root/ThreadLocalStorage.h:224:27: error: initializer for thread-local variable must be a constant expression
TTHREAD_TLS(Array*) ptr(0);
^~~
/usr//include/root/ThreadLocalStorage.h:235:23: error: initializer for thread-local variable must be a constant expression
TTHREAD_TLS(T*) ptr(0);
^~~
3 errors generated.
clang: error: no such file or directory: '/Users/jskim/Documents/CMS/trilepton/mumumu/chi2_lambda_C_ACLiC_dict.o'
Error in <ACLiC>: Compilation failed!
Error: Function chi2_lambda() is not defined in current scope :0:
*** Interpreter error recovered ***
So I tried a very simple code,
#include <iostream>
using namespace std;
void test(){
cout << "hello" << endl;
}
with command,
root [0] .x test.C
hello
As you see, it works, but when I compile it, I got the same error message,
root [1] .x test.C++
Info in <ACLiC>: script has already been loaded in interpreted mode
Info in <ACLiC>: unloading /Users/jskim/Documents/CMS/./test.C and compiling it
Info in <TMacOSXSystem::ACLiC>: creating shared library /Users/jskim/Documents/CMS/./test_C.so
In file included from /Users/jskim/Documents/CMS/test_C_ACLiC_dict.cxx:19:
In file included from /usr//include/root/TClass.h:42:
/usr//include/root/ThreadLocalStorage.h:213:23: error: initializer for thread-local variable must be a constant expression
TTHREAD_TLS(T*) ptr(0);
^~~
/usr//include/root/ThreadLocalStorage.h:224:27: error: initializer for thread-local variable must be a constant expression
TTHREAD_TLS(Array*) ptr(0);
^~~
/usr//include/root/ThreadLocalStorage.h:235:23: error: initializer for thread-local variable must be a constant expression
TTHREAD_TLS(T*) ptr(0);
^~~
3 errors generated.
clang: error: no such file or directory: '/Users/jskim/Documents/CMS/test_C_ACLiC_dict.o'
Error in <ACLiC>: Compilation failed!
Error: Function test() is not defined in current scope :0:
*** Interpreter error recovered ***
Anyone having same issues after updating newest OSX and Xcodes?