Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 504618 - dev-python/numpy-1.8.0-r1 - pc_libs() fails to remove all duplicate libraries
Summary: dev-python/numpy-1.8.0-r1 - pc_libs() fails to remove all duplicate libraries
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Science Related Packages
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2014-03-14 17:29 UTC by whgentoo
Modified: 2014-03-18 20:26 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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
+