Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 224085 - sci-libs/scipy-0.6.0-r4 with sci-libs/mkl-10.0.3.020 - ld: cannot find libmkl_intel_lp64.so
Summary: sci-libs/scipy-0.6.0-r4 with sci-libs/mkl-10.0.3.020 - ld: cannot find libmkl...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal
Assignee: Gentoo Science Related Packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-05-29 13:00 UTC by Peter.Bienstman
Modified: 2011-01-14 15:02 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 Peter.Bienstman 2008-05-29 13:00:18 UTC
I just installed MKL 10.0.3.020,set blas, cblas and lapack to mkl-gfortran-threads, and ran env-update

emerging scipy-0.6.0-r4 now fails with:
compile options: '-I/usr/lib64/python2.4/site-packages/numpy/core/include -I/usr/include/python2.4 -c'
x86_64-pc-linux-gnu-gcc: scipy/integrate/_quadpackmodule.c
/usr/bin/gfortran -Wall -shared build/temp.linux-x86_64-2.4/scipy/integrate/_quadpackmodule.o -Lbuild/temp.linux-x86_64-2.4 -lquadpack -llinpack_lite -lmach -lgfortran -o build/lib.linux-x86_64-2.4/scipy/integrate/_quadpack.so
building 'scipy.integrate._odepack' extension
compiling C sources
C compiler: x86_64-pc-linux-gnu-gcc -pthread -fno-strict-aliasing -DNDEBUG -march=nocona -O2 -pipe -fPIC

compile options: '-DNO_ATLAS_INFO=1 -I/usr/lib64/python2.4/site-packages/numpy/core/include -I/usr/include/python2.4 -c'
x86_64-pc-linux-gnu-gcc: scipy/integrate/_odepackmodule.c
/usr/bin/gfortran -Wall -shared build/temp.linux-x86_64-2.4/scipy/integrate/_odepackmodule.o -L/usr/lib64 -Lbuild/temp.linux-x86_64-2.4 -lodepack -llinpack_lite -lmach -lblas -lgfortran -o build/lib.linux-x86_64-2.4/scipy/integrate/_odepack.so
/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.2/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find libmkl_intel_lp64.so
collect2: ld returned 1 exit status
/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.2/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find libmkl_intel_lp64.so
collect2: ld returned 1 exit status
error: Command "/usr/bin/gfortran -Wall -shared build/temp.linux-x86_64-2.4/scipy/integrate/_odepackmodule.o -L/usr/lib64 -Lbuild/temp.linux-x86_64-2.4 -lodepack -llinpack_lite -lmach -lblas -lgfortran -o build/lib.linux-x86_64-2.4/scipy/integrate/_odepack.so" failed with exit status 1


Reproducible: Always




Portage 2.1.4.4 (default-linux/amd64/2007.0/desktop, gcc-4.1.2, glibc-2.6.1-r0, 2.6.24-gentoo-r4 x86_64)
=================================================================
System uname: 2.6.24-gentoo-r4 x86_64 Intel(R) Core(TM)2 CPU 6400 @ 2.13GHz
Timestamp of tree: Wed, 28 May 2008 01:33:01 +0000
app-shells/bash:     3.2_p33
dev-java/java-config: 1.3.7, 2.1.6
dev-lang/python:     2.4.4-r9
dev-python/pycrypto: 2.0.1-r6
sys-apps/baselayout: 1.12.11.1
sys-apps/sandbox:    1.2.18.1-r2
sys-devel/autoconf:  2.13, 2.61-r1
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.1
sys-devel/binutils:  2.18-r1
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   1.5.26
virtual/os-headers:  2.6.23-r3
ACCEPT_KEYWORDS="amd64"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=nocona -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/kde/4.0/env /usr/kde/4.0/share/config /usr/kde/4.0/shutdown /usr/share/config"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/revdep-rebuild /etc/terminfo /etc/texmf/web2c /etc/udev/rules.d"
CXXFLAGS="-O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="distlocks metadata-transfer sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="ftp://ftp.belnet.be/mirror/rsync.gentoo.org/gentoo/ ftp://distro.ibiblio.org/pub/linux/distributions/gentoo/"
LINGUAS="en nl"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X aalib acl acpi alsa amd64 arts atlas avi bash-completion berkdb cairo cdr cli cracklib crypt cups curl cvs dbus dri dvd dvdr dvdread eds emboss encode esd evo f77 fam firefox flac fortran gdbm gif gnome gphoto2-gnome gpm gstreamer gtk hal iconv imap imlib ipv6 isdnlog jpeg kde kerberos libwww mad midi mikmod mmx mp3 mpeg mudflap ncurses nls nptl nptlonly nsplugin ntplonly nvidia ogg oggvorbis opengl openmp oss pam pcre pda pdf pdflib perl pic png pppd prelink python qt3 qt3support qt4 qtmt quicktime readline reflection samba sdl session smime snmp spell spl sqlite sse sse2 ssl subversion svg tcltk tcpd tetex tiff tk truetype unicode vorbis xml xorg xv zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en nl" USERLAND="GNU" VIDEO_CARDS="nvidia"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY
Comment 1 Sébastien Fabbro (RETIRED) gentoo-dev 2008-05-30 13:09:36 UTC
Hi Peter,

This seems to be a recurrent problem both with tricky mkl linking and numpy.distutils automagics. 

I will try to investigate this in greater details later on, but could you try the following:
* check first that /opt/intel/mkl/10.0.3.020/lib/em64t is really loaded in /etc/ld.so.conf
* if yes, try removing the "pthread" in the *.pc files in this same directory.

Also does numpy compiles ok?


Comment 2 Peter.Bienstman 2008-05-30 13:23:31 UTC
> check first that /opt/intel/mkl/10.0.3.020/lib/em64t is really loaded in
/etc/ld.so.conf

That directory is present in that file.

> if yes, try removing the "pthread" in the *.pc files in this same directory.

I edited these six files to remove -lpthread, did an env-update, and tried reemerging scipy. Same error.

Numpy compiles fine.

Thanks for looking into this!
Comment 3 Sébastien Fabbro (RETIRED) gentoo-dev 2008-06-23 09:24:44 UTC
I've just committed a few fixes to mkl, numpy and scipy. Could you give it a try when it hits the mirrors?
Note that with mkl-10.0.3.020 fails numpy tests with a MKL_FATAL_ERROR which I still dont' not understand where it comes from.

Comment 4 Peter.Bienstman 2008-06-24 19:56:36 UTC
This seems to have been fixed for scipy, but not for my own code which I develop locally on my machine.

Incidentally the same symptoms happen when you try to emerge camfr:

scons: Building targets ...
g++ -shared -o camfr/_camfr.so camfr/material.os camfr/coord.os camfr/field.os camfr/mode.os camfr/waveguide.os camfr/scatterer.os camfr/chunk.os camfr/interface.os camfr/icache.os camfr/expression.os camfr/stack.os camfr/S_scheme.os camfr/T_scheme.os camfr/S_scheme_fields.os camfr/T_scheme_fields.os camfr/cavity.os camfr/bloch.os camfr/infstack.os camfr/util/cvector.os camfr/util/index.os camfr/util/tracesorter.os camfr/math/bessel/bessel.os camfr/math/linalg/linalg.os camfr/math/calculus/root/root.os camfr/math/calculus/croot/allroots.os camfr/math/calculus/croot/contour.os camfr/math/calculus/croot/patterson_z_n.os camfr/math/calculus/croot/mueller.os camfr/math/calculus/polyroot/polyroot.os camfr/math/calculus/traceroot/traceroot.os camfr/math/calculus/quadrature/patterson.os camfr/math/calculus/quadrature/patterson_quad.os camfr/math/calculus/minimum/minimum.os camfr/math/calculus/fourier/fourier.os camfr/primitives/planar/planar.os camfr/primitives/circ/circ.os camfr/primitives/circ/circmode.os camfr/primitives/circ/circdisp.os camfr/primitives/circ/circoverlap.os camfr/primitives/circ/circ_M_util.os camfr/primitives/slab/generalslab.os camfr/primitives/slab/slabmatrixcache.os camfr/primitives/slab/isoslab/slab.os camfr/primitives/slab/isoslab/slaboverlap.os camfr/primitives/slab/isoslab/slabdisp.os camfr/primitives/slab/isoslab/slabwall.os camfr/primitives/slab/isoslab/slabmode.os camfr/primitives/section/section.os camfr/primitives/section/sectionmode.os camfr/primitives/section/sectiondisp.os camfr/primitives/section/sectionoverlap.os camfr/primitives/section/refsection.os camfr/primitives/blochsection/blochsection.os camfr/primitives/blochsection/blochsectionmode.os camfr/primitives/blochsection/blochsectionoverlap.os camfr/defs.os camfr/math/bessel/slatec/limits.os camfr/camfr_wrap.os camfr/camfr_wrap_2.os camfr/math/calculus/polyroot/jenkins_traub.os camfr/math/bessel/slatec/dyairy.os camfr/math/bessel/slatec/xerhlt.os camfr/math/bessel/slatec/zbesh.os camfr/math/bessel/slatec/zlog.os camfr/math/bessel/slatec/zuni1.os camfr/math/bessel/slatec/d1mach.os camfr/math/bessel/slatec/dbesy1.os camfr/math/bessel/slatec/fdump.os camfr/math/bessel/slatec/xermsg.os camfr/math/bessel/slatec/zbesj.os camfr/math/bessel/slatec/zmlri.os camfr/math/bessel/slatec/zuni2.os camfr/math/bessel/slatec/dbesy.os camfr/math/bessel/slatec/i1mach.os camfr/math/bessel/slatec/xerprn.os camfr/math/bessel/slatec/zbesy.os camfr/math/bessel/slatec/zmlt.os camfr/math/bessel/slatec/zunik.os camfr/math/bessel/slatec/d9b0mp.os camfr/math/bessel/slatec/dbsynu.os camfr/math/bessel/slatec/initds.os camfr/math/bessel/slatec/xersve.os camfr/math/bessel/slatec/zbinu.os camfr/math/bessel/slatec/zrati.os camfr/math/bessel/slatec/zunk1.os camfr/math/bessel/slatec/d9b1mp.os camfr/math/bessel/slatec/dcsevl.os camfr/math/bessel/slatec/j4save.os camfr/math/bessel/slatec/xgetua.os camfr/math/bessel/slatec/zbknu.os camfr/math/bessel/slatec/zs1s2.os camfr/math/bessel/slatec/zunk2.os camfr/math/bessel/slatec/d9lgmc.os camfr/math/bessel/slatec/dgamlm.os camfr/math/bessel/slatec/zabs.os camfr/math/bessel/slatec/zbuni.os camfr/math/bessel/slatec/zseri.os camfr/math/bessel/slatec/zuoik.os camfr/math/bessel/slatec/dasyjy.os camfr/math/bessel/slatec/dgamln.os camfr/math/bessel/slatec/zacai.os camfr/math/bessel/slatec/zbunk.os camfr/math/bessel/slatec/zshch.os camfr/math/bessel/slatec/zwrsk.os camfr/math/bessel/slatec/dbesj0.os camfr/math/bessel/slatec/dgamma.os camfr/math/bessel/slatec/zacon.os camfr/math/bessel/slatec/zdiv.os camfr/math/bessel/slatec/zsqrt.os camfr/math/bessel/slatec/dbesj1.os camfr/math/bessel/slatec/djairy.os camfr/math/bessel/slatec/zairy.os camfr/math/bessel/slatec/zexp.os camfr/math/bessel/slatec/zuchk.os camfr/math/bessel/slatec/dbesj.os camfr/math/bessel/slatec/dlngam.os camfr/math/bessel/slatec/xercnt.os camfr/math/bessel/slatec/zasyi.os camfr/math/bessel/slatec/zkscl.os camfr/math/bessel/slatec/zunhj.os camfr/math/bessel/slatec/dbesy0.os -lboost_python -lblitz -llapack -lblas -lgfortran
/usr/lib/gcc/i686-pc-linux-gnu/4.1.2/../../../../i686-pc-linux-gnu/bin/ld: cannot find libmkl_intel.so

Would it be possible to solve this compelety at the level of the mkl ebuilds, and not at the level of the apps that use mkl? In this way, it would also work for people's locally developed software.
Comment 5 Sébastien Fabbro (RETIRED) gentoo-dev 2008-06-25 12:05:48 UTC
(In reply to comment #4)
> This seems to have been fixed for scipy, but not for my own code which I
> develop locally on my machine.
> 
> Incidentally the same symptoms happen when you try to emerge camfr:
> 
> scons: Building targets ...
[...]
> camfr/math/bessel/slatec/dbesy0.os -lboost_python -lblitz -llapack -lblas
> -lgfortran
> /usr/lib/gcc/i686-pc-linux-gnu/4.1.2/../../../../i686-pc-linux-gnu/bin/ld:
> cannot find libmkl_intel.so
> 
> Would it be possible to solve this compelety at the level of the mkl ebuilds,
> and not at the level of the apps that use mkl? In this way, it would also work
> for people's locally developed software.

mkl has a fairly complex way of linking their libs, and it's not a one to one corespondance with the blas,cblas, and lapack. I don't think we can make it much simpler for the mkl-dependent ebuilds than now without a serious update to our blas/lapack system.
I don't know if you are aware, but we changed our blas/lapack implementations a bit [1] last year.
Basically linking lapack library is simply done with pkg-config --libs lapack.
Concerning camfr, taking a quick look at the ebuild shows it does not use the gentoo specific pkg-config. I'll have a deeper look at it later unless you come up with a fix.

[1] http://www.gentoo.org/proj/en/science/blas-lapack.xml

Comment 6 Peter.Bienstman 2008-06-25 12:31:44 UTC
OK, I managed to get my software to compile, but when I try to run it, I get the same as reported here:

http://softwarecommunity.intel.com/isn/Community/en-US/forums/thread/30255007.aspx

I guess this is also the fatal error you were talking about..

Peter
Comment 7 Sébastien Fabbro (RETIRED) gentoo-dev 2008-07-02 13:56:57 UTC
http://softwarecommunity.intel.com/isn/Community/en-US/forums/thread/30255007.aspx
> 
> I guess this is also the fatal error you were talking about..

It seems it the same. I was hoping Intel would issue a fixed mkl, but I may have to work out an earlier mkl version.
Meanwhile, I fixed camfr for a better lapack integration. You might want to take a look at the changes to the ebuild since you're upstream :) It includes also a gcc-4.3 patch.
Closing this bug since the initial issue seems to have disappear.
Thanks.

Comment 8 Peter.Bienstman 2008-07-04 15:29:15 UTC
For camfr I get:

 * Applying camfr-20070717-gcc43.patch ...                                [ ok ]
sed: -e expression #1, char 5: unterminated `s' command

and later:

<snip> camfr/math/bessel/slatec/zkscl.os camfr/math/bessel/slatec/zunhj.os camfr/math/bessel/slatec/dbesy0.os -Lcamfr -lboost_python -lblitz -lmkl_gf_lp64 -lmkl_gnu_thread -lmkl_core -liomp5 -lpthread
/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.2/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find -lmkl_gf_lp64

Comment 9 Sébastien Fabbro (RETIRED) gentoo-dev 2008-07-04 18:32:54 UTC
(In reply to comment #8)
> For camfr I get:
> 
>  * Applying camfr-20070717-gcc43.patch ...                                [ ok
> ]
> sed: -e expression #1, char 5: unterminated `s' command
> 
> and later:
> 
> <snip> camfr/math/bessel/slatec/zkscl.os camfr/math/bessel/slatec/zunhj.os
> camfr/math/bessel/slatec/dbesy0.os -Lcamfr -lboost_python -lblitz -lmkl_gf_lp64
> -lmkl_gnu_thread -lmkl_core -liomp5 -lpthread
> /usr/lib/gcc/x86_64-pc-linux-gnu/4.1.2/../../../../x86_64-pc-linux-gnu/bin/ld:
> cannot find -lmkl_gf_lp64

Sould be fixed now (please open a new bug if not).