Skip to content

Conversation

@sethrj
Copy link
Contributor

@sethrj sethrj commented Dec 23, 2025

When building

dd4hep@1.33+ddalign+ddcad+ddcond+dddetectors+dddigi~ddeve+ddg4+ddrec~debug~doc+edm4hep~geant4units~hepmc3~ipo~lcio~tbb~utilityapps~xercesc
^root@6.38.00~aqua~arrow~cuda~cudnn~cxxmodules~daos~davix~dcache~emacs~examples~fftw~fits~fortran+gdml+geom~geombuilder+gminimal~graphviz+gsl~http~ipo+math+minuit~mlp~opengl~pythia8+python~qt6~r+roofit+root7+rpath~shadow~spectrum~sqlite~ssl~tbb+tiff~tmva~tmva-cpu+tmva-cudnn~tmva-gpu~tmva-pymva~tmva-sofie+tpython+unuran~vc+vdt~veccore~webgui~x+xml~xrootd build_system=cmake build_type=Release cxxstd=20 generator=make patches:=22af347 platform=darwin os=tahoe target=m2 %c,cxx=apple-clang@17.0.0

the final plugin build fails with:

[9/21] Generating libDDCoreGraphics.components
FAILED: [code=1] DDCore/libDDCoreGraphics.components /private/var/folders/n9/mqnx20b929z469f6p3fbq7c40000gn/T/seth/spack-stage/spack-stage-dd4hep-1.33-z7jy2mn65v76gsa5dyg3dlpkevocmuow/spack-build-z7jy2mn/DDCore/libDDCoreGraphics.components
cd /private/var/folders/n9/mqnx20b929z469f6p3fbq7c40000gn/T/seth/spack-stage/spack-stage-dd4hep-1.33-z7jy2mn65v76gsa5dyg3dlpkevocmuow/spack-build-z7jy2mn/lib && DYLD_LIBRARY_PATH=/private/var/folders/n9/mqnx20b929z469f6p3fbq7c40000gn/T/seth/spack-stage/spack-stage-dd4hep-1.33-z7jy2mn65v76gsa5dyg3dlpkevocmuow/spack-build-z7jy2mn/lib:/private/var/folders/n9/mqnx20b929z469f6p3fbq7c40000gn/T/seth/spack-stage/spack-stage-dd4hep-1.33-z7jy2mn65v76gsa5dyg3dlpkevocmuow/spack-build-z7jy2mn/lib: /private/var/folders/n9/mqnx20b929z469f6p3fbq7c40000gn/T/seth/spack-stage/spack-stage-dd4hep-1.33-z7jy2mn65v76gsa5dyg3dlpkevocmuow/spack-build-z7jy2mn/bin/listcomponents_dd4hep -o libDDCoreGraphics.components libDDCoreGraphics.dylib
Error in <UnknownClass::FindDynamicLibrary>: libRIO[.so | .dll | .dylib | .sl | .dl | .a] does not exist in /opt/spack/opt/spack/tahoe/edm4hep/0.99.4/4lpkeqx/lib:/opt/spack/opt/spack/tahoe/podio/1.6/sj3ympx/lib:/private/var/folders/n9/mqnx20b929z469f6p3fbq7c40000gn/T/seth/spack-stage/spack-stage-dd4hep-1.33-z7jy2mn65v76gsa5dyg3dlpkevocmuow/spack-build-z7jy2mn/lib:/private/var/folders/n9/mqnx20b929z469f6p3fbq7c40000gn/T/seth/spack-stage/spack-stage-dd4hep-1.33-z7jy2mn65v76gsa5dyg3dlpkevocmuow/spack-build-z7jy2mn/lib::/opt/spack/opt/spack/tahoe/edm4hep/0.99.4/4lpkeqx/lib:/opt/spack/opt/spack/tahoe/podio/1.6/sj3ympx/lib:/opt/spack/opt/spack/tahoe/podio/1.6/sj3ympx/lib::.:/usr/local/lib:/usr/X11R6/lib:/usr/lib:/lib:/lib/x86_64-linux-gnu:/usr/local/lib64:/usr/lib64:/lib64:
Error in <UnknownClass::FindDynamicLibrary>: libCling[.so | .dll | .dylib | .sl | .dl | .a] does not exist in /opt/spack/opt/spack/tahoe/edm4hep/0.99.4/4lpkeqx/lib:/opt/spack/opt/spack/tahoe/podio/1.6/sj3ympx/lib:/private/var/folders/n9/mqnx20b929z469f6p3fbq7c40000gn/T/seth/spack-stage/spack-stage-dd4hep-1.33-z7jy2mn65v76gsa5dyg3dlpkevocmuow/spack-build-z7jy2mn/lib:/private/var/folders/n9/mqnx20b929z469f6p3fbq7c40000gn/T/seth/spack-stage/spack-stage-dd4hep-1.33-z7jy2mn65v76gsa5dyg3dlpkevocmuow/spack-build-z7jy2mn/lib::/opt/spack/opt/spack/tahoe/edm4hep/0.99.4/4lpkeqx/lib:/opt/spack/opt/spack/tahoe/podio/1.6/sj3ympx/lib:/opt/spack/opt/spack/tahoe/podio/1.6/sj3ympx/lib::.:/usr/local/lib:/usr/X11R6/lib:/usr/lib:/lib:/lib/x86_64-linux-gnu:/usr/local/lib64:/usr/lib64:/lib64:
Fatal in <TROOT::InitInterpreter>: cannot load symbol dlsym(RTLD_DEFAULT, CreateInterpreter): symbol not found

This appears to be because the ROOT lib path needs to be explicitly defined in ROOT_LIBRARY_PATH, even for rpath builds. See spack/spack#16899, spack/spack#45109 .

Since Spack no longer builds anything older than ROOT 6.28, I've also eliminated the root_library_path property.

knoepfel
knoepfel previously approved these changes Dec 23, 2025
Copy link
Contributor

@knoepfel knoepfel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just ran into this error this morning. Thanks for the quick fix.

@spackbot-triage spackbot-triage bot requested a review from jmcarcell December 23, 2025 18:58
@jmcarcell
Copy link
Contributor

jmcarcell commented Dec 28, 2025

I don't understand well what's going on here. First of all, I have the following builds with ROOT 6.38 with +rpath and DD4hep (master, but nothing related to these issues has changed) that work fine without the changes in this PR, on Alma 9 and Ubuntu 24.04. For example, for Alma 9:

^dd4hep@de2efeb1c5a37e9eb32928cdb23f58f8a31a6f73=develop+ddalign+ddcad+ddcond+dddetectors+dddigi+ddeve+ddg4+ddrec~debug~doc+edm4hep~geant4units+hepmc3~hepmc3-gz+ipo+lcio~tbb+utilityapps+xercesc build_system=cmake build_type=Release commit=de2efeb1c5a37e9eb32928cdb23f58f8a31a6f73 cxxstd=20 generator=ninja arch=linux-almalinux9-x86_64 %c,cxx=gcc@14.2.0
^root@6.38.00~aqua~arrow~cuda~cudnn+cxxmodules~daos+davix~dcache~emacs+examples+fftw~fits~fortran+gdml+geom~geombuilder+gminimal~graphviz+gsl+http+ipo+math+minuit+mlp+opengl~pythia8+python~qt6+r+roofit+root7+rpath~shadow+spectrum+sqlite+ssl+tbb+tiff+tmva+tmva-cpu+tmva-cudnn~tmva-gpu~tmva-pymva~tmva-sofie+tpython+unuran+vc+vdt~veccore+webgui+x+xml+xrootd build_system=cmake build_type=Release cxxstd=20 generator=make patches:=22af347,97ffa00 arch=linux-almalinux9-x86_64 %c,cxx=gcc@14.2.0

Then, if you have enabled +rpath, this PR doesn't change anything (removing LD_LIBRARY_PATH for DD4hep at runtime doesn't change anything at build time) since the change you are proposing is to do what is done now through +rpath always. Or at least I don't see what is different that affects the build.
Other than that, always having the effects of +rpath is good, probably most people build with +rpath anyway.

@spackbot-triage spackbot-triage bot requested a review from jmcarcell December 29, 2025 17:17
@sethrj
Copy link
Contributor Author

sethrj commented Dec 29, 2025

I don't understand well what's going on here. First of all, I have the following builds with ROOT 6.38 with +rpath and DD4hep (master, but nothing related to these issues has changed) that work fine without the changes in this PR, on Alma 9 and Ubuntu 24.04.

Hi @jmcarcell, related to AIDASoft/DD4hep#1545 , this might be due to assumptions about X_LIBRARY_PATH being set across the systems. When you build and run on linux do you have those already set?

@sethrj
Copy link
Contributor Author

sethrj commented Dec 29, 2025

@knoepfel Could you reapprove? I've distilled the changeset to a minimal version. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants