Bug 177065 - sys-cluster/lam-mpi-7.1.2 USE='-pbs' emerge fails if third party libpbs.a is present
Bug#: 177065 Product:  Gentoo Linux Version: 2006.1 Platform: AMD64
OS/Version: Linux Status: RESOLVED Severity: minor Priority: P2
Resolution: FIXED Assigned To: hp-cluster@gentoo.org Reported By: pogosyan@phys.ualberta.ca
Component: Ebuilds
URL: 
Summary: sys-cluster/lam-mpi-7.1.2 USE='-pbs' emerge fails if third party libpbs.a is present
Keywords:  
Status Whiteboard: 
Opened: 2007-05-04 17:14 0000
Description:   Opened: 2007-05-04 17:14 0000
This is a variation on bug http://bugs.gentoo.org/show_bug.cgi?id=119479

USE='-pbs' emerge lam-mpi 

fails

....
/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/../../../../x86_64-pc-linux-gnu/bin/ld:
/usr/local/lib/libpbs.a(tm.o): relocation R_X86_64_32S against `a local symbol'
can not be used when making a shared object; recompile with -fPIC
/usr/local/lib/libpbs.a: could not read symbols: Bad value
.....

as in 119479, which linked the issue to problem within libpbs.a

However, the bug is that I try to compile without pbs support , however ebuild
finds some third party libpbs installed and crashes (I do not have any Gentoo
pbs packages installed and I was not even aware that I have libpbs in
/usr/local ).

Removing /usr/local/lib/libpbs.a   out of the way allows emerge to finish
successfully.
I hope run-time is not affected if I move libpbs.a back into place.

To summarize,  -pbs flag should ignore any pbs installations cleanly.

Reproducible: Always

Steps to Reproduce:
1. emerge -pv lam-mpi
[ebuild  N    ] sys-cluster/lam-mpi-7.1.2  USE="crypt -debug fortran -pbs
-xmpi"

2. emerge lam-mpi

Actual Results:  
....
/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/../../../../x86_64-pc-linux-gnu/bin/ld:
/usr/local/lib/libpbs.a(tm.o): relocation R_X86_64_32S against `a local symbol'
can not be used when making a shared object; recompile with -fPIC
/usr/local/lib/libpbs.a: could not read symbols: Bad value
.....

(/usr/local/lib/libpbs.a   is third party pbs installation)

Expected Results:  
clean emerge

------- Comment #1 From Justin Bronder 2008-01-17 03:18:59 0000 -------
I believe I've fixed this in lam-mpi-7.1.4 according to the advice posted at: 
http://www.lam-mpi.org/MailArchives/lam/2006/05/12445.php

If this is not the case, please reopen the bug and thanks for the report.