Missing libraries at run time with G4-v11.1.1

Hi! I’m trying to use my G4-based application on Mac Ventura 13.1. I have successfully installed G4-v11.1.1, with the -DGEANT4_USE_OPENGL_X11=ON flag and I have compiled my own application. When I try to run it, I get the following error:
dyld[1072]: Library not loaded: @rpath/libG4gl2ps.dylib. In fact, that library is not in the lib folder of my Geant4 installation. However, that library is present in my previous G4-v11.0.2 installation. What has changed? If I compile and install Geant4 without the OpenGL flag, everything works fine.
Can you help me?

The libG4gl2ps.dylib became part of libG4OpenGL.dylib in 11.1, so it’s expected that it’s not present in an install of 11.1.1.

How did you configure/build your application, and do you have any DYLD_... environment variables set? It feels like the build is either picking up the wrong install, or something is getting overridden in the library search and runtime. Could you also post the output of:

$ otool -l <yourapplication>
$ otool -L <yourapplication>


After recompiling both Geant4 and my application from scratch, the error disappeared. I’m not sure why, but this is solved for the moment!


This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.