Geant4 On Dyld Library Not Loaded Rpath Libg4tree.dylib

Dyld: Library not loaded: @rpath /libGui.so The reason is that MacOS now comes by default with certain security settings which, among other things, unset the DYLIBLIBRARYPATH. If your executable look for libraries in non-standard locations they won’t run. 2003-12-11 17:34 rdm. Makefile, utils/Module.mk, utils/src/rlibmap.cxx: add rlibmap a utility used to build a map between classes and libraries. The rlibmap utility will create a system.rootlibmap file used to load the library for an unknown class. To be enabled in the very near future. Geant4 On Mac Dyld Library Not Loaded Rpath Libg4tree.dylib.

  1. Dyld Library Not Loaded @rpath/libg4tree.dylib
  2. Dyld Library Not Loaded @rpath/libcore.so
Not

Package foo is also loaded but not attached to the search path. A call to g produces g(6) 1 1 13 This is consistent with the definitions of c in the two settings: in bar the function c is defined to be equivalent to sum, but in foo the variable c refers to the standard function c in base. Update of /cvsroot/fink/dists/10.4/unstable/main/finkinfo/x11 In directory vz-cvs-3.sog:/tmp/cvs-serv28601 Modified Files: mlterm.info Log Message: Revision bump.

Hi,

I am attempting to build a software framework that uses ROOT and Geant4 on OS X, which is already working
fine on Linux. I think I am almost there but I am running into some confusing issues involving rpath and linking/loading.

Everything seems to compile and link fine, but then when I run my sim executable I get this error message…

@rpath/libg4tree.dylib

I suspect that the ROOT libs can’t be found at runtime, so I turn on DYLD_PRINT_LIBRARIES to debug.

But the loader seems to be finding the library just fine!

Investigating further by using otool -l sim-app | grep LC_RPATH -A2 it seems that the directories of the other libraries have rpath entries in the executable but the ROOT dir is not in there.

The ROOT lib dir is set in DYLD_LIBRARY_PATH but it doesn’t seem to be picked up from there.

Dyld library not loaded @rpath/libcore.so

From what I can tell, Geant4 is setting the rpath explicitly in the binary, which allows its libraries to be found, but this is not what ROOT is doing.

This is probably not a ROOT problem or bug, but I’m wondering if anyone can help me figure out what is going on here…why would it be that the loader finds the ROOT libraries initially but then there is a runtime error indicating the libraries were not found?

If needed I can paste in the full (ugly!) compilation and linking commands should they be useful.

Thanks.

–Jeremy

I’ve still fairly new to Geant4 overall, only a few months of experience with version 10.5. I have been and am working on Geant4 with a Ubuntu system. When I was first trying to compile I had a few issues with getting visualization to work, but after many attempts I had Geant4 10.5 with OGL and Dawnfile. Before 10.6 came out I wrote myself notes on compilation, hoping the notes would help me compile correctly.
The settings I had on for cmake were:
“-DGeant4_INSTALL_DATA=ON”
“-DGeant4_USE_OPENGL_X11=ON”
“-DGeant4_USE_QT=ON”
I also was trying “-DGeant4_BUILD_MULTITHREADED=ON” but stopped since I wasn’t confident it was needed.
Before attempting to compile 10.6 I compressed my old Geant4 (10.5.01) and deleted the none compressed files. So I could go back to a working version of Geant4 but I need the new G4ParticleXS.2.1 file for certain low/medium energy proton simulations.

Dyld Library Not Loaded @rpath/libg4tree.dylib

After 10.6 released I have NOT been able to compile and run examples without issues.
I’m having issues with libG4OpenGL.so but no other visualization issues.

When running example B1, or any example using OGL, the example crashes and prints:

“./exampleB1 symbol lookup error: /home/jason/Geant4/geant4-install/lib/libG4OpenGL.so: undefined symbol: _ZTI6G4UIQt”

Dyld Library Not Loaded @rpath/libcore.so

Loaded

It was referencing '/usr/lib/x86_64-linux-gnu/libOpenGL.so ' before I tried to mess with that file and it started referencing the file in my install directory. I tried to put the files back to the way they were in /usr/ but it hasn’t been referenced since I messed with them.

When swapping the libG4OpenGL.so file, from the one created by cake to file from the pre-compiled library provided by CERN on the Geant4 site, the program prints:
“./exampleB1: symbol lookup error: ./exampleB1: undefined symbol: _ZN19G4OpenGLImmediateQtC1Ev”
I haven’t been able to find anything to do with those symbols online, and I’ve only found very little on symbol lookup error/undefined symbol.

I’m fairly sure I downloaded and installed OGL correctly, because I used a basic example outside of Geant4 that worked. Also I checked “glxinfo | grep direct” and it output “Yes”.
But when I run an modified version of TestEm7 that uses Dawnfile visualization, it runs perfectly fine but it does not list OGL as an available graphics system. I’m not sure exactly why my TestEm7 works, because when I attempt to change the visualization of other example to be Dawnfile from OGL it still crashes.

I think there is some issue with the linking of my library in Geant4.
I’ve tried deleting and recompiling Geant4 many times now and with different settings nothing I’ve tried has worked so far.
There could be some traces of my old Geant4-10.5.01 causing problems but I tried to delete the files I could.

Any help would be greatly appreciated, I’ve been struggling with this since 10.6 released!
-Sincerely Jason

Comments are closed.