Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 357879 - sci-libs/scipy bundles a copy of sci-libs/superlu
Summary: sci-libs/scipy bundles a copy of sci-libs/superlu
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Science Related Packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-08 06:10 UTC by Justin Lecher (RETIRED)
Modified: 2011-03-26 17:10 UTC (History)
2 users (show)

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


Attachments
Patch to avoid building superlu and use system version (scipy-0.9.0-superlu.patch,1.10 KB, patch)
2011-03-14 21:34 UTC, François Bissey
Details | Diff
New patch (scipy-0.9.0-superlu.patch,2.06 KB, patch)
2011-03-22 07:43 UTC, Justin Lecher (RETIRED)
Details | Diff
Newest superLU removal patch (scipy-superlu.patch,1.70 KB, patch)
2011-03-24 09:10 UTC, François Bissey
Details | Diff
new patch with Arfrever request (scipy-superlu.patch,1.49 KB, patch)
2011-03-24 22:12 UTC, François Bissey
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Justin Lecher (RETIRED) gentoo-dev 2011-03-08 06:10:20 UTC
Is it possible to unbundle this one?
Comment 1 François Bissey 2011-03-14 03:44:25 UTC
I think it may be possible by touching scipy/linalg/dsolve/setup.py.

If we could avoid the current qhull situation _where_ qhull is built by scipy but in the end it links to the system version it would be nice. 

Changing superlu_src

    config.add_extension('_superlu',
                         sources = ['_superlumodule.c',
                                    '_superlu_utils.c',
                                    '_superluobject.c'],
                         libraries = ['superlu_src'],
                         extra_info = lapack_opt,
                         )

to superlu we bring us to the same case as qhull - buiding but using system library at linking time I believe.
Comment 2 François Bissey 2011-03-14 21:34:43 UTC
Created attachment 265871 [details, diff]
Patch to avoid building superlu and use system version

I applied the attached patch and add the proper stuff in the ebuild and it works for me. I also made a patch to avoid building qhull but it should really be separate report.
Comment 3 Justin Lecher (RETIRED) gentoo-dev 2011-03-22 07:42:44 UTC
I additionally delted the SUPERLU dir and corrected the location of headers coming from the system. With this I get:


/usr/bin/x86_64-pc-linux-gnu-gfortran -Wall -Wl,-O1 -Wl,--as-needed -Wl,-O1 -Wl,--hash-style=gnu -Wl,--sort-common -shared build-2.6/temp.linux-x86_64-2.6/build-2.6/src.linux-x86_64-2.6/build-2.6/src.linux-x86_64-2.6/scipy/sparse/linalg/isolve/iterative/_iterativemodule.o build-2.6/temp.linux-x86_64-2.6/build-2.6/src.linux-x86_64-2.6/fortranobject.o build-2.6/temp.linux-x86_64-2.6/build-2.6/src.linux-x86_64-2.6/scipy/sparse/linalg/isolve/iterative/STOPTEST2.o build-2.6/temp.linux-x86_64-2.6/build-2.6/src.linux-x86_64-2.6/scipy/sparse/linalg/isolve/iterative/getbreak.o build-2.6/temp.linux-x86_64-2.6/build-2.6/src.linux-x86_64-2.6/scipy/sparse/linalg/isolve/iterative/BiCGREVCOM.o build-2.6/temp.linux-x86_64-2.6/build-2.6/src.linux-x86_64-2.6/scipy/sparse/linalg/isolve/iterative/BiCGSTABREVCOM.o build-2.6/temp.linux-x86_64-2.6/build-2.6/src.linux-x86_64-2.6/scipy/sparse/linalg/isolve/iterative/CGREVCOM.o build-2.6/temp.linux-x86_64-2.6/build-2.6/src.linux-x86_64-2.6/scipy/sparse/linalg/isolve/iterative/CGSREVCOM.o build-2.6/temp.linux-x86_64-2.6/build-2.6/src.linux-x86_64-2.6/scipy/sparse/linalg/isolve/iterative/GMRESREVCOM.o build-2.6/temp.linux-x86_64-2.6/build-2.6/src.linux-x86_64-2.6/scipy/sparse/linalg/isolve/iterative/QMRREVCOM.o -L/usr/lib64 -L/usr/lib64 -Lbuild-2.6/temp.linux-x86_64-2.6 -llapack -lblas -lcblas -latlas -lcblas -lblas -latlas -lpython2.6 -lgfortran -o build-2.6/lib.linux-x86_64-2.6/scipy/sparse/linalg/isolve/_iterative.so
building 'scipy.sparse.linalg.dsolve._superlu' extension
compiling C sources
C compiler: x86_64-pc-linux-gnu-gcc -pthread -O2 -pipe -march=core2 -mcx16 -msahf -mpopcnt -msse4.2 --param l1-cache-size=32 --param l1-cache-line-size=64 --param l2-cache-size=8192 -frecord-gcc-switches -g -Wimplicit-function-declaration -fPIC

creating build-2.6/temp.linux-x86_64-2.6/scipy/sparse/linalg/dsolve
compile options: '-DATLAS_INFO="\"3.9.23\"" -I/usr/lib64/python2.6/site-packages/numpy/core/include -I/usr/include/python2.6 -c'
x86_64-pc-linux-gnu-gcc: scipy/sparse/linalg/dsolve/_superlu_utils.c
In file included from scipy/sparse/linalg/dsolve/_superluobject.h:16:0,
                 from scipy/sparse/linalg/dsolve/_superlu_utils.c:8:
/usr/include/superlu/slu_scomplex.h:62:8: error: conflicting types for ‘_Py_c_abs’
/usr/include/python2.6/complexobject.h:30:8: note: previous declaration of ‘_Py_c_abs’ was here
In file included from scipy/sparse/linalg/dsolve/_superluobject.h:16:0,
                 from scipy/sparse/linalg/dsolve/_superlu_utils.c:8:
/usr/include/superlu/slu_scomplex.h:62:8: error: conflicting types for ‘_Py_c_abs’
/usr/include/python2.6/complexobject.h:30:8: note: previous declaration of ‘_Py_c_abs’ was here
error: Command "x86_64-pc-linux-gnu-gcc -pthread -O2 -pipe -march=core2 -mcx16 -msahf -mpopcnt -msse4.2 --param l1-cache-size=32 --param l1-cache-line-size=64 --param l2-cache-size=8192 -frecord-gcc-switches -g -Wimplicit-function-declaration -fPIC -DATLAS_INFO="\"3.9.23\"" -I/usr/lib64/python2.6/site-packages/numpy/core/include -I/usr/include/python2.6 -c scipy/sparse/linalg/dsolve/_superlu_utils.c -o build-2.6/temp.linux-x86_64-2.6/scipy/sparse/linalg/dsolve/_superlu_utils.o" failed with exit status 1
 * ERROR: sci-libs/scipy-0.9.0 failed (compile phase):
 *   Building failed with CPython 2.6 in distutils_building() function
Comment 4 Justin Lecher (RETIRED) gentoo-dev 2011-03-22 07:43:18 UTC
Created attachment 266807 [details, diff]
New patch
Comment 5 François Bissey 2011-03-22 07:55:10 UTC
I hadn't gone that far. Obviously we have a header problem in superLU. There is a definition duplicating a python one. I notice superLU doesn't depend on python why does it have a python header? Or is it bad luck?

I should look at the patch I made for qhull to see if there is a similar problem.
Comment 6 François Bissey 2011-03-24 09:10:09 UTC
Created attachment 267051 [details, diff]
Newest superLU removal patch

OK, it seems that the header causing conflict with python is not needed at all for the python extension. So we can just remove it.
Give this patch a go.
Comment 7 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2011-03-24 15:04:55 UTC
(In reply to comment #6)

Please remove the call to config.add_library() instead of commenting it out.
Comment 8 François Bissey 2011-03-24 22:12:00 UTC
Created attachment 267135 [details, diff]
new patch with Arfrever request

There I removed it.
Comment 9 Justin Lecher (RETIRED) gentoo-dev 2011-03-26 17:10:44 UTC
+*scipy-0.9.0-r1 (26 Mar 2011)
+
+  26 Mar 2011; Justin Lecher <jlec@gentoo.org> scipy-0.8.0.ebuild,
+  scipy-0.9.0.ebuild, +scipy-0.9.0-r1.ebuild, +files/scipy-0.9.0-qhull.patch,
+  +files/scipy-0.9.0-superlu.patch:
+  Unbundled Superlu and Qhull, #357879
+