Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 321737 - dev-python/numpy-1.4.1 with sci-libs/mkl-10.0.5.025: "ImportError: /usr/lib64/libblas.so.0: invalid ELF header"
Summary: dev-python/numpy-1.4.1 with sci-libs/mkl-10.0.5.025: "ImportError: /usr/lib64...
Status: RESOLVED DUPLICATE of bug 273206
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Python Gentoo Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-05-27 21:28 UTC by Nicolas Pinto
Modified: 2011-01-15 01:30 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 Nicolas Pinto 2010-05-27 21:28:18 UTC
After emerging sci-libs/mkl-10.0.5.025 and sci-libs/numpy-1.4.1,

python -c "import numpy"

gives:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/usr/lib64/python2.6/site-packages/numpy/__init__.py", line 132, in <module>
    import add_newdocs
  File "/usr/lib64/python2.6/site-packages/numpy/add_newdocs.py", line 9, in <module>
    from lib import add_newdoc
  File "/usr/lib64/python2.6/site-packages/numpy/lib/__init__.py", line 13, in <module>
    from polynomial import *
  File "/usr/lib64/python2.6/site-packages/numpy/lib/polynomial.py", line 17, in <module>
    from numpy.linalg import eigvals, lstsq
  File "/usr/lib64/python2.6/site-packages/numpy/linalg/__init__.py", line 47, in <module>
    from linalg import *
  File "/usr/lib64/python2.6/site-packages/numpy/linalg/linalg.py", line 22, in <module>
    from numpy.linalg import lapack_lite
ImportError: /usr/lib64/libblas.so.0: invalid ELF header


Reproducible: Always

Steps to Reproduce:
1. ACCEPT_KEYWORDS='~amd64' emerge -u mkl && eselect cblas set mkl-gfortran-threads && eselect blas set mkl-gfortran-threads

2. USE="test blas lapack" ACCEPT_KEYWORDS='~amd64' emerge setuptools nose =numpy-1.4.1

3. python -c "import numpy"
Comment 1 Sébastien Fabbro (RETIRED) gentoo-dev 2010-06-04 15:41:34 UTC
Unfortunately mkl in Gentoo is fairly broken, we have not found the time or people to take good care of this package.
Comment 2 Sébastien Fabbro (RETIRED) gentoo-dev 2010-06-04 15:41:44 UTC

*** This bug has been marked as a duplicate of bug 273206 ***
Comment 3 Ilya Osadchiy 2011-01-15 01:30:51 UTC
I had similar problem with octave and mkl (ld returns "invalid ELF header") 
I see that the problematic file (/opt/intel/mkl/10.0.5.025/lib/em64t/libmkl.so) is actually a text file with a single line:
GROUP (libmkl_intel_lp64.so libmkl_intel_thread.so libmkl_core.so)

As far as I understood from `man ld`, it may be used for scripting during linkage but not for dynamic linking.
So what I did was:
ld -o libmkl_my.so --shared -L /opt/intel/mkl/10.0.5.025/lib/em64t/ -lmkl

This creates a valid so from that script. Then I created a symlink from libblas.so to libmkl_my.so

This seemed to work, at least octave starts.
I now have some problems with using it from octave (like eig(Mat) giving "invalid parameter"), but I suppose it is unrelated (seems like incompatible ABI :-( )