BNLNPPS / esi-shell

Apache License 2.0
0 stars 0 forks source link

Reinstalling Geant4 with +opengl flag does not install opengl #118

Closed ggalgoczi closed 1 week ago

ggalgoczi commented 1 week ago

After running

spack uninstall geant4
spack clean -a
spack install --overwrite geant4 +opengl
spack spec geant4

yields

 -  geant4@11.1.2%gcc@11.4.0~ipo~motif~opengl~qt~tbb+threads~vecgeom~vtk~x11 build_system=cmake build_type=Release cxxstd=17 generator=make patches=2979cb7 arch=linux-ubuntu22.04-x86_64_v3

which means that OpenGL was still not installed. Do you have any idea why? Is it a spack bug?

plexoos commented 1 week ago

Hmm... I think spack spec ... command shows concrete spec of what you request in ...

ggalgoczi commented 1 week ago

You are right, I just realized I needed to run

spack spec -Il geant4 +opengl

or

spack find -v geant4

plexoos commented 1 week ago

Yes, I think spack find -v -p geant4 is better if you want to see the options used to build the installed package

plexoos commented 1 week ago

In the image we created yesterday, I see this:

$ esi-shell -t g4gl "spack find -v -p geant4"
==> Using esi-shell image: ghcr.io/bnlnpps/esi-shell:g4gl

...

-- linux-ubuntu22.04-x86_64_v3 / gcc@11.4.0 ---------------------
geant4@11.1.2~ipo~motif~opengl~qt~tbb+threads~vecgeom~vtk~x11 build_system=cmake build_type=Release cxxstd=17 generator=make patches=2979cb7  /opt/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/geant4-11.1.2-bejmxnskz4fmxpdsexgakgabbpxwzvio
geant4@11.1.2~ipo~motif+opengl~qt~tbb+threads~vecgeom~vtk~x11 build_system=cmake build_type=Release cxxstd=17 generator=make patches=2979cb7  /opt/spack/opt/spack/linux-ubuntu22.04-x86_64_v3/gcc-11.4.0/geant4-11.1.2-2djmee3unegvf47mzdzqxhkapq25lzbq

It is possible that in addition to opengl geant4 should be installed with qt and/or x11 features to enable those GUI capabilities

ggalgoczi commented 1 week ago

You were right again, both Qt and X11 were needed. Now the software starts but getting segmentation faults, I will investigate it further.

qt.qpa.xcb: could not connect to display localhost:10.0 qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found. This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

Available platform plugins are: linuxfb, minimal, offscreen, vnc, webgl, xcb.

Program received signal SIGABRT, Aborted. __pthread_kill_implementation (no_tid=0, signo=6, threadid=140388322656256) at ./nptl/pthread_kill.c:44 44 ./nptl/pthread_kill.c: No such file or directory.

Saved current version into g4qt

plexoos commented 1 week ago

See if this works for you:

esi-shell -t g4qt -- -e DISPLAY=$DISPLAY -v $HOME/.Xauthority:/esi/.Xauthority --net=host

then run the following inside the container:

source root/bin/thisroot.sh 
spack load /dxldit
./CaTS-install/bin/CaTS -g ./CaTS-install/bin/lArTarget.gdml 
ggalgoczi commented 1 week ago

Does work, many thanks! Here is the proof that I could open the GUI within the esi-shell docker image and simulated an electron entering a LAr TPC: https://drive.google.com/file/d/1xeOPuV7E5Bcgocn-xOzGBUKhasvJEvjP/view?usp=drive_link