To me it’s a bit surprising why clang is reporting that issue since I’m working primarily with gcc. Probably someone can shed some light on the nature of that and how to solve it?
cling (ROOT’s interpreter) is based on llvm/clang.
This error usually means that you recompiled part of your build directory, not all of it.
Give a cmake --build . from the top of your build directory, it should fix it.
Thanks a lot for the quick reply and the provided information. After calling cmake --build . the error remains and ROOT refuses to start. The command itself succeeded.
Actually, I cannot remember having rebuilt part of the build recently. The only thing that happened was a small system upgrade. Not sure if that touched anything of relevance …
Could there be another reason for this behaviour?
I see that you have ROOT installed in /opt/ROOT/. After giving the build command, did you install this latest build in /opt/ROOT (e.g. with make install)?
If yes, and that still doesn’t fix it:
option 1 is that someone more knowledgeable than me, e.g. @Danilo or @Axel, knows exactly what components need to be rebuilt and give you a more specific command to run
option 2 is that you rebuild and reinstall from scratch (i.e. from an empty build directory, after removing your current installation): this is the nuclear option and should definitely work
Sorry it was me being stupid: forgot the make install of course. After installing it, ROOT starts again.
But cling issues a warning about a mismatch between compiler versions (e.g. original compilation done with an older version of gcc). Should I fix that by rebuilding from scratch or can that warning be safely ignored for now?
The safe option would be to recompile ROOT with your new compiler. It’s hard to predict what mismatches there might be in code compiled by a previous gcc version vs a newer one (I think the most likely symptom would be weird crashes at runtime).