How to compile Geant4 on Ubuntu in WSL (2023)

Sdílet
Vložit
  • čas přidán 10. 09. 2024

Komentáře • 22

  • @dipenpaul6662
    @dipenpaul6662 Před 8 dny +1

    Thank you for making the valuable video with so much detail.

  • @Infinity-ob7xg
    @Infinity-ob7xg Před 5 měsíci +1

    Very good and detailed explaination of all steps, thanks

  • @danielalejandrodominguezal6175

    Hi! When I finish the installation and I compile and run one of the basic examples, I have an issue with the graphic interface, in the it suppose to be the graphic of the detector I only see my wallpaper. Someone have any idea what could I do? Thanks

    • @physino
      @physino  Před měsícem

      What is the graphic interface used by that example? Can you try some other examples? It is hard for people to help you with limited information. If you do not have to use WSL, please also try to the pre-compiled Geant4 binary release for Windows. It is easier and uses the native Windows graphic system.

    • @danielalejandrodominguezal6175
      @danielalejandrodominguezal6175 Před měsícem

      @@physino I tried example B1 and B3 and I had the same problem. I only have Ubuntu in my laptop. When I say graphic interface I mean where it suppose where the detector schematic is supposed to be seen. Thanks for answer

    • @physino
      @physino  Před měsícem

      @@danielalejandrodominguezal6175 I see. It has nothing to do with Windows. What kind of graphic card do you have in your laptop? Are you sure that Ubuntu got all the driver right for that card? Can you run manpages.ubuntu.com/manpages/mantic/man1/glxgears.1.html on your desktop?

  • @desertrose5551
    @desertrose5551 Před 4 měsíci

    hi, first of all i really want to thank you for this helpful guide.
    Until 13:55 i could follow along perfectly, but after installing i got the error 'CMake Error at cmake_install.cmake:54 (file): file INSTALL cannot copy file
    No space left on device',but i have actually plenty of space left,
    do you know where this problem stems from and maybe how to fix it? I'd be super thankful for your help and apologize as i'm just starting with linux/ubuntu & geant4.
    thanks :)

    • @physino
      @physino  Před 4 měsíci +1

      learn.microsoft.com/en-us/windows/wsl/disk-space

  • @mokshakumar4949
    @mokshakumar4949 Před 3 měsíci +1

    Everything goes good till i get an error at 17:53 instead of "To install gears, move..." as /usr/bin/ld: /tmp/ccv2N3he.o: undefined reference to symbol 'qt_version_tag@@Qt_5.15'
    /usr/bin/ld: /lib/x86_64-linux-gnu/libQt5Core.so.5: error adding symbols: DSO missing from command line
    collect2: error: ld returned 1 exit status
    make: *** [: gears] Error 1. Any idea how to fix it?

    • @physino
      @physino  Před 3 měsíci +2

      GEARS is shipped with two compilation systems, one is the pure Makefile, the other one is CMake. If pure Makefile doesn't work for you for some reason, you may want to try the CMake system. It goes like this: go to gears folder, type: `cmake -B build`, and then `make -C build`. If everything is fine, you should be able to find the compiled gears executable in gears/build folder.

    • @mokshakumar4949
      @mokshakumar4949 Před 3 měsíci

      @@physino Thanks a lot for reply. I'll try it.

  • @sidddddddddddddd
    @sidddddddddddddd Před měsícem

    I am getting the following when I run gears:
    ### G4PhysListFactory WARNING: environment variable PHYSLIST is not defined
    Default Physics Lists FTFP_BERT is instantiated
    G4PhysListFactory::GetReferencePhysList EMoption= 0

    • @physino
      @physino  Před měsícem

      czcams.com/video/zBRLls4eC34/video.html

  • @vulpecula182
    @vulpecula182 Před 9 měsíci

    make:*** [MakeFile:156: all] Error 2

  • @EmilyEmyy
    @EmilyEmyy Před měsícem

    Hi! Thank you for the video. IN the geant4 compilation, around 11:00, I got, at about 70%, the following errors:
    make[2]: *** [CMakeFiles/G4NDL.dir/build.make:99: Externals/G4NDL-4.7/src/G4NDL-stamp/G4NDL-download] Erro 1
    make[1]: *** [CMakeFiles/Makefile2:948: CMakeFiles/G4NDL.dir/all] Erro 2
    make: *** [Makefile:156: all] Erro 2
    can you help?

    • @physino
      @physino  Před měsícem +1

      This is not even compilation of Geant4. It is just the downloading of a Geant4 dataset, G4NDL. I cannot tell what went wrong from the error message you posted here. In ccmake, you can choose NOT to download Geant4 datasets automatically. After you compile and install Geant4 libraries, you can run `geant4-config --install-datasets` to download datasets later. This may fix your problem, or at least gets you going with the compilation.

    • @physino
      @physino  Před měsícem

      @@EmilyEmyy `sudo apt install curl`

  • @haydennelson3271
    @haydennelson3271 Před 7 měsíci

    Hey teacher, hope you're doing well since Taiwan. After using Geant4 in my native windows, I've decided to go back and compile it using Ubuntu to make use of the better documentation available to that distribution. I used you video to guide my installation, and ran into this error when running the "make" command in my gears directory:
    /usr/bin/ld: /tmp/ccjR5yDg.o: undefined reference to symbol 'qt_version_tag@@Qt_5.15'
    /usr/bin/ld: /lib/x86_64-linux-gnu/libQt5Core.so.5: error adding symbols: DSO missing from command line
    collect2: error: ld returned 1 exit status
    make: *** [: gears] Error 1
    Do you have any advice for this?

    • @physino
      @physino  Před 7 měsíci

      Personally, I found that the windows version of Geant4 is much quicker to set up and easier to use. It provides a nice GUI without Qt. If you go for the Linux version, you will have to compile it by yourself, and you will have to deal with Qt if you need a nice GUI. I don't need a GUI in my daily use of Geant4. I'd suggest a new user to skip Qt first to avoid unnecessary complications. You error is related to Qt. The Qt library cannot find some information it needs. How did you install Qt5 in your system? Do you also have Qt6 in your system? This thing is complicated. If you want to get started quickly with your simulation work, skipping Qt is the way to go. When you become more experienced, you can then try to enable Qt (assume that you still need Qt at that time).

    • @physino
      @physino  Před 7 měsíci

      Gears is equipped with two compilation methods: one is based on cmake, the other is based on make. I assume you tried the second method. Please try the first one as well. It may solve your problem if you decide to stick with Qt: cd /path/to/gears, mkdir build, cd build, cmake .. , press c a few times to configure and press g to generate, make

  • @vulpecula182
    @vulpecula182 Před 9 měsíci

    When it comes to installing precompiled géant4 libraries it keeps writing:
    TLSv1.2(IN),TLS header, supplemental data (23) many times till :
    TLSv1.3 (OUT),TLS alert close notify (256)
    make[2]:*** [CMakeFiles/G4NDL.dir/build.make:98: Externals/G4NDL-4.7/src/G4NDL-stamp/G4NDL-download] Error1

    • @physino
      @physino  Před 9 měsíci

      The video is about *compile* Geant4 source code, not *install precompiled* Geant4 libraries. The binary release (precompiled Geant4 libraries) is for CentOS8, not for Ubuntu. We will have to *compile* Geant4 on Ubuntu by ourselves.