ldd -r /usr/lib64/python2.7/site-packages/cvxopt/cholmod.so linux-vdso.so.1 => (0x00007fff248a2000) libcholmod.so.0 => /usr/lib64/libcholmod.so.0 (0x00007f4f973bf000) libpython2.7.so.1.0 => /usr/lib64/libpython2.7.so.1.0 (0x00007f4f9700e000) libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f4f96def000) libc.so.6 => /lib64/libc.so.6 (0x00007f4f96a47000) libcolamd.so.0 => /usr/lib64/libcolamd.so.0 (0x00007f4f96840000) libamd.so.0 => /usr/lib64/libamd.so.0 (0x00007f4f96636000) libm.so.6 => /lib64/libm.so.6 (0x00007f4f963b1000) libdl.so.2 => /lib64/libdl.so.2 (0x00007f4f961ad000) libutil.so.1 => /lib64/libutil.so.1 (0x00007f4f95fa9000) /lib64/ld-linux-x86-64.so.2 (0x00007f4f978c0000) undefined symbol: dcopy_ (/usr/lib64/python2.7/site-packages/cvxopt/cholmod.so) undefined symbol: zcopy_ (/usr/lib64/python2.7/site-packages/cvxopt/cholmod.so) It looks like dcopy_ and zcopy_ are symbols from blas which is absent from this ldd output. I never enabled cholmod in the sage-on-gentoo overlay so we may never have encountered that one before. It causes some failures in the sage testsuite which is how I found about it.
Other problems with the build process: ebuild /usr/portage/dev-python/cvxopt/cvxopt-1.1.4.ebuild prepare * cvxopt-1.1.4.tar.gz RMD160 SHA1 SHA256 size ;-) ... [ ok ] * checking ebuild checksums ;-) ... [ ok ] * checking auxfile checksums ;-) ... [ ok ] * checking miscfile checksums ;-) ... [ ok ] >>> Unpacking source... >>> Unpacking cvxopt-1.1.4.tar.gz to /scratch/portage/dev-python/cvxopt-1.1.4/work >>> Source unpacked in /scratch/portage/dev-python/cvxopt-1.1.4/work >>> Preparing source in /scratch/portage/dev-python/cvxopt-1.1.4/work/cvxopt-1.1.4/src ... * Applying cvxopt-setup.patch ... [ ok ] * sed -e s:\(libraries.*\)'cblas'\(.*\):\1'openblas','m'\2:g has no effect on setup.py * sed -e s/\(BUILD_ =\) 0/\1 1/ has no effect on setup.py * sed -e s/\(BUILD_ =\) 0/\1 1/ has no effect on setup.py * sed -e s/\(BUILD_ =\) 0/\1 1/ has no effect on setup.py * sed -e s/\(BUILD_ =\) 0/\1 1/ has no effect on setup.py >>> Source prepared. No cblas currently in setup.py so no surprise there but none of next 4 is working as expected: use_cvx gsl && pkg_lib gsl use_cvx fftw && pkg_lib fftw3 use_cvx glpk use_cvx dsdp Presumably use_cvx needs a second argument.
Created attachment 299037 [details, diff] replacement patch for cvxopt Attached a replacement patch for the cvxopt-setup.patch currently in portage for cvxopt. It just adds blas to the libraries needed for the cholmod extension. It solves some of my problems with sage but the second issues about the sed scripts not working now became apparent: sage -t -long -force_lib "devel/sage-main/sage/numerical/optimize.py" ********************************************************************** File "/usr/share/sage/devel/sage-main/sage/numerical/optimize.py", line 481: sage: sol=linear_program(v,m,h,solver='glpk') Exception raised: Traceback (most recent call last): File "/usr/bin/ncadoctest.py", line 1231, in run_one_test self.run_one_example(test, example, filename, compileflags) File "/usr/bin/sagedoctest.py", line 38, in run_one_example OrigDocTestRunner.run_one_example(self, test, example, filename, compileflags) File "/usr/bin/ncadoctest.py", line 1172, in run_one_example compileflags, 1) in test.globs File "<doctest __main__.example_6[12]>", line 1, in <module> sol=linear_program(v,m,h,solver='glpk')###line 481: sage: sol=linear_program(v,m,h,solver='glpk') File "/usr/lib64/python2.7/site-packages/sage/numerical/optimize.py", line 489, in linear_program from cvxopt import glpk ImportError: cannot import name glpk
Changing the use_cvxopt lines as follow resulted in a confusing error: use_cvx gsl GSL && pkg_lib gsl use_cvx fftw FFTW && pkg_lib fftw3 use_cvx glpk GLPK use_cvx dsdp DSDP The error: running build_ext building 'gsl' 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 -O1 -march=native -pipe -ggdb -fPIC -I -I/usr/include/python2.7 -c C/gsl.c -o build-2.7/temp.linux-x86_64-2.7/C/gsl.o In file included from C/gsl.c:21:0: C/cvxopt.h:21:20: fatal error: Python.h: No such file or directory compilation terminated. error: command 'x86_64-pc-linux-gnu-gcc' failed with exit status 1 Before my change above the gsl extension wasn't actually built. I cannot understand why Python.h is not found at this stage. Ah! the extra "-I" is the guilty part: x86_64-pc-linux-gnu-gcc -pthread -O1 -march=native -pipe -ggdb -fPIC -I/usr/include/python2.7 -c C/gsl.c -o build-2.7/temp.linux-x86_64-2.7/C/gsl.o works. So we also need to remove the *_INCLUDE_DIR or possibly leave them to /usr/include.
Aaargh. dsdp headers are not installed! x86_64-pc-linux-gnu-gcc -pthread -O1 -march=native -pipe -ggdb -fPIC -I/usr/include/python2.7 -c C/dsdp.c -o build-2.7/temp.linux-x86_64-2.7/C/dsdp.o C/dsdp.c:23:19: fatal error: dsdp5.h: No such file or directory
Created attachment 299039 [details, diff] New replacement for cvxopt-setup.patch solve the include_dir problem as well. The new patch take care of the problem with INCLUDE_DIRs by removing them altogether this works fine when you specify -dsdp in your useflags it will work or need adjustments depending on the resolution of bug #399035.
should be fixed. re-open if not. thanks.