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

Bug 504618

Summary: dev-python/numpy-1.8.0-r1 - pc_libs() fails to remove all duplicate libraries
Product: Gentoo Linux Reporter: whgentoo
Component: [OLD] DevelopmentAssignee: Gentoo Science Related Packages <sci>
Status: RESOLVED FIXED    
Severity: normal CC: python
Priority: Normal Keywords: PATCH
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description whgentoo 2014-03-14 17:29:18 UTC
Start from line 63
pc_libs() {
        $(tc-getPKG_CONFIG) --libs-only-l $@ | \
          sed -e 's/[ ]-l*\(pthread\|m\)\([ ]\|$\)//g' \
           -e 's/^-l//' -e 's/[ ]*-l/,/g' -e 's/[ ]*$//' \
          | sort | uniq | tr '\n' ','
}

The function intends to remove duplicate libs returned by pkg-config, however it doesn't.

A quick fix can be done by changing line 66.

pc_libs() {
        $(tc-getPKG_CONFIG) --libs-only-l $@ | \
          sed -e 's/[ ]-l*\(pthread\|m\)\([ ]\|$\)//g' \
           -e 's/^-l//' -e 's/[ ]*-l/,/g' -e 's/[ ]*$//' \
          | tr ',' '\n' | sort | uniq | tr '\n' ','
}
Comment 1 Justin Lecher (RETIRED) gentoo-dev 2014-03-14 19:27:59 UTC
thanks for the patch. Looks good to me. @python?
Comment 2 whgentoo 2014-03-14 19:51:38 UTC
scipy also has the same bug. 

It only breaks the compilation when pkg-config returns the same libs for blas and cblas (e.g. MKL).

Python-2.7.5

(In reply to Justin Lecher from comment #1)
> thanks for the patch. Looks good to me. @python?
Comment 3 Sébastien Fabbro (RETIRED) gentoo-dev 2014-03-18 20:26:46 UTC
+  18 Mar 2014; Sébastien Fabbro <bicatali@gentoo.org> numpy-1.8.0-r1.ebuild:
+  Fix sed to allow complex pkg-config lines from mkl, thanks
+  weihan3@illinois.edu, bug #504618
+


  18 Mar 2014; Sébastien Fabbro <bicatali@gentoo.org> metadata.xml,
+  scipy-0.13.3.ebuild:
+  Fix sed to allow complex pkg-config lines from mkl, thanks
+  weihan3@illinois.edu, bug #504618
+