I got a report from Steve Trogdon that pkgconfig 0.28 broke the sage ebuild on Friday. Since then I found out that it also breaks cvxopt but not numpy and scipy. All those are python based application that use BLAS/LAPACK. In those ebuild the libraries needed are extracted by parsing the output of pkg-config with sed. The problem is that pkg-config seems to add a whte space after the library name. Here is the failure in cvxopt: x86_64-pc-linux-gnu-gcc -pthread -shared -Wl,-O1 -Wl,--as-needed -O1 -march=native -pipe -ggdb build-2.7/temp.linux-x86_64-2.7/C/base.o build-2.7/temp.linux-x86_64-2.7/C/dense.o build-2.7/temp.linux-x86_64-2.7/C/sparse.o -L -L/usr/lib64 -lreflapack -lopenblas -lpython2.7 -o build-2.7/lib.linux-x86_64-2.7/cvxopt/base.so /usr/lib/gcc/x86_64-pc-linux-gnu/4.6.3/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find -lopenblas collect2: ld returned 1 exit status error: command 'x86_64-pc-linux-gnu-gcc' failed with exit status 1 And this is caused by this line on setup.py: # Default names of BLAS and LAPACK libraries BLAS_LIB = ['openblas '] LAPACK_LIB = ['reflapack','openblas '] BLAS_EXTRA_LINK_ARGS = [] Notice the extra space. As it happens openblas.pc has a space after "-lopenblas" but this is not the cause of the problem. cblas-reference doesn't but cvxopt will fail the same way if it is eselected. Numpy and scipy are unaffected, in their case we populate a "site.cfg" file which seems to protect them from the problem. Steve suggested that the current sed recipe in cvxopt should be changed to the following: sed \ -e 's/^-l//' \ -e "s/ -l/\',\'/g" \ -e 's/.,.pthread//g' \ -e "s/[ \t]*$//")\' This is also slightly different from the recipe used in numpy which was recently updated by jlec (and putting the current sed recipe from numpy doesn't solve the problem in cvxopt). A final point there are at least 3 ebuilds in the tree and 1 in an overlay that have to parse pkg-config to produce something palatable to python. Should we we have a unique parsing script somewhere?
Maybe we should report the issue to pkg-config developers. It seems that pkg-config-28 is rather new [1]. The announcement contains this note: I believe the pkg-config output should be entirely compatible with current usage since the test suite has been extended quite a bit and catches regressions much better than it used to. That said, please see the details of the changes in the NEWS below, try out the latest release, and let us know if you're having any issues with pkg-config. [1] http://lists.freedesktop.org/archives/pkg-config/2013-January/000912.html
Yes definitely. Although it would be even better if we had a tool to parse pkg-config for python setuptools/distribute and distutils.
Hi, scipy also fails for me (bug 456280).
(In reply to comment #3) > Hi, scipy also fails for me (bug 456280). so going down to pkgconfig 0.27.1 solved your scipy problems?
(In reply to comment #4) > (In reply to comment #3) > > Hi, scipy also fails for me (bug 456280). > > so going down to pkgconfig 0.27.1 solved your scipy problems? yes.
Sorry I had answered without seeing the other bug first.
I found the problem, will commit a fix soonish
25 Feb 2013; Sébastien Fabbro <bicatali@gentoo.org> cvxopt-1.1.5-r1.ebuild: Previous was wrong commmit 25 Feb 2013; Sébastien Fabbro <bicatali@gentoo.org> cvxopt-1.1.5-r1.ebuild: Removed extra spaces generated by pkg-config