Necessary modifications to allow compilation with gcc 7.1
This is work in progress.
so far solved the problem of overload resolution of std::addressof
which now has two function signatures.
I simply used a lambda wrapper but [](double& hit){ return &hit;}
should work just as well since we don't overload the ampersand operator. (don't want to use function pointers)
@graven, is there a significant up-/downside to either?
The next problem is a compilation error related to the json.hpp introduced in !602 (merged) (LBPID-27).
(edit) the error:
[2/10] Building CXX object Rec/ChargedProtoANNPID/CMakeFiles/ChargedProtoANNPID.dir/src/yPIDImpFactory.cpp.o
FAILED: /cvmfs/lhcb.cern.ch/lib/lhcb/LBSCRIPTS/LBSCRIPTS_v9r1p7/InstallArea/scripts/lcg-g++-7.1.0 -DBOOST_FILESYSTEM_VERSION=3 -DBOOST_SPIRIT_USE_PHOENIX_V3 -DChargedProtoANNPID_EXPORTS -DGAUDI_V20_COMPAT -DPACKAGE_NAME=\"ChargedProtoANNPID\" -DPACKAGE_VERSION=\"v2r15\" -D_GNU_SOURCE -Df2cFortran -Dlinux -Dunix -mavx2 -mfma -fmessage-length=0 -pipe -Wall -Wextra -Werror=return-type -pthread -pedantic -Wwrite-strings -Wpointer-arith -Woverloaded-virtual -Wno-long-long -Wsuggest-override -std=c++14 -Wno-deprecated -Wno-empty-body -Wno-unused-local-typedefs -O3 -DNDEBUG -fPIC -IRec/ChargedProtoANNPID -I../Rec/ChargedProtoANNPID -I../Rec/RecInterfaces -I/cvmfs/lhcb.cern.ch/lib/lcg/releases/LCG_89/vdt/0.3.6/x86_64-centos7-gcc7-opt/include -I/cvmfs/lhcb.cern.ch/lib/lcg/releases/LCG_89/clhep/2.3.4.4/x86_64-centos7-gcc7-opt/include -I/cvmfs/lhcb.cern.ch/lib/lcg/releases/LCG_89/GSL/2.1/x86_64-centos7-gcc7-opt/include -I/cvmfs/lhcb.cern.ch/lib/lcg/releases/LCG_89/rangev3/7c2b10f0/x86_64-centos7-gcc7-opt/include -I/cvmfs/lhcb.cern.ch/lib/lcg/releases/LCG_89/AIDA/3.2.1/x86_64-centos7-gcc7-opt/src/cpp -I/cvmfs/lhcb.cern.ch/lib/lcg/releases/LCG_89/tbb/44_20160413/x86_64-centos7-gcc7-opt/include -isystem /cvmfs/lhcb.cern.ch/lib/lcg/releases/LCG_89/ROOT/6.10.02/x86_64-centos7-gcc7-opt/include -isystem /cvmfs/lhcb.cern.ch/lib/lcg/releases/LCG_89/Boost/1.64.0/x86_64-centos7-gcc7-opt/include -Iinclude -I/home/chasse/intelhackathon/Lbcom/InstallArea/x86_64+avx2+fma-centos7-gcc7-opt/include -I/home/chasse/intelhackathon/LHCb/InstallArea/x86_64+avx2+fma-centos7-gcc7-opt/include -I/home/chasse/intelhackathon/Gaudi/InstallArea/x86_64+avx2+fma-centos7-gcc7-opt/include -MMD -MT Rec/ChargedProtoANNPID/CMakeFiles/ChargedProtoANNPID.dir/src/yPIDImpFactory.cpp.o -MF Rec/ChargedProtoANNPID/CMakeFiles/ChargedProtoANNPID.dir/src/yPIDImpFactory.cpp.o.d -o Rec/ChargedProtoANNPID/CMakeFiles/ChargedProtoANNPID.dir/src/yPIDImpFactory.cpp.o -c ../Rec/ChargedProtoANNPID/src/yPIDImpFactory.cpp
In file included from ../Rec/ChargedProtoANNPID/src/yPID/MC15TuneV1/decision_train/./dtrain.h:13:0,
from ../Rec/ChargedProtoANNPID/src/yPID/MC15TuneV1/decision_train/dt_pid.h:7,
from ../Rec/ChargedProtoANNPID/src/yPID/MC15TuneV1/GlobalPID_Electron_Long_FLAT4d.class.C:15,
from ../Rec/ChargedProtoANNPID/src/yPIDImpFactory.cpp:6:
../Rec/ChargedProtoANNPID/src/yPID/MC15TuneV1/decision_train/./json.hpp: In function ‘bool nlohmann::operator<(nlohmann::basic_json<ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer>::const_reference, nlohmann::basic_json<ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer>::const_reference)’:
../Rec/ChargedProtoANNPID/src/yPID/MC15TuneV1/decision_train/./json.hpp:6057:62: error: wrong number of template arguments (1, should be 2)
return *lhs.m_value.array < *rhs.m_value.array;
^~~~~
In file included from /cvmfs/lhcb.cern.ch/lib/lcg/releases/gcc/7.1.0/x86_64-centos7/include/c++/7.1.0/tuple:39:0,
from /cvmfs/lhcb.cern.ch/lib/lcg/releases/gcc/7.1.0/x86_64-centos7/include/c++/7.1.0/bits/stl_map.h:63,
from /cvmfs/lhcb.cern.ch/lib/lcg/releases/gcc/7.1.0/x86_64-centos7/include/c++/7.1.0/map:61,
from /home/chasse/intelhackathon/Gaudi/InstallArea/x86_64+avx2+fma-centos7-gcc7-opt/include/GaudiKernel/IssueSeverity.h:7,
from /home/chasse/intelhackathon/Gaudi/InstallArea/x86_64+avx2+fma-centos7-gcc7-opt/include/GaudiKernel/StatusCode.h:7,
from /home/chasse/intelhackathon/Gaudi/InstallArea/x86_64+avx2+fma-centos7-gcc7-opt/include/GaudiKernel/GaudiException.h:6,
from ../Rec/ChargedProtoANNPID/src/yPIDImpFactory.h:5,
from ../Rec/ChargedProtoANNPID/src/yPIDImpFactory.cpp:3:
/cvmfs/lhcb.cern.ch/lib/lcg/releases/gcc/7.1.0/x86_64-centos7/include/c++/7.1.0/array:94:12: note: provided for ‘template<class _Tp, long unsigned int _Nm> struct std::array’
struct array
^~~~~
Therefore pinging the people related to that MR/jira ticket: @derkach @mfontana @jonrob
Could you guys have a look at this? Gaudi compiles fine with gcc 7.1 and LHCb will with LHCb!829 (merged)
(To reproduce one can just pull the future branches and use CMTCONFIG=x86_64+avx2+fma-centos7-gcc7-opt
)