Message: Re: How to use GNUmake build system when Geant4 was installed with CMake ? Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Idea Re: How to use GNUmake build system when Geant4 was installed with CMake ? 

Forum: Installation and Configuration
Re: Question How to use GNUmake build system when Geant4 was installed with CMake ? (Rassoul Jamshidzehi)
Re: None Re: How to use GNUmake build system when Geant4 was installed with CMake ? (Michael H. Kelsey)
Re: None Re: How to use GNUmake build system when Geant4 was installed with CMake ? (Rassoul Jamshidzehi)
Date: 17 Jul, 2014
From: Michael H. Kelsey <Michael H. Kelsey>

Ah, ha! You are using an old version of HandsOn3 (we updated all of them for consistency with the 10.0 release before this year's round of tutorials).

Please see the Release Notes (http://geant4.cern.ch/support/ReleaseNotes4.10.0.html) for the Geant4 10.0 release for details on what needs to be migrated in the code, and see more below.

You may also choose to acquire an updated version of HandsOn3 from a recent tutorial (http://geant4.cern.ch/pastevents.shtml, e.g., http://geant4.slac.stanford.edu/SLACTutorial14/Agenda.html). This will allow you to avoid doing the migration yourself.

On Thu, 17 Jul 2014 17:11:21 GMT, Rassoul Jamshidzehi wrote:

> I'm using geant4.10.00.p02 on Linux Ubuntu 14.04 64bit, terminal .
> I'm Writing "source /home/jamshidzehi/geant4.10.00.p02-install/share/Geant4-10.0.2/geant4make/geant4make.sh" and when i enter gmake the result is :
> No command 'gmake' found, did you mean:
[...]

That means that your Ubuntu installation doesn't use the name 'gmake' for the GNU Make executable; you should use |make|, as you did below. We should modify the instructions to reference the name 'make', with a comment that it is called 'gmake' on some systems.

[...]

> src/BeamTestDetectorConstruction.cc: In member function &#65533;void BeamTestDetectorConstruction::DefineMaterials()&#65533;:
> src/BeamTestDetectorConstruction.cc:82:49: error: &#65533;g&#65533; was not declared in this scope
>    new G4Material("Beryllium", z=4., a=9.012182*g/mole, density=1.8480*g/cm3);
>                                                  ^
> src/BeamTestDetectorConstruction.cc:82:49: note: suggested alternative:
> In file included from /home/jamshidzehi/geant4.10.00.p02-install/include/Geant4/CLHEP/Units/PhysicalConstants.h:42:0,
[...]

This, and all of your other errors, are one of the required migrations for Geant4 10.0. Specifically, the files G4SystemOfUnits.hh and G4PhysicalConstants.hh are no longer included automatically by globals.hh (we found that with some recent platforms, having all those constants initialized in multiple compilation units caused problems, and it also led to excessive dependencies).

In any .cc or .hh file where you make use of units (g/mole, cm3, kHz, etc.) you should add the line

  #include "G4SystemOfUnits.hh"

In any .cc or .hh file where you make use of generic constants (pi, hbar, c_light, etc.) you should add the line

  #include "G4PhysicalConstants.hh"

This should be the only change you need to make to get HandsOn3 to build. However, the resulting executable will only function as a single-threaded "sequential" job. To take advantage of the new multithreaded functionality in Geant4 10.0, you will need to make other changes to your application code, as described in the Release Notes.

  -- Michael Kelsey

Inline Depth:
 1 1
 All All
Outline Depth:
 1 1
 2 2
 All All
Add message: (add)

1 Ok: Re: How to use GNUmake build system when Geant4 was installed with CMake ?   (Rassoul Jamshidzehi - 17 Jul, 2014)
 Add Message Add Message
to: "Re: How to use GNUmake build system when Geant4 was installed with CMake ?"

 Subscribe Subscribe

This site runs SLAC HyperNews version 1.11-slac-98, derived from the original HyperNews


[ Geant 4 Home | Geant 4 HyperNews | Search | Request New Forum | Feedback ]