Installation Error

While trying to install on WSL ubuntu I get the following error message after running make. Any advice on how to fix it?

[ 85%] Building CXX object src/modules/DepositionGeant4/CMakeFiles/AllpixModuleDepositionGeant4.dir/SDAndFieldConstruction.cpp.o
In file included from /opt/allpix-squared/src/modules/DepositionGeant4/DepositionGeant4Module.cpp:48:
/opt/allpix-squared/src/modules/DepositionGeant4/AdditionalPhysicsLists.hpp:17:10: fatal error: MicroElecSiPhysics.hh: No such file or directory
17 | #include “MicroElecSiPhysics.hh”
| ^~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [src/modules/DepositionGeant4/CMakeFiles/AllpixModuleDepositionGeant4.dir/build.make:77: src/modules/DepositionGeant4/CMakeFiles/AllpixModuleDepositionGeant4.dir/DepositionGeant4Module.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs…
[ 85%] Linking CXX shared library libAllpixModuleGeometryBuilderGeant4.so
Warning: Unused direct dependencies:
/lib/x86_64-linux-gnu/libboost_random.so.1.71.0
/opt/geant4-build/BuildProducts/lib/libG4Tree.so
/opt/geant4-build/BuildProducts/lib/libG4FR.so
/opt/geant4-build/BuildProducts/lib/libG4GMocren.so
/opt/geant4-build/BuildProducts/lib/libG4visHepRep.so
/opt/geant4-build/BuildProducts/lib/libG4RayTracer.so
/opt/geant4-build/BuildProducts/lib/libG4VRML.so
/opt/geant4-build/BuildProducts/lib/libG4ToolsSG.so
/opt/geant4-build/BuildProducts/lib/libG4vis_management.so
/opt/geant4-build/BuildProducts/lib/libG4modeling.so
/opt/geant4-build/BuildProducts/lib/libG4interfaces.so
/opt/geant4-build/BuildProducts/lib/libG4mctruth.so
/opt/geant4-build/BuildProducts/lib/libG4geomtext.so
/opt/geant4-build/BuildProducts/lib/libG4error_propagation.so
/opt/geant4-build/BuildProducts/lib/libG4readout.so
/opt/geant4-build/BuildProducts/lib/libG4physicslists.so
/opt/geant4-build/BuildProducts/lib/libG4event.so
/opt/geant4-build/BuildProducts/lib/libG4tracking.so
/opt/geant4-build/BuildProducts/lib/libG4parmodels.so
/opt/geant4-build/BuildProducts/lib/libG4processes.so
/opt/geant4-build/BuildProducts/lib/libG4digits_hits.so
/opt/geant4-build/BuildProducts/lib/libG4track.so
/opt/geant4-build/BuildProducts/lib/libG4particles.so
/opt/allpix-squared/build/src/objects/libAllpixObjects.so
/lib/x86_64-linux-gnu/libboost_system.so.1.71.0
/opt/root_build/lib/libGeom.so
/opt/root_build/lib/libHist.so
/opt/root_build/lib/libMatrix.so
/opt/root_build/lib/libMathCore.so
/opt/root_build/lib/libImt.so
/opt/root_build/lib/libMultiProc.so
/opt/root_build/lib/libNet.so
/opt/root_build/lib/libRIO.so
/opt/root_build/lib/libThread.so
/lib/x86_64-linux-gnu/libXm.so.4
/lib/x86_64-linux-gnu/libQt5Widgets.so.5
/lib/x86_64-linux-gnu/libQt5Gui.so.5
/lib/x86_64-linux-gnu/libQt5Core.so.5
/lib/x86_64-linux-gnu/libXmu.so.6
/lib/x86_64-linux-gnu/libXext.so.6
/lib/x86_64-linux-gnu/libXt.so.6
/lib/x86_64-linux-gnu/libICE.so.6
/lib/x86_64-linux-gnu/libSM.so.6
/lib/x86_64-linux-gnu/libX11.so.6
/opt/geant4-build/BuildProducts/lib/libG4analysis.so
/lib/x86_64-linux-gnu/libexpat.so.1
/opt/geant4-build/BuildProducts/lib/libG4zlib.so
/opt/geant4-build/BuildProducts/lib/libG4ptl.so.2
[ 85%] Built target AllpixModuleGeometryBuilderGeant4
make[1]: *** [CMakeFiles/Makefile2:1385: src/modules/DepositionGeant4/CMakeFiles/AllpixModuleDepositionGeant4.dir/all] Error 2
make: *** [Makefile:163: all] Error 2

Hi @Sam_username ,

What Geant4 version do you have installed, and which Allpix Squared version are you building?
I am currently battling a bit with the installations myself, and trying to gather info on what goes wrong and where. I have also seen this (or a similar) error.
I know for a fact that Allpix Squared v3.0.3 and Geant4 11.2.1 work together, in case you need a running combination immediately.

Kind regards,
Håkan

geant4-v11.2.1 and then allpix squared is v3.0.3. I just installed all the prerequisites a few days ago so I must have done something else wrong (or maybe it has to do with WSL or something?)

After including the absolute path, I get past that error but then I get:

/usr/bin/ld: CMakeFiles/AllpixModuleDepositionGeant4.dir/DepositionGeant4Module.cpp.o: in function allpix::physicslists::getList(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)': /opt/allpix-squared/src/modules/DepositionGeant4/AdditionalPhysicsLists.hpp:35: undefined reference to MicroElecSiPhysics::MicroElecSiPhysics()’
/usr/bin/ld: /opt/allpix-squared/src/modules/DepositionGeant4/AdditionalPhysicsLists.hpp:35: undefined reference to `typeinfo for MicroElecSiPhysics’
collect2: error: ld returned 1 exit status
make[2]: *** [src/modules/DepositionGeant4/CMakeFiles/AllpixModuleDepositionGeant4.dir/build.make:312: src/modules/DepositionGeant4/libAllpixModuleDepositionGeant4.so] Error 1
make[1]: *** [CMakeFiles/Makefile2:1385: src/modules/DepositionGeant4/CMakeFiles/AllpixModuleDepositionGeant4.dir/all] Error 2
make: *** [Makefile:163: all] Error 2

Any advice? Thanks!

Hi,

Cool! So much for a suggestion of a running combination… I’ll try to investigate a bit further.
You could give the Docker path a go, to get a simulation running. Another variant could be to install CVMFS and load it that way.
I’ll try to find a Windows computer and give installation on WSL a go!

Kind regards,
Håkan

Hi @Sam_username @hwennlof

Somehow I knew this will create problems in some systems :sweat_smile:

Since I’ve never used WSL, @Sam_username could you give some insight into what the paths are and what environment variables we have available?

Best
Simon

Hi @simonspa,

I just updated to latest master and it fails with exactly the same error. I run have Ubuntu 22.04 (installed, non-wsl). I clean installed geant4 (v11.2.1) and root on /opt. This setup worked fine for the past few years.

Hi, sorry for the delay. I’d be happy to provide whatever is helpful if you let me know what would be best.

I have made progress in installing. I went back to version v2.4.1 of allpix^2 and geant4-v11.0.4 and I have gotten everything to install on WSL ubuntu 22.04.3. However, when I try to run the example I still get an error

|21:36:23.456| (STATUS) Welcome to Allpix^2 v2.4.1-tar
|21:36:23.456| (STATUS) Initialized PRNG with system entropy seed 6180437170822225013
|21:36:23.962| (WARNING) Main ROOT file “/home/username/output/modules.root” exists and will be overwritten.
|21:36:23.966| (STATUS) Loading module GeometryBuilderGeant4
|21:36:23.966| (INFO) [C:GeometryBuilderGeant4] Detected Geant4 multithreading capabilities, enabling multithreading support
|21:36:23.981| (STATUS) Loaded 9 modules
|21:36:23.982| (STATUS) Initializing 13 module instantiations
|21:36:23.985| (FATAL) [I:GeometryBuilderGeant4] Error during execution of run:
Geant4 environment variable G4LEVELGAMMADATA is not set, make sure to source a Geant4 environment with all datasets
Please check your configuration and modules. Cannot continue.

Running “ls $G4LEVELGAMMADATA” shows the necessary files so I am not sure what I’ve done wrong but I’d appreciate any advice. Thanks!

Hi @Sam_username

this is a known issue with G4 breaking their build system without backwards compatibility. We have fixed the detection of G4 data sets for G4 11.0 in v3.0 and later, but have not backported it to the v2.x series.

As for the MicroElec issue I have taken note and I am investigating how to solve this - thanks for your reports @rkotitsa and @Sam_username . I’ll update you here!

Best,
Simon

Hej there @Sam_username @rkotitsa

I have news, could you please check if this compiles fine for you?

Best,
Simon

1 Like

That seems to have fixed it completely. I’m currently running the example.conf but it seems to be running great.

Thanks!

1 Like