Problem 514

Summary: can't link N01
Product: Examples/Basic and Novice Reporter: clair
Component: N01Assignee: Makoto.Asai
Status: RESOLVED WORKSFORME    
Severity: normal    
Priority: P2    
Version: 5.0   
Hardware: PC   
OS: Linux   

Description clair 2003-07-23 09:26:53 CEST
Hi.  I receive the following error (and several like it) when I try to compile
example N01:

/home/clair/geant/geant4.5.0.p01/lib/Linux-g++/libG4geometrymng.a(G4PVPlacement.o):
In function `G4PVPlacement::NewPtrRotMatrix(HepRotation const &)':
G4PVPlacement.o(.text+0x7ef): undefined reference to
`HepRotation::isIdentity(void) const'

I also get the following error that might be helpful:

/usr/bin/ld: warning: libstdc++-libc6.1-1.so.2, needed by
/home/clair/CLHEP/lib/libCLHEP.so, not found (try using -rpath or -rpath-link)

Is there an environmental variable that I don't have set properly?  FYI, I am
using gcc-2.95 on Debian Linux and compiled Geant by hand since the script
wasn't really working for me (just did $G4INSTALL/source/ make).

Thanks!

-clair
Comment 1 Gabriele Cosmo 2003-07-24 08:49:59 CEST
You should check your installation of the CLHEP library.
Geant4 5.0 requires CLHEP-1.8. Check that your CLHEP installation
corresponds to the original CLHEP software.
As for the libstdc++ problem, it eventually indicates you're using an
inconsistent installation of the CLHEP library for your system. Try
building the CLHEP library on your system using the same version of
the compiler.
Comment 2 clair 2003-07-24 11:22:59 CEST
I have tried doing the install with CLHEP 1.8 (I was using 1.6 before) and I get
a bit further in the compilation and linking.  Here is what I get now:

Linking exampleN01 ...
/usr/bin/ld: cannot find -lG4digits
collect2: ld returned 1 exit status
make: *** [bin/Linux-g++/exampleN01] Error 1

Any suggestions you have on how to fix this would be greatly appreciated.
(Note: I will be on travel for the next week and may not be able to try your
suggestions until I return.)

Thank you!

-clair