The install of geant4 requires specific versions of CLHEP, they do not even attempt to make CLHEP backwards compatible and geant4 install doc clearly states which CLHEP goes with which geant4. Right now geant4.9.2_p02 is pulling in the wrong CLHEP (2.0.4.6). In addition to this problem I am also having trouble using the install of geant4 because of install time decisions like leaving out the $G4INSTALL/Configure file. I don't know if it is possible or not to have the ebuild copy or otherwise run the Configure script (maybe similar to accepting licenses?) to enable full options during install. Additionally software built to depend on geant4 look at this script to determine where files are located. The GEANT4.9.2 install doc: Geant4 requires the installation of CLHEP, release 2.0.4.2. The installation of CLHEP-2.0.4.2 is mandatory for consistency in the definition of masses and widths of particles. Earlier versions of CLHEP may link, but they will not give correct results. Reproducible: Always Steps to Reproduce: 1. emerge -p geant Actual Results: These are the packages that would be merged, in order: Calculating dependencies... done! [ebuild N ] sci-physics/clhep-2.0.4.6 USE="-exceptions" [ebuild N ] sci-physics/geant-4.9.2_p02 USE="data motif opengl qt4 raytracerx vrml zlib -aida -athena -dawn -debug -examples -gdml -geant3 -global -minimal -openinventor -static" Expected Results: emerge GEANT4 with correct CLHEP dependency. A file at $G4INSTALL/Configure that has where the geant libraries and headers were installed along with the answere to all the other install time decisions there were presumably made that other programs probably need to know.
As for the Configure related part, > Expected Results: > [...] A file at $G4INSTALL/Configure > that has where the geant libraries and headers were installed along with the > answere to all the other install time decisions there were presumably made that > other programs probably need to know. Could you give an example how depend on the Configure script for your own builds? I thought we already install all the Makefile's and configuration files needed to build packages "the geant way" in $(libdir)/geant/config. Also, a lot of build-time options are saved in environment variables ($G4...).
Small correction, > $(libdir)/geant/config in of course in /usr/share/geant4/config.
(In reply to comment #0) > The GEANT4.9.2 install doc: > Geant4 requires the installation of CLHEP, release 2.0.4.2. > The installation of CLHEP-2.0.4.2 is mandatory for consistency in the > definition of masses and widths of particles. Earlier versions of CLHEP may > link, but they will not give correct results. Hi, About the CLHEP versions. The doc mentions that earlier versions than CLHEP 2.0.4.2 are not consistent, but your is pulling CLHEP 2.0.4.6 (and there is no earlier version in the current portage tree). Could you precise how it is wrong, and if it is, provide an example which we could reproduce? Thanks for your help About missing Configure script. As Benjamin mentioned, please give us an example. In the ebuild, we are trying to automate/simulate this interactive (and awful) Configure script so we may miss something but never had any complaints.
I can't give you an example where "incompatible" CLHEP versions give GEANT4 wrong results but when I read the documentation I am not really questioning that they know best. For example: Be careful to use only the recommended version of CLHEP. If you use any other version, your code may still run, but you may get incorrect results. --or-- From the "Source" section near the bottom of the page, select "clhep-2.0.4.5.tgz" http://geant4.slac.stanford.edu/tutorial/installation/Geant4.9.3.p01/Linux/Geant4_9_3_p01_Linux_Installation.htm Notice they say ANY other version. If you question why they say this then I would recommend asking them, I think the devs know best. As for the libraries I realize that they are put somewhere, somewhere reasonable even, but there are a lot of questions in the Configure file that dependencies wont know from env-vars. Did you build with X11 Ray Tracing? etc. Here is an example in the code I was trying to compile (the code is private so I grep`d the important parts): grep -r $G4INSTALL/Configure * offline/make/.svn/text-base/Makefile.common.svn-base:LDFLAGS := $(LDFLAGS) `$(G4INSTALL)/Configure -ldflags | grep -e ^-L` `$(G4INSTALL)/Configure -ldlibs | grep -e ^-l` `$(CLHEP_BASE_DIR)/bin/clhep-config --ldflags` `$(CLHEP_BASE_DIR)/bin/clhep-config --libs` offline/make/.svn/text-base/Makefile.common.svn-base:CCFLAGS := $(CCFLAGS) `$(G4INSTALL)/Configure -incflags | grep -e ^-I` `$(CLHEP_BASE_DIR)/bin/clhep-config --include` offline/make/.svn/text-base/Makefile.common.svn-base:G4VERSION := $(shell $(G4INSTALL)/Configure -ldflags) offline/make/.svn/text-base/Makefile.common.svn-base: $(if $(G4VERSION),,$(error $$(G4INSTALL)/Configure not found and NOG4 not set)) offline/make/Makefile.common:LDFLAGS := $(LDFLAGS) `$(G4INSTALL)/Configure -ldflags | grep -e ^-L` `$(G4INSTALL)/Configure -ldlibs | grep -e ^-l` `$(CLHEP_BASE_DIR)/bin/clhep-config --ldflags` `$(CLHEP_BASE_DIR)/bin/clhep-config --libs` offline/make/Makefile.common:CCFLAGS := $(CCFLAGS) `$(G4INSTALL)/Configure -incflags | grep -e ^-I` `$(CLHEP_BASE_DIR)/bin/clhep-config --include` offline/make/Makefile.common:G4VERSION := $(shell $(G4INSTALL)/Configure -ldflags) offline/make/Makefile.common: $(if $(G4VERSION),,$(error $$(G4INSTALL)/Configure not found and NOG4 not set))
(In reply to comment #4) > I can't give you an example where "incompatible" CLHEP versions give GEANT4 > wrong results but when I read the documentation I am not really questioning > that they know best. My guess is they fear conflicting definitions of constants (think masses) in their and the CLHEP code. CLHEP maintains to be backwards compatible in 2.0 to 1.8, so its interface couldn't (shouldn't) be at fault. > As for the libraries I realize that they are put somewhere, somewhere > reasonable even, but there are a lot of questions in the Configure file that > dependencies wont know from env-vars. But still we manage to build their examples with the Geant4 supplied Makefiles. > Did you build with X11 Ray Tracing? That is precisely what is stored in $G4VIS_BUILD_RAYTRACERX_DRIVER. > Here is an example in the code I was trying to compile (the code is private so > I grep`d the important parts): [...] I don't mean to be rude, but your build system seems to use a pretty hacky solution to access the Geant4 configuration. Also, this solution should only work if Geant4 wasn't installed into the system, but you use some single directory installation (like ROOT was first used with $ROOTSYS) (because Configure stores its configuration in some other folders in the build directory). I could think of two simple fixes for that: * use the Geant4 build system or * get the information needed from environment variables like $G4LIB or $G4INCLUDE. I think there is only very little experience with Geant4 installed into the system instead of some single $G4DIR, so if you could give some feedback on how you solved this for you would be great. Do you have collaborators who use Debian's Geant4 packages and have a smoother experience (why)?
This has been fixed in both 4.9.3_p02 and newer 4.9.4