Possibly related to this issue in the geant4-feedstock.
Setup
OS: macos Big Sur 11.6.6 conda: 4.12.0 Geant4: 11.0.1 qt: 5.12.9
Steps to reproduce
Create a conda environment, try to compile and run example B1,
conda create --name test-g4-tutorial geant4 compilers cmake make
conda activate test-g4-tutorial
mkdir test-g4-tutorial
cd test-g4-tutorial
cmake $CONDA_PREFIX/share/Geant4-11.0.1/examples/basic/B1
make -j4
./exampleB1 run2.mac
Expected output
No crashes, some GUI stuff
Actual output
Cutting stdout for brevity, it get stuck after last line
[.....]
# "Envelope" is transparent blue to represent water
/vis/geometry/set/colour Envelope 0 0 0 1 .3
/vis/scene/notifyHandlers
/vis/viewer/set/style surface
/vis/viewer/set/hiddenMarker true
/vis/viewer/set/viewpointThetaPhi 120 150
#
# Re-establish auto refreshing and verbosity:
/vis/viewer/set/autoRefresh true
/vis/viewer/refresh
/vis/verbose warnings
Visualization verbosity changed to warnings (3)
#
# For file-based drivers, use this to create an empty detector view:
#/vis/viewer/flush
Changing export format to "jpg"
I’m not familiar with conda, but what’s strange about the above is that run2.mac does not use visualisation, so it looks like you are not picking it up. It looks like you are running exampleB1 without arguments, in which case it executes vis/mac. But why it should get stuck is probably due to some other issue.
I’m afraid Geant4 is not Qt6-ready. (Hopefully the next release.) I’m running fine with Qt 5.15.2 on Mac 10.15.7. Also I believe my colleagues are running with Qt5 on MacOS 11 (can anyone verify that?). But if you are on MacOS 11 and conda requires Qt6, you will not be able to run with Qt.
However, as you probably know, you can run without Qt and get plain non-interactive windows with GEANT4_USE_OPENGL_X11 (you need XQuartz on Mac). To zoom, rotate, etc., you can use G4 built-in commands such as /vis/viewer/zoom - use ls or help to see commands and their guidance. You can get a window with some limited interactivity by installing motif (e.g., OpenMotif) and setting GEANT4_USE_XM.