Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 231314

Summary: sci-physics/geant-4.9.1_p02 doesn't install global libraries
Product: Gentoo Linux Reporter: Benjamin Bannier <bbannier+gentoo_bugs>
Component: [OLD] LibraryAssignee: Gentoo Science Physics related packages <sci-physics>
Status: RESOLVED TEST-REQUEST    
Severity: major CC: fmccor, sci-physics
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: Fix global libs issues
patch against version in portage v1.5

Description Benjamin Bannier 2008-07-09 17:24:38 UTC
Hi,

due to an incomplete sed of the Makefiles, the geant-4.9.1_p02 ebuild does build the "global libraries", but they are never merged since the ebuild does not find them.

Also, with the current ebuild logic, it is impossible to build static global libraries.

Patch follows.


Cheers,

Benjamin

Reproducible: Always
Comment 1 Benjamin Bannier 2008-07-09 17:27:21 UTC
Created attachment 159961 [details, diff]
Fix global libs issues

Changes are:
 * Call order for compile:
   Make sure env var for global is set before we try to build static objs, so
   get a chance to build static global libs.
 * sed to put global libraries in common TMP dir during compile
Comment 2 Sébastien Fabbro (RETIRED) gentoo-dev 2008-07-10 10:22:33 UTC
In cvs. Thanks a lot!
Comment 3 Benjamin Bannier 2008-07-16 20:11:07 UTC
Created attachment 160601 [details, diff]
patch against version in portage v1.5

"make global" removes all the granular libraries we built in the step
before.  I had a look at the build process in the ./Configure script
(install.sh): they build global first and then the rest. However,
trying this order in the ebuild does not build the granular libraries
("no rule for obj.last" in "make global").

This patch just makes sure that the granular libraries are rebuild
from the object files that are still around in case we build global
libraries, too.
Comment 4 Benjamin Bannier 2008-07-16 20:12:39 UTC
The current ebuild version for USE=global removes the needed granular libs.

Patch is in https://bugs.gentoo.org/attachment.cgi?id=160601 above.

Sorry,

b.
Comment 5 Ferris McCormick (RETIRED) gentoo-dev 2008-07-17 14:03:55 UTC
This probably explains that no matter what I do, I can't build any of the examples.  Closest I can get results in a huge number of things like:

/usr/lib/geant4/libG4modeling.so: undefined reference to `CLHEP::HepRotation::thetaY() const'

and the GNUmakefiles for the examples essentially don't (make anything) without a lot of help.
Comment 6 Sébastien Fabbro (RETIRED) gentoo-dev 2008-07-17 14:12:20 UTC
OK, I applied the new patch in cvs.
Thanks Benjamin.
I'm leaving this bug open for more testing period.


Comment 7 Ferris McCormick (RETIRED) gentoo-dev 2008-07-17 16:17:22 UTC
(In reply to comment #5)
> This probably explains that no matter what I do, I can't build any of the
> examples.  Closest I can get results in a huge number of things like:
> 
> /usr/lib/geant4/libG4modeling.so: undefined reference to
> `CLHEP::HepRotation::thetaY() const'
> 
> and the GNUmakefiles for the examples essentially don't (make anything) without
> a lot of help.
> 

It's more than just that for me, I guess.  Several libraries for geant have this:
 U _ZN5CLHEP7HepZHatE

resulting in:
/usr/lib/geant4/libG4brep.so: undefined reference to `CLHEP::HepZHat'

but nowhere in geant is defined any sort of symbol with 'Hat' in it.  Although lots of _ZN5CLHEP symbols are defined, these aren't.

Comment 8 Ferris McCormick (RETIRED) gentoo-dev 2008-07-17 16:30:01 UTC
(In reply to comment #7)
> (In reply to comment #5)
> > This probably explains that no matter what I do, I can't build any of the
> > examples.  Closest I can get results in a huge number of things like:
> > 
> > /usr/lib/geant4/libG4modeling.so: undefined reference to
> > `CLHEP::HepRotation::thetaY() const'
> > 
> > and the GNUmakefiles for the examples essentially don't (make anything) without
> > a lot of help.
> > 
> 
> It's more than just that for me, I guess.  Several libraries for geant have
> this:
>  U _ZN5CLHEP7HepZHatE
> 
> resulting in:
> /usr/lib/geant4/libG4brep.so: undefined reference to `CLHEP::HepZHat'
> 
> but nowhere in geant is defined any sort of symbol with 'Hat' in it.  Although
> lots of _ZN5CLHEP symbols are defined, these aren't.
> 

My mistake.  The're in libCLHEP, a separate package.
Comment 9 Benjamin Bannier 2008-07-17 16:43:02 UTC
(In reply to comment #8)
> (In reply to comment #7)
> > (In reply to comment #5)
> > It's more than just that for me, I guess.  Several libraries for geant have
> > this:
> >  U _ZN5CLHEP7HepZHatE
> > 
> > resulting in:
> > /usr/lib/geant4/libG4brep.so: undefined reference to `CLHEP::HepZHat'
> > 
> > but nowhere in geant is defined any sort of symbol with 'Hat' in it.  Although
> > lots of _ZN5CLHEP symbols are defined, these aren't.
> > 
> 
> My mistake.  The're in libCLHEP, a separate package.

The geant4 Makefiles assume these libraries from sci-physics/clhep are in /usr/lib. I have no idea about sparc layout, but could it be that you CLHEP libraries are somewhere else?
Comment 10 Ferris McCormick (RETIRED) gentoo-dev 2008-07-17 17:40:05 UTC
(In reply to comment #9)
> (In reply to comment #8)
> > (In reply to comment #7)
> > > (In reply to comment #5)
> > > It's more than just that for me, I guess.  Several libraries for geant have
> > > this:
> > >  U _ZN5CLHEP7HepZHatE
> > > 
> > > resulting in:
> > > /usr/lib/geant4/libG4brep.so: undefined reference to `CLHEP::HepZHat'
> > > 
> > > but nowhere in geant is defined any sort of symbol with 'Hat' in it.  Although
> > > lots of _ZN5CLHEP symbols are defined, these aren't.
> > > 
> > 
> > My mistake.  The're in libCLHEP, a separate package.
> 
> The geant4 Makefiles assume these libraries from sci-physics/clhep are in
> /usr/lib. I have no idea about sparc layout, but could it be that you CLHEP
> libraries are somewhere else?
> 

No, the problem was that I forgot about -lCLHEP.  For me, the make files fail because they can't find the /usr/lib/geant4/liblist program nor the /usr/lib/geant4/libname.map file.  Rather than chasing down which of many env variables would control this, I built a brute-force linker script and forgot about CLHEP.  Once I noticed that, things started building at least.
Comment 11 Sébastien Fabbro (RETIRED) gentoo-dev 2008-08-22 15:58:50 UTC
(In reply to comment #10)

> about CLHEP.  Once I noticed that, things started building at least.

Are we done here?
Thanks
 

Comment 12 Sébastien Fabbro (RETIRED) gentoo-dev 2008-09-23 11:40:08 UTC
Need more tests. Re-open if it still fails.