Error in running Example B1

Hi Everyone!

I am running into this problem when executing the Example B1 that was successfully configured and generated, see attached screenshot. When I try to open the project by command ./exampleB1 it gives error message “error while loading shared libraries: libG4graphics_reps.so, cannot open shared object file …”, see attached screenshot. I tried different ways to go around, but with no success. If anyone can help me in this that would be greatly appreciated. Thank you in advance!

With best regards,
Michael

Have you added the script to your ~/.bashrc so environments are set every time you run a terminal?

https://geant4-userdoc.web.cern.ch/geant4-userdoc/UsersGuides/InstallationGuide/html/postinstall.html#required-environment-settings-on-unix

Otherwise, what is the output of ldd? i.e. run:
ldd exampleB1

Look for the libG4graphics_reps.so line, does it point to a valid path? I’ve not upgraded to 10.5 yet but I get the following for my install:

$ ldd exampleB1 | grep libG4graphics
libG4graphics_reps.so => /usr/local/share/geant4/10.4.0/install/debug/lib/libG4graphics_reps.so (0x00007f280a110000)

Thank you very much for your reply! I appreciate that. I am out of town now, I will try your instructions when I am back next week, and will let you know. Thanks again!

Hi my friend,

Finally, I came back and tried all your instructions. It helped, now I do not get that error message. However, after launching ./exampleB1 it starts doing something and it takes forever to finish calculations, it becomes idle with blinking cursor, I attached txt file with copy-pasted text from the console. I google searched for possible solutions, but with no success. Anything you can recommend?
text _ exampleB1.txt (8.1 KB)

Looks like you didn’t build/install with any UI components.

From the file you uploaded:

yahya@yahya-VirtualBox:~/Geant4/Examples/B1-build$ ./exampleB1
Available UI session types: [ GAG, tcsh, csh ]
.
.
.
Visualization Manager initialising...
Registering graphics systems...

You have successfully registered the following graphics systems.
Current available graphics systems are:
ASCIITree (ATree)
DAWNFILE (DAWNFILE)
G4HepRep (HepRepXML)
G4HepRepFile (HepRepFile)
RayTracer (RayTracer)
VRML1FILE (VRML1FILE)
VRML2FILE (VRML2FILE)
gMocrenFile (gMocrenFile)

Followed by multiple instances of:

ERROR: Current scene handler not defined.  Please select or create one.

I configured to use Qt and see:

Available UI session types: [ Qt, GAG, tcsh, csh ]
.
.
.
You have successfully registered the following graphics systems.
Current available graphics systems are:
ASCIITree (ATree)
DAWNFILE (DAWNFILE)
G4HepRep (HepRepXML)
G4HepRepFile (HepRepFile)
RayTracer (RayTracer)
VRML1FILE (VRML1FILE)
VRML2FILE (VRML2FILE)
gMocrenFile (gMocrenFile)
OpenGLImmediateQt (OGLIQt, OGLI)
OpenGLStoredQt (OGLSQt, OGL, OGLS)
OpenGLImmediateX (OGLIX, OGLIQt_FALLBACK)
OpenGLStoredX (OGLSX, OGLSQt_FALLBACK)
RayTracerX (RayTracerX)

This solved my problem, thank you so much!

This is what happened. I did install OPENGL and QT GUIs before, but for some reasons, they did not work. I decided to uninstall and re-install, then they worked fine. Your answer led me to a conclusion that the problem must be nothing but a problem with the installation. Thanks again, I appreciate your help!