Open hahnjo opened 1 year ago
Before I digest and even start thinking: thank you ❤️ for starting this!
It seems that one instance of problem 4 caused problems for dask+htcondor+lxbatch: https://mattermost.web.cern.ch/root/pl/dou6tb5mofnitgxoqs9d8t6x4w
Clang's search for the standard C++ headers is complex, up to messy. It is a combination of build-time decisions in
interpreter/cling/lib/Interpreter/CMakeLists.txt
and runtime searches ininterpreter/cling/lib/Interpreter/CIFactory.cpp
. Below I'm listing a number of things I noticed, and I think it would be worth it to clean up this business:CLING_CXX_PATH
andCLING_CXX_HEADERS
are declared asoption
s ininterpreter/cling/lib/Interpreter/CMakeLists.txt
. This gives them a type ofBOOL
instead ofSTRING
(or maybeFILEPATH
forCLING_CXX_PATH
?).FORCE
d back into theCACHE
, so it will be re-computed on every CMake invocation.CLING_CXX_PATH
has a large section dealing withccache
anddistcc
, which can only be taken if users set the environment variableCXX="ccache g++"
. Since CMake 3.4, it is recommended to instead useCMAKE_CXX_COMPILER_LAUNCHER=ccache
, or ROOT'sccache=ON
, so this may be obsolete?[ ] The header lookup is inconsistent between the build system and the
CIFactory
: The messages during configuration suggest that the order isI think this matches the initial implementation, but it's not true anymore since commit afabc3b63885427251fd69b4aeda887bae35a289 switched to asking the compiler in the
PATH
first, to address a problem report from CMS.PATH
could make the interpreter pick up a different compiler, even though it could still ask the existing full path. It's also inconsistent with respect to the previous point because a compiler inPATH
takes precedence over the directories determined at build time, while a compiler outside is asked last. Incidentally, this is exactly what seems to "save" CMS right now.I actually started working on cleaning this up, but stopped when I discovered the problem report from CMS. I think what we need to have first is a proper discussion how we want things to work, and then implement that in a clean way.