svalinn / DAGMC

Direct Accelerated Geometry Monte Carlo Toolkit
https://svalinn.github.io/DAGMC
Other
104 stars 65 forks source link

DAGMC not compatible with Geant4 10.6 #696

Closed ljacobson64 closed 9 months ago

ljacobson64 commented 4 years ago

There appear to have been some changes in Geant4 10.6 that break our ability to build Dag-Geant4 applications. Stuff like this appears during build:

/home/lucas/build/native/DAGMC-moab-5.1.0/src/src/geant4/app/exampleN01.cc: In function ‘int main(int, char**)’:
/home/lucas/build/native/DAGMC-moab-5.1.0/src/src/geant4/app/exampleN01.cc:84:5: error: ‘G4UIExecutive’ was not declared in this scope
   84 |     G4UIExecutive* ui = new G4UIExecutive(argc, argv, "tcsh");
      |     ^~~~~~~~~~~~~
/home/lucas/build/native/DAGMC-moab-5.1.0/src/src/geant4/app/exampleN01.cc:84:20: error: ‘ui’ was not declared in this scope
   84 |     G4UIExecutive* ui = new G4UIExecutive(argc, argv, "tcsh");
      |                    ^~
/home/lucas/build/native/DAGMC-moab-5.1.0/src/src/geant4/app/exampleN01.cc:84:29: error: expected type-specifier before ‘G4UIExecutive’
   84 |     G4UIExecutive* ui = new G4UIExecutive(argc, argv, "tcsh");
      |                             ^~~~~~~~~~~~~
/home/lucas/build/native/DAGMC-moab-5.1.0/src/src/geant4/app/exampleN01.cc:87:12: error: type ‘<type error>’ argument given to ‘delete’, expected pointer
   87 |     delete ui;
      |            ^~
/home/lucas/build/native/DAGMC-moab-5.1.0/src/src/geant4/app/exampleN01.cc:89:5: error: ‘G4VisManager’ was not declared in this scope; did you mean ‘G4VPCManager’?
   89 |     G4VisManager* visManager = new G4VisExecutive;
      |     ^~~~~~~~~~~~
      |     G4VPCManager
/home/lucas/build/native/DAGMC-moab-5.1.0/src/src/geant4/app/exampleN01.cc:89:19: error: ‘visManager’ was not declared in this scope; did you mean ‘scManager’?
   89 |     G4VisManager* visManager = new G4VisExecutive;
      |                   ^~~~~~~~~~
      |                   scManager
/home/lucas/build/native/DAGMC-moab-5.1.0/src/src/geant4/app/exampleN01.cc:89:36: error: ‘G4VisExecutive’ does not name a type
   89 |     G4VisManager* visManager = new G4VisExecutive;
      |                                    ^~~~~~~~~~~~~~
/home/lucas/build/native/DAGMC-moab-5.1.0/src/src/geant4/app/exampleN01.cc:92:5: error: ‘G4UIExecutive’ was not declared in this scope
   92 |     G4UIExecutive* UI = new G4UIExecutive(argc, argv);
      |     ^~~~~~~~~~~~~
/home/lucas/build/native/DAGMC-moab-5.1.0/src/src/geant4/app/exampleN01.cc:92:20: error: ‘UI’ was not declared in this scope
   92 |     G4UIExecutive* UI = new G4UIExecutive(argc, argv);
      |                    ^~
/home/lucas/build/native/DAGMC-moab-5.1.0/src/src/geant4/app/exampleN01.cc:92:29: error: expected type-specifier before ‘G4UIExecutive’
   92 |     G4UIExecutive* UI = new G4UIExecutive(argc, argv);
      |                             ^~~~~~~~~~~~~
/home/lucas/build/native/DAGMC-moab-5.1.0/src/src/geant4/app/exampleN01.cc:96:12: error: type ‘<type error>’ argument given to ‘delete’, expected pointer
   96 |     delete visManager;
      |            ^~~~~~~~~~
/home/lucas/build/native/DAGMC-moab-5.1.0/src/src/geant4/app/exampleN01.cc:97:12: error: type ‘<type error>’ argument given to ‘delete’, expected pointer
   97 |     delete UI;
      |            ^~
gonuke commented 3 years ago

We are building against GEANT4 still, aren't we? (we're certainly burning a lot of CI cycles building it!) Is this still a problem @ljacobson64 @bam241 @makeclean ?

ljacobson64 commented 3 years ago

Everything still works with Geant4 10.5 (which is what we use on the CI) and lower. Something in Geant4 changed with the 10.6 release that broke our ability to compile against it.

helen-brooks commented 2 years ago

I've just started a project commissioned by @makeclean with a student who needs to use Geant4 10.6+ because a downstream dependency requires a more recent version. So far I've identified the following from the Geant4 10.6 release notes which are of relevance:

I'll tidy this up and make a PR.... (I also haven't checked the tests yet)