mbjoern
November 29, 2016, 10:56am
1
Hello,
I have problems including TLorentzVector.h. My header starts like
#ifndef __CINT__
#include <Riostream.h>
#include <iostream>
#include <fstream>
#include <string>
#include "TROOT.h"
#include "TString.h"
#include "TTimeStamp.h"
#include "TChain.h"
#include "TEntryList.h"
#include "TObject.h"
#include "TFile.h"
#include "TSystem.h"
#include "TH2.h"
//#include "TLorentzVector.h"
#endif
and works fine, both when I load the macro into ROOT or compiles with gcc. If I uncomment TLorentzVector I get 9000 lines of errors, the first few lines of the log file are:
g++ -O2 -g -Wall -pthread -std=c++11 -Wno-deprecated-declarations -m64 -I/network/software/el6/cern/root/5.34.21_gcc48/root/include -c /home/bjoern/Analyses/Bu2D0h_D2Kshh/Scripts/Initial_Cuts/src/main.cxx -o /home/bjoern/Analyses/Bu2D0h_D2Kshh/Scripts/Initial_Cuts/obj/main.o
In file included from /cvmfs/lhcb.cern.ch/lib/lcg/releases/gcc/4.9.3/x86_64-slc6/lib/gcc/x86_64-unknown-linux-gnu/4.9.3/include/x86intrin.h:27:0,
from /network/software/el6/compilers/gcc/gcc-4.8.2/include/c++/4.8.2/x86_64-unknown-linux-gnu/bits/opt_random.h:33,
from /network/software/el6/compilers/gcc/gcc-4.8.2/include/c++/4.8.2/random:51,
from /network/software/el6/compilers/gcc/gcc-4.8.2/include/c++/4.8.2/bits/stl_algo.h:65,
from /network/software/el6/compilers/gcc/gcc-4.8.2/include/c++/4.8.2/algorithm:62,
from /network/software/el6/cern/root/5.34.21_gcc48/root/include/TMath.h:34,
from /home/bjoern/Analyses/Bu2D0h_D2Kshh/Scripts/Initial_Cuts/src/main.h:18,
from /home/bjoern/Analyses/Bu2D0h_D2Kshh/Scripts/Initial_Cuts/src/main.cxx:2:
/cvmfs/lhcb.cern.ch/lib/lcg/releases/gcc/4.9.3/x86_64-slc6/lib/gcc/x86_64-unknown-linux-gnu/4.9.3/include/ia32intrin.h: In function ‘long long unsigned int __readeflags()’:
/cvmfs/lhcb.cern.ch/lib/lcg/releases/gcc/4.9.3/x86_64-slc6/lib/gcc/x86_64-unknown-linux-gnu/4.9.3/include/ia32intrin.h:246:41: error: ‘__builtin_ia32_readeflags_u64’ was not declared in this scope
return __builtin_ia32_readeflags_u64 ();
^
/cvmfs/lhcb.cern.ch/lib/lcg/releases/gcc/4.9.3/x86_64-slc6/lib/gcc/x86_64-unknown-linux-gnu/4.9.3/include/ia32intrin.h: In function ‘void __writeeflags(long long unsigned int)’:
/cvmfs/lhcb.cern.ch/lib/lcg/releases/gcc/4.9.3/x86_64-slc6/lib/gcc/x86_64-unknown-linux-gnu/4.9.3/include/ia32intrin.h:254:36: error: ‘__builtin_ia32_writeeflags_u64’ was not declared in this scope
__builtin_ia32_writeeflags_u64 (X);
^
In file included from /cvmfs/lhcb.cern.ch/lib/lcg/releases/gcc/4.9.3/x86_64-slc6/lib/gcc/x86_64-unknown-linux-gnu/4.9.3/include/immintrin.h:45:0,
from /cvmfs/lhcb.cern.ch/lib/lcg/releases/gcc/4.9.3/x86_64-slc6/lib/gcc/x86_64-unknown-linux-gnu/4.9.3/include/x86intrin.h:46,
from /network/software/el6/compilers/gcc/gcc-4.8.2/include/c++/4.8.2/x86_64-unknown-linux-gnu/bits/opt_random.h:33,
from /network/software/el6/compilers/gcc/gcc-4.8.2/include/c++/4.8.2/random:51,
from /network/software/el6/compilers/gcc/gcc-4.8.2/include/c++/4.8.2/bits/stl_algo.h:65,
from /network/software/el6/compilers/gcc/gcc-4.8.2/include/c++/4.8.2/algorithm:62,
from /network/software/el6/cern/root/5.34.21_gcc48/root/include/TMath.h:34,
from /home/bjoern/Analyses/Bu2D0h_D2Kshh/Scripts/Initial_Cuts/src/main.h:18,
from /home/bjoern/Analyses/Bu2D0h_D2Kshh/Scripts/Initial_Cuts/src/main.cxx:2:
/cvmfs/lhcb.cern.ch/lib/lcg/releases/gcc/4.9.3/x86_64-slc6/lib/gcc/x86_64-unknown-linux-gnu/4.9.3/include/avx512fintrin.h: At global scope:
/cvmfs/lhcb.cern.ch/lib/lcg/releases/gcc/4.9.3/x86_64-slc6/lib/gcc/x86_64-unknown-linux-gnu/4.9.3/include/avx512fintrin.h:33:29: error: attribute(target(“avx512f”)) is unknown
#pragma GCC target(“avx512f”)
Can anyone help me on the right track? I think I am including the right libraries, but I may be wrong of course (the same happens when I try to load-and-compile into ROOT using .L main.cxx+
Best regards,
Mikkel
mbjoern
November 29, 2016, 11:22am
2
Ah, my setup was using another version of g++ than ROOT was compiled with, causing the error. I did not know that could be an issue, but have become better educated now.