When dev-python/cvxopt-1.1.5 is built the 'cholmod' extension is always linked against libblas regardless of which blas one has eselect'd. The following is a failure when only openblas is installed and thus eselect'd: running build_ext building 'glpk' extension creating build-2.7/temp.linux-x86_64-2.7 creating build-2.7/temp.linux-x86_64-2.7/C x86_64-pc-linux-gnu-gcc -pthread -march=opteron -O2 -pipe -fPIC -I/usr/include/python2.7 -c C/glpk.c -o build-2.7/temp.linux-x86_64-2.7/C/glpk.o x86_64-pc-linux-gnu-gcc -pthread -shared -Wl,-O1 -Wl,--as-needed -march=opteron -O2 -pipe build-2.7/temp.linux-x86_64-2.7/C/glpk.o -L -L/usr/lib64 -lglpk -lpython2.7 -o build-2.7/lib.linux-x86_64-2.7/cvxopt/glpk.so building 'base' extension x86_64-pc-linux-gnu-gcc -pthread -march=opteron -O2 -pipe -fPIC -I/usr/include/python2.7 -c C/base.c -o build-2.7/temp.linux-x86_64-2.7/C/base.o x86_64-pc-linux-gnu-gcc -pthread -march=opteron -O2 -pipe -fPIC -I/usr/include/python2.7 -c C/dense.c -o build-2.7/temp.linux-x86_64-2.7/C/dense.o x86_64-pc-linux-gnu-gcc -pthread -march=opteron -O2 -pipe -fPIC -I/usr/include/python2.7 -c C/sparse.c -o build-2.7/temp.linux-x86_64-2.7/C/sparse.o x86_64-pc-linux-gnu-gcc -pthread -shared -Wl,-O1 -Wl,--as-needed -march=opteron -O2 -pipe 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 -llapack -lopenblas -lm -lpython2.7 -o build-2.7/lib.linux-x86_64-2.7/cvxopt/base.so building 'blas' extension x86_64-pc-linux-gnu-gcc -pthread -march=opteron -O2 -pipe -fPIC -I/usr/include/python2.7 -c C/blas.c -o build-2.7/temp.linux-x86_64-2.7/C/blas.o x86_64-pc-linux-gnu-gcc -pthread -shared -Wl,-O1 -Wl,--as-needed -march=opteron -O2 -pipe build-2.7/temp.linux-x86_64-2.7/C/blas.o -L -L/usr/lib64 -lopenblas -lm -lpython2.7 -o build-2.7/lib.linux-x86_64-2.7/cvxopt/blas.so building 'lapack' extension x86_64-pc-linux-gnu-gcc -pthread -march=opteron -O2 -pipe -fPIC -I/usr/include/python2.7 -c C/lapack.c -o build-2.7/temp.linux-x86_64-2.7/C/lapack.o x86_64-pc-linux-gnu-gcc -pthread -shared -Wl,-O1 -Wl,--as-needed -march=opteron -O2 -pipe build-2.7/temp.linux-x86_64-2.7/C/lapack.o -L -L/usr/lib64 -llapack -lopenblas -lm -lpython2.7 -o build-2.7/lib.linux-x86_64-2.7/cvxopt/lapack.so building 'umfpack' extension x86_64-pc-linux-gnu-gcc -pthread -march=opteron -O2 -pipe -fPIC -I/usr/include/python2.7 -c C/umfpack.c -o build-2.7/temp.linux-x86_64-2.7/C/umfpack.o x86_64-pc-linux-gnu-gcc -pthread -shared -Wl,-O1 -Wl,--as-needed -march=opteron -O2 -pipe build-2.7/temp.linux-x86_64-2.7/C/umfpack.o -L -L/usr/lib64 -lumfpack -lpython2.7 -o build-2.7/lib.linux-x86_64-2.7/cvxopt/umfpack.so building 'cholmod' extension x86_64-pc-linux-gnu-gcc -pthread -march=opteron -O2 -pipe -fPIC -DDLONG= -DNPARTITION=1 -I/usr/include/python2.7 -c C/cholmod.c -o build-2.7/temp.linux-x86_64-2.7/C/cholmod.o x86_64-pc-linux-gnu-gcc -pthread -shared -Wl,-O1 -Wl,--as-needed -march=opteron -O2 -pipe build-2.7/temp.linux-x86_64-2.7/C/cholmod.o -L/usr/lib64 -lcholmod -lblas -lpython2.7 -o build-2.7/lib.linux-x86_64-2.7/cvxopt/cholmod.so /usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find -lblas collect2: ld returned 1 exit status error: command 'x86_64-pc-linux-gnu-gcc' failed with exit status 1 Notice that blas is linked correctly in building the 'base', 'blas' and 'lapack' extensions. If blas-reference is installed then the build succeeds even if that blas is not eselect'd since blas-reference provides /usr/lib/libblas.so.
I believe in the cholmod extension section of cvxopt-1.1.5-setup.patch + libraries = ['cholmod','blas'], + define_macros = MACROS + [('NPARTITION', '1')], + sources = [ 'C/cholmod.c' ]) + there should be libraries = [ 'cholmod' ] + BLAS_LIB,
(In reply to comment #1) > I believe in the cholmod extension section of cvxopt-1.1.5-setup.patch > > + libraries = ['cholmod','blas'], > + define_macros = MACROS + [('NPARTITION', '1')], > + sources = [ 'C/cholmod.c' ]) > + > > there should be > > libraries = [ 'cholmod' ] + BLAS_LIB, Well, I patched the patch last time this came up, but looking at it now, I don't understand what it is doing. I guess Sebastien should look at it. Sorry.
+ 24 May 2012; Sébastien Fabbro <bicatali@gentoo.org> + files/cvxopt-1.1.5-setup.patch: + fixed cholmod blas linking, thanks Steve Trogdon, bug #415827 +
The updated patch has + libraries = ['cholmod'] + BLAS_LIBS, But shouldn't this be + libraries = ['cholmod'] + BLAS_LIB, No (S), since the unpatched setup.py has as variables # Default names of BLAS and LAPACK libraries BLAS_LIB = ['blas'] LAPACK_LIB = ['lapack'] BLAS_EXTRA_LINK_ARGS = []
OK, there's apparently no option to reopen a bug so let's try needinfo before opening a new bug.
just fixed it and revbumped. thanks for the catch.