$ echo $CXX
$ spack load root
$ echo $CXX
/wcwc/spack/local/opt/spack/linux-debian12-haswell/gcc-12.2.0/llvm-17.0.6-34sidf3oyyyrsz47uyhhpp3d72rl3ewn/bin/clang++
$ ls -l (which root)
-rwxr-xr-x 1 bviren bviren 52672 Jun 3 19:01 /wcwc/spack/local/opt/spack/linux-debian12-haswell/gcc-12.2.0/root-6.30.06-a3mgusydgufcmvsl6e5cqyaajbivef6q/bin/root
The culprit is actually llvm. According to spack spec root this is the dependency path:
I think glx and mesa come in by root depending on "opengl".
OTOH, ROOT has a builtin_llvm definition that defaults to True.
So, actually I guess TWO copies of llvm are getting built including the one external from ROOT which is causing the CXX abuse.
I think the best is for WCT to build against +root~opengl though that may mean some 3D ROOT views are no longer possible.