Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Geant4 issue

  1. Jul 7, 2011 #1
    Hi,


    I have installed Geant4.8.3 and i was prompted that i have installed it successfully i installed according to the instructions here

    (http://geant4.slac.stanford.edu/tutorial/installation/Geant4.8.3/Linux/Geant4_8_3_Linux_Installation.htm [Broken])

    i am trying to check my installation by compiling and running an example application mentioned but it dent compile and crash with an issue as bellows please look nd guide me .

    login3% make
    Making dependency for file A01app.cc ...
    Making dependency for file src/A01Trajectory.cc ...
    Making dependency for file src/A01PrimaryGeneratorMessenger.cc ...
    Making dependency for file src/A01PrimaryGeneratorAction.cc ...
    Making dependency for file src/A01PhysicsList.cc ...
    Making dependency for file src/A01MuonPhysics.cc ...
    Making dependency for file src/A01MagneticFieldMessenger.cc ...
    Making dependency for file src/A01MagneticField.cc ...
    Making dependency for file src/A01IonPhysics.cc ...
    Making dependency for file src/A01HodoscopeHit.cc ...
    Making dependency for file src/A01Hodoscope.cc ...
    Making dependency for file src/A01HadronPhysics.cc ...
    Making dependency for file src/A01HadCalorimeterHit.cc ...
    Making dependency for file src/A01HadCalorimeter.cc ...
    Making dependency for file src/A01GeneralPhysics.cc ...
    Making dependency for file src/A01EventActionMessenger.cc ...
    Making dependency for file src/A01EventAction.cc ...
    Making dependency for file src/A01EMPhysics.cc ...
    Making dependency for file src/A01EmCalorimeterHit.cc ...
    Making dependency for file src/A01EmCalorimeter.cc ...
    Making dependency for file src/A01DriftChamberHit.cc ...
    Making dependency for file src/A01DriftChamber.cc ...
    Making dependency for file src/A01DetectorConstruction.cc ...
    Making dependency for file src/A01DetectorConstMessenger.cc ...
    Making dependency for file src/A01CellParameterisation.cc ...
    Making dependency for file src/A01AnalysisManager.cc ...
    Compiling A01AnalysisManager.cc ...
    Compiling A01CellParameterisation.cc ...
    Compiling A01DetectorConstMessenger.cc ...
    Compiling A01DetectorConstruction.cc ...
    Compiling A01DriftChamber.cc ...
    Compiling A01DriftChamberHit.cc ...
    Compiling A01EmCalorimeter.cc ...
    Compiling A01EmCalorimeterHit.cc ...
    Compiling A01EMPhysics.cc ...
    Compiling A01EventAction.cc ...
    Compiling A01EventActionMessenger.cc ...
    Compiling A01GeneralPhysics.cc ...
    Compiling A01HadCalorimeter.cc ...
    Compiling A01HadCalorimeterHit.cc ...
    Compiling A01HadronPhysics.cc without optimization...
    Compiling A01Hodoscope.cc ...
    Compiling A01HodoscopeHit.cc ...
    Compiling A01IonPhysics.cc ...
    Compiling A01MagneticField.cc ...
    Compiling A01MagneticFieldMessenger.cc ...
    Compiling A01MuonPhysics.cc ...
    Compiling A01PhysicsList.cc ...
    Compiling A01PrimaryGeneratorAction.cc ...
    Compiling A01PrimaryGeneratorMessenger.cc ...
    Compiling A01Trajectory.cc ...
    Creating/replacing object files in g4work//tmp/Linux-g++/A01app/libA01app.a ...
    ar: creating g4work//tmp/Linux-g++/A01app/libA01app.a
    Compiling A01app.cc ...
    Using granular libraries ...
    Linking A01app ...
    /opt/apps/binutils-amd/070220/bin/ld: skipping incompatible /usr/X11R6/lib/libGLU.a when searching for -lGLU
    /opt/apps/binutils-amd/070220/bin/ld: skipping incompatible /usr/X11R6/lib/libGL.so when searching for -lGL
    /opt/apps/binutils-amd/070220/bin/ld: skipping incompatible /usr/X11R6/lib/libGL.a when searching for -lGL
    /opt/apps/binutils-amd/070220/bin/ld: skipping incompatible /usr/X11R6/lib/libXmu.so when searching for -lXmu
    /opt/apps/binutils-amd/070220/bin/ld: skipping incompatible /usr/X11R6/lib/libXmu.a when searching for -lXmu
    /opt/apps/binutils-amd/070220/bin/ld: cannot find -lXmu
    collect2: ld returned 1 exit status
    make: *** [g4work//bin/Linux-g++/A01app] Error 1
     
    Last edited by a moderator: May 5, 2017
  2. jcsd
  3. Jul 8, 2011 #2

    Drakkith

    User Avatar

    Staff: Mentor

    Perhaps you should contact whoever created the program and ask them? A support site or something?
     
  4. Jul 11, 2011 #3
    I did that but no help :(
     
  5. Jul 11, 2011 #4

    I like Serena

    User Avatar
    Homework Helper

    Well, apparently you're mixing compilers.

    With Geant you have compiled all your source files.
    But apparently you're trying to link them against libraries that are not compatible.

    You should provide us with a little more information.

    Is your application a graphical one? That is, does it has a graphical user interface?
    If not, the libraries that he complains about, probably shouldn't be linked at all.
    (GL and X are graphical system libraries.)

    If you do need the libraries, you need to check if you have other similar libraries that have been compiled by Geant, and try and use those.
    Or you need to try and compile/install those libraries.

    Perhaps you could upload the Makefile you're using?
     
  6. Jul 11, 2011 #5
    Hi,

    yes this is a example application and it needs graphics to run how should i install graphics lib files and change the path so that this would work i want to check if the Installation was really successful before i proceed in my work,

    below is the make file of the example application.



    # $Id: GNUmakefile,v 1.10 2006/11/10 21:04:51 duns Exp $
    # --------------------------------------------------------------
    # GNUmakefile for examples module
    # --------------------------------------------------------------

    name := A01app
    G4TARGET := $(name)
    G4EXLIB := true

    ifndef G4INSTALL
    G4INSTALL = ../../../..
    endif

    .PHONY: all
    all: lib bin

    #
    # A01 uses its own physics lists.
    #

    include $(G4INSTALL)/config/binmake.gmk

    CXXFLAGS_WITHOUT_O := $(filter-out -O% , $(CXXFLAGS))
    CXXFLAGS_WITHOUT_O := $(filter-out +O% , $(CXXFLAGS_WITHOUT_O))

    #
    # A01HadronPhysics fails to compile in optimized mode on Linux, Darwin, using g++
    # so it needs this special rule. Hans-Peter Wellish.
    #
    ifeq ($(G4SYSTEM),Linux-g++)
    A01HADRON_NO_OPTIMIZE = 1
    endif
    ifeq ($(G4SYSTEM),Linux-g++2)
    A01HADRON_NO_OPTIMIZE = 1
    endif
    ifeq ($(G4SYSTEM),Linux-g++3)
    A01HADRON_NO_OPTIMIZE = 1
    endif
    ifeq ($(G4SYSTEM),Darwin-g++)
    A01HADRON_NO_OPTIMIZE = 1
    endif
    ifeq ($(G4SYSTEM),Darwin-g++2)
    A01HADRON_NO_OPTIMIZE = 1
    endif
    ifeq ($(G4SYSTEM),Darwin-g++3)
    A01HADRON_NO_OPTIMIZE = 1
    endif

    ifdef A01HADRON_NO_OPTIMIZE
    $(G4TMP)/$(G4SYSTEM)/$(name)/A01HadronPhysics.o: src/A01HadronPhysics.cc
    @echo "Compiling A01HadronPhysics.cc without optimization..."
    @$(CXX) $(CXXFLAGS_WITHOUT_O) $(CPPFLAGS) -c $(OUT_OBJ)$@ src/A01HadronPhysics.cc
    endif

    ifdef G4ANALYSIS_USE
    CPPFLAGS += `aida-config --include`
    LDLIBS += `aida-config --lib`
    endif
    ~
    1,1 All
     
  7. Jul 11, 2011 #6

    I like Serena

    User Avatar
    Homework Helper

    That doesn't help much yet. ;)

    The relevant lines defining which compiler you use exactly, which command line options, which libraries, and which paths are not in here.....
    I guess you would need to show binmake.gmk which is included......

    You're saying this is an example application.
    Did it come with Geant?
    If so, there should be installation instructions how to get it to work.....

    I am not familiar with Geant (yet), and I didn't read the web pages about it (yet).
    Can you say in a few words what it's for and why you are using it?

    Can A01HadronPhysics.cc run as a standalone program?
    If so, you might try:
    $ nm -AC A01HadronPhysics.o​
    to find out which externals it tries to link to.

    And as long as we're at it, can you say which platform you're using?
    Which kernel? And which version of gcc?
     
  8. Jul 11, 2011 #7
    Hi,

    I have done a new installation so i am trying to compile the example code as suggested in http://geant4.slac.stanford.edu/tutorial/installation/Geant4.8.3/Linux/Geant4_8_3_Linux_Installation.htm [Broken]
    to check if the Geant4 is installed properly.
    My application is to track particle path. to which i am new.

    I am working on linux platform and
    Linux version 2.6.9-78.0.22 (gcc version 3.4.6 20060404 (Red Hat 3.4.6-3))
     
    Last edited by a moderator: May 5, 2017
  9. Jul 12, 2011 #8

    I like Serena

    User Avatar
    Homework Helper

    Could you be a bit more expansive please?
    I'm trying to shake a few details loose here.

    This looks like a configuration issue, but I really need more information to pinpoint it.
     
  10. Jul 12, 2011 #9
    Hi,

    Please let me know why are the more information you need.

    I am trying to use Geant4 for particle path tracking, so i have started my work and am in initial stages.

    I installed Geant4 on ranger system of TACC, i followed same steps as mentioned in the link and nothing other than that.

    At the end of installation i was notified that Installation was successful

    an i tried to compile few examples which crashed with same error messages as i mentioned above.

    i think the errors are because of some visualization libraries in compatibility but how to solve this issue.

    can i set the paths for those libraries in the make file and add libraries in my own account???

    i am new to this system.

    please let m e know what is the more information you need.

    the package is Geant 4.8.3 i am trying to install and its Read hat linux. and GCC is 3.4.6
     
  11. Jul 12, 2011 #10

    I like Serena

    User Avatar
    Homework Helper

    Ok, let's start with my previous questions you did not answer.

    Can you upload the contents of binmake.gmk?

    Can you upload the output of the following command?
    $ nm -AC A01HadronPhysics.o > A01HadronPhysics.log

    And is the Makefile you showed complete, or is it a fragment?
     
  12. Jul 12, 2011 #11
    Hi,

    I could not find binmake.gmk but i found another .gmk file which is hadlist.gmk which i attached,

    he make file is full file not an extract.

    i also attached the log file, and some more files which might be use flu to understand it that can be found in the folder attached.

    there re few more files i couldn't attach due to space issue i can do it in parts.

    thank you very much for helping me please let me know if you need any more information.

    Thanks,
    yugi
     

    Attached Files:

  13. Jul 12, 2011 #12

    I like Serena

    User Avatar
    Homework Helper

    I'll look at it later when I have more time.

    As for binmake.gmk, your should find it in:
    ../../../../config/binmake.gmk​
    because that's what it says in the Makefile.

    Or you could try:
    $ locate binmake.gmk​
     
  14. Jul 12, 2011 #13
    Hi,

    Please find attached binmake.gmk i zipped it to upload it.


    Thanks,

    Yugi
     

    Attached Files:

  15. Jul 12, 2011 #14

    I like Serena

    User Avatar
    Homework Helper

    Ok. As yet I see nothing strange.
    It appears Geant is simply a source package using gcc and system libraries.
    This means that either the files have been compiled wrong somehow, or the libraries are not where they're supposed to be.

    Can you execute the following commands:
    $ make clean
    $ make -n >make-dry-run.log
    $ ls -l /usr/X11R6/lib/ >ls_Xlib.log

    and upload the output?
     
  16. Jul 13, 2011 #15
    Hi ,

    Please find the attached outputs .......


    Thanks,
    Yugi
     

    Attached Files:

  17. Jul 13, 2011 #16

    I like Serena

    User Avatar
    Homework Helper

    Well, that looks pretty straight forward.
    Furthermore the Geant package appears to be carefully constructed, which is good.
    Again no obvious problems.

    The only odd one is a directory called CLHEP.
    What is that? Did you build it yourself?

    Have you already tried installing and building on another Linux machine?
    Did you in particular get any warnings or errors while installing?
    Or did you use any creativity of your own to circumvent problems?
     
  18. Jul 13, 2011 #17

    I like Serena

    User Avatar
    Homework Helper

    The obvious thing to do is clean everything and uninstall everything.
    And while you're at it, you might as well reboot.

    Then redo the installation, keeping a careful eye out for any problems and writing them down if any.

    Many problems disappear magically by simply rebooting and redoing.
    And otherwise there might be an overlooked problem that you may see when redoing it.
     
  19. Jul 13, 2011 #18
    Hi,

    The following is the description of CLHEP which was advised to install with GEANT4 in the installation Guide at

    http://geant4.slac.stanford.edu/tutorial/installation/Geant4.8.3/Linux/Geant4_8_3_Linux_Installation.htm#_Getting_and_Installing [Broken]

    CLHEP:
    CLHEP is a set of base libraries that have long provided great functionality for the particle physics community. They provide things like matrix manipulations and four-vector tools. The Geant4 collaboration has chosen to use these libraries rather than re-invent these wheels. Please note that while CLHEP and Geant4 both come out of the particle physics communities, they are separate products - the Geant4 collaboration is not responsible for maintenance, distribution or documentation of CLHEP.

    no i didn't try it installing on another linux machine....

    no i didn't get any warning messages while installing it was a clean install..... as it said the installation was successful after i installed as described in the link above .....
     
    Last edited by a moderator: May 5, 2017
  20. Jul 13, 2011 #19

    I like Serena

    User Avatar
    Homework Helper

    All right. So it's unlikely that CLHEP causes a problem like this.

    This also mean I'm basically out of ideas here.
    Sorry.

    I'll mention just a few ideas more.


    Go to the Geant install directory and do:
    $ make check
    or if that doesn't work:
    $ make test

    Usually packages have a special make target to check the installation.
    It should run a lists of tests that should all pass, or else it may give you a clue.


    You can fool around a bit with the link command in the makefile.
    That is, first do:
    $ make
    It should fail on the last link command.

    Copy and paste the link command on your command line (you can get it from the make-dry-run.log file you created earlier).
    Check if executing it causes the same error.

    Remove for instance the references to the libraries that fail, such as -lGLU, and check what happens. You should get a list of undefined references.
    Then check with "nm -AC libGLU.a" whether you can find these references in the library.
    Perhaps there is a discrepancy somewhere.

    There might also be a versioning problem, meaning that Geant expects a newer version of the libraries than it gets.


    I can't really tell you what to do and what to expect though.
    Sorry.
    I already checked for the most common reasons for your failure.
     
    Last edited: Jul 13, 2011
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook