Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 386269 - sci-libs/scipy-0.9.0-r2 - numpy.distutils.system_info.BlasNotFoundError: Blas (http://www.netlib.org/blas/) libraries not found
Summary: sci-libs/scipy-0.9.0-r2 - numpy.distutils.system_info.BlasNotFoundError: Blas...
Status: RESOLVED TEST-REQUEST
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Unspecified (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Science Related Packages
URL:
Whiteboard:
Keywords:
: 456280 509816 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-10-08 12:56 UTC by Juergen Rose
Modified: 2015-02-19 08:32 UTC (History)
2 users (show)

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


Attachments
updated numpy-15.1 ebuild (numpy-1.5.1.ebuild,4.53 KB, text/plain)
2011-10-18 21:43 UTC, François Bissey
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Juergen Rose 2011-10-08 12:56:28 UTC
'emerge scipy' fails with:
...
RefactoringTool: /var/tmp/portage/sci-libs/scipy-0.9.0-r2/work/scipy-0.9.0/build/py3k/scipy/maxentropy/examples/bergerexample.py
RefactoringTool: Warnings/messages while refactoring:
RefactoringTool: ### In file /var/tmp/portage/sci-libs/scipy-0.9.0-r2/work/scipy-0.9.0/build/py3k/scipy/stats/distributions.py ###
RefactoringTool: Line 479: You should use 'operator.mul([value],product(shape,axis=0),axis=0)' here.
RefactoringTool: ### In file /var/tmp/portage/sci-libs/scipy-0.9.0-r2/work/scipy-0.9.0/build/py3k/scipy/weave/blitz_tools.py ###
RefactoringTool: Line 36: could not convert: raise "inputs failed to pass size check."
RefactoringTool: Python 3 does not support string exceptions
RefactoringTool: ### In file /var/tmp/portage/sci-libs/scipy-0.9.0-r2/work/scipy-0.9.0/build/py3k/scipy/weave/ast_tools.py ###
...
/var/tmp/portage/sci-libs/scipy-0.9.0-r2/work/scipy-0.9.0/build/py3k/scipy/integrate/ode.py
/var/tmp/portage/sci-libs/scipy-0.9.0-r2/work/scipy-0.9.0/build/py3k/scipy/integrate/quadpack.py
blas_opt_info:
blas_mkl_info:
  libraries mkl,vml,guide not found in /usr/local/lib64
  libraries mkl,vml,guide not found in /usr/local/lib
  libraries mkl,vml,guide not found in /usr/lib64
  libraries mkl,vml,guide not found in /usr/lib
  NOT AVAILABLE

atlas_blas_threads_info:
Setting PTATLAS=ATLAS
Warning: No configuration returned, assuming unavailable./usr/lib64/python3.2/site-packages/numpy/distutils/system_info.py:527: UserWarning: Specified path  is invalid.
  warnings.warn('Specified path %s is invalid.' % d)
  libraries atlcblas,f77blas,m,atlas not found in /usr/lib64
  NOT AVAILABLE

atlas_blas_info:
  libraries atlcblas,f77blas,m,atlas not found in /usr/lib64
  NOT AVAILABLE

/usr/lib64/python3.2/site-packages/numpy/distutils/system_info.py:1399: UserWarning: 
    Atlas (http://math-atlas.sourceforge.net/) libraries not found.
    Directories to search for the libraries can be specified in the
    numpy/distutils/site.cfg file (section [atlas]) or by setting
    the ATLAS environment variable.
  warnings.warn(AtlasNotFoundError.__doc__)
blas_info:
  libraries atlcblas,f77blas,m,atlas not found in /usr/lib64
  NOT AVAILABLE

/usr/lib64/python3.2/site-packages/numpy/distutils/system_info.py:1408: UserWarning: 
    Blas (http://www.netlib.org/blas/) libraries not found.
    Directories to search for the libraries can be specified in the
    numpy/distutils/site.cfg file (section [blas]) or by setting
    the BLAS environment variable.
  warnings.warn(BlasNotFoundError.__doc__)
blas_src_info:
  NOT AVAILABLE

/usr/lib64/python3.2/site-packages/numpy/distutils/system_info.py:1411: UserWarning: 
    Blas (http://www.netlib.org/blas/) sources not found.
    Directories to search for the sources can be specified in the
    numpy/distutils/site.cfg file (section [blas_src]) or by setting
    the BLAS_SRC environment variable.
  warnings.warn(BlasSrcNotFoundError.__doc__)
Traceback (most recent call last):
  File "setup.py", line 181, in <module>
    setup_package()
  File "setup.py", line 173, in setup_package
    configuration=configuration )
  File "/usr/lib64/python3.2/site-packages/numpy/distutils/core.py", line 152, in setup
    config = configuration()
  File "setup.py", line 122, in configuration
    config.add_subpackage('scipy')
  File "/usr/lib64/python3.2/site-packages/numpy/distutils/misc_util.py", line 972, in add_subpackage
    caller_level = 2)
  File "/usr/lib64/python3.2/site-packages/numpy/distutils/misc_util.py", line 941, in get_subpackage
    caller_level = caller_level + 1)
  File "/usr/lib64/python3.2/site-packages/numpy/distutils/misc_util.py", line 878, in _get_configuration_from_setup_py
    config = setup_module.configuration(*args)
  File "scipy/setup.py", line 8, in configuration
    config.add_subpackage('integrate')
  File "/usr/lib64/python3.2/site-packages/numpy/distutils/misc_util.py", line 972, in add_subpackage
    caller_level = 2)
  File "/usr/lib64/python3.2/site-packages/numpy/distutils/misc_util.py", line 941, in get_subpackage
    caller_level = caller_level + 1)
  File "/usr/lib64/python3.2/site-packages/numpy/distutils/misc_util.py", line 878, in _get_configuration_from_setup_py
    config = setup_module.configuration(*args)
  File "scipy/integrate/setup.py", line 10, in configuration
    blas_opt = get_info('blas_opt',notfound_action=2)
  File "/usr/lib64/python3.2/site-packages/numpy/distutils/system_info.py", line 310, in get_info
    return cl().get_info(notfound_action)
  File "/usr/lib64/python3.2/site-packages/numpy/distutils/system_info.py", line 461, in get_info
    raise self.notfounderror(self.notfounderror.__doc__)
numpy.distutils.system_info.BlasNotFoundError: 
    Blas (http://www.netlib.org/blas/) libraries not found.
    Directories to search for the libraries can be specified in the
    numpy/distutils/site.cfg file (section [blas]) or by setting
    the BLAS environment variable.
 * ERROR: sci-libs/scipy-0.9.0-r2 failed (compile phase):
 *   Building failed with CPython 3.2 in distutils_building() function
 * 
 * Call stack:
 *     ebuild.sh, line   91:  Called src_compile
 *   environment, line 6040:  Called distutils_src_compile 'config_fc' '--noopt' '--noarch'
 *   environment, line 1797:  Called python_execute_function 'distutils_building' 'config_fc' '--noopt' '--noarch'
 *   environment, line 4261:  Called die
 * The specific snippet of code:
 *                       die "${failure_message}";



The following versions of atlas and numpy are installed:
root@caiman:/root(17)# qlist -Iv atlas
sci-libs/atlas-3.9.49
root@caiman:/root(18)# qlist -Iv numpy
dev-python/numpy-1.5.1


Reproducible: Always




root@caiman:/root(15)# emerge --info =sci-libs/scipy-0.9.0-r2
Portage 2.1.10.23 (default/linux/amd64/10.0, gcc-4.5.3, glibc-2.13-r4, 3.0.6-gentoo x86_64)
=================================================================
                        System Settings
=================================================================
System uname: Linux-3.0.6-gentoo-x86_64-AMD_Phenom-tm-_II_X6_1090T_Processor-with-gentoo-2.1
Timestamp of tree: Sat, 08 Oct 2011 02:30:01 +0000
app-shells/bash:          4.2_p10
dev-java/java-config:     2.1.11-r3
dev-lang/python:          2.7.2-r3::sage-on-gentoo, 3.2.2
dev-util/cmake:           2.8.5-r2
dev-util/pkgconfig:       0.26
sys-apps/baselayout:      2.1
sys-apps/openrc:          0.9.3-r1
sys-apps/sandbox:         2.5
sys-devel/autoconf:       2.13, 2.68
sys-devel/automake:       1.9.6-r3, 1.10.3, 1.11.1-r1
sys-devel/binutils:       2.21.1-r1
sys-devel/gcc:            4.5.3-r1
sys-devel/gcc-config:     1.4.1-r1
sys-devel/libtool:        2.4-r3
sys-devel/make:           3.82-r3
sys-kernel/linux-headers: 2.6.39 (virtual/os-headers)
sys-libs/glibc:           2.13-r4
Repositories: gentoo sunrise x11 bicatali java-overlay science sage-on-gentoo x-portage x-cpan x-g-octave
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA PUEL dlj-1.1 skype-eula googleearth AdobeFlash-10.1 cadsoft Oracle-BCLA-JavaSE"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=amdfam10 -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt /usr/share/maven-bin-3.0/conf /usr/share/openvpn/easy-rsa /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.3/ext-active/ /etc/php/cgi-php5.3/ext-active/ /etc/php/cli-php5.3/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-march=amdfam10 -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests binpkg-logs distlocks ebuild-locks fixlafiles fixpackages news parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
FFLAGS=""
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="en_US.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="de fr"
MAKEOPTS="-j7"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
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"
PORTDIR_OVERLAY="/var/lib/layman/sunrise /var/lib/layman/x11 /var/lib/layman/bicatali /var/lib/layman/java-overlay /var/lib/layman/science /var/lib/layman/sage-on-gentoo /usr/local/portage /var/lib/cpan /var/lib/g-octave"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="3dnow 3dnowext 64bit R X Xaw3d a52 aac abiword acl acpi admin afs alsa amd64 amrr ao apache2 applet archive arpack asf aspell assistant audacious audiofile automap automount bash-completion berkdb blas blast bluetooth boo boost bzip2 cairo cdda cddb cdf cdio cdparanoia cdr cgi chm cli consolekit corba cracklib crypt css cups curl cxx daap db dbase dbi dbm dbus declarative designer devhelp device-mapper dga dia djvu doc dri ds2490 ds9097 ds9097u dv dvb dvd dvdr dvi dynamicplugin eds elf emacs emboss emf encode epiphany evo examples exif expat extensions extra extras fame ffmpeg fftw firefox fits flac fltk fontconfig foomaticdb fortran fortran95 fpx fts3 fuse galago gcj gd gdal gdbm gdu gedit geoip geolocation geos gfortran gif gimp ginac git glade glib glpk gml gmp gmtsuppl gnome gnome-keyring gnome-print gnuplot gnutls gphoto2 gpm grammar graphics graphtft graphviz grass gs gsl gsm gstreamer gtk gudev guile harness hddtemp hdf hdf5 hdri http httpd hvm hwdb iconv icq icu id3 imagemagick imap innodb inotify ipod ipv6 irda ithreads jabber jadetex java java6 jbig john jpeg jpeg2k kdrive kerberos kpathsea kqemu kvm ladspa lame lapack latex latex3 lcms ldap lensfun libffi libgda libnotify libsamplerate lm_sensors lua lzo mad mail maildir mapnik math matroska mkl mmx mmxext mng modules mono moonlight motif mozilla mp3 mp4 mpeg mpi mplayer mtp mudflap multilib musicbrainz mysql mysqli nautilus ncurses netcdf netpbm network networking networkmanager nfs nls nntp nptl nptlonly nsplugin ntfs ntp numpy obex objc ocaml ocr octave odbc ogdi ogg ole openexr opengl openmp overview pam pcre pda pdf perl plotutils plugins png podcast policykit portaudio posix postgres postscript ppds pppd preview-latex proj projectx pstricks pulseaudio python python-bindings q16 q32 qemu qhull qt3support qt4 quicktime readline reiserfs reports rle romio rpc rrdcgi rrdtool sage samba sasl science sdk sdl secure-delete semantic-desktop server session sip slang slp smbclient smp sms sndfile snmp soup sox speex spell sql sqlite sse sse2 sse4a ssl stlport subtitles subversion suexec svg svm swig sysfs szip t1lib tcl tcpd tex tex4ht texmacs tgif theora threads thunderbird tidy tiff tk tools truetype udev unicode usb userlocales utempter v4l2 vaapi video virtualbox vorbis wav webdav webdav-serf webkit wmf wxwidgets xattr xcb xemacs xext xft xine xml xmlreader xmlrpc xorg xpm xulrunner xv xvid xvmc yaml zlib zvbi" 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 mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic auth_digest authn_anon authn_dbd authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgid dav dav_fs dav_lock dbd deflate dir disk_cache env expires ext_filter file_cache filter headers ident imagemap include info log_config logio mem_cache mime mime_magic negotiation proxy proxy_ajp proxy_balancer proxy_connect proxy_http rewrite setenvif so speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan stage tables krita karbon braindump" CAMERAS="canon" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="de fr" NETBEANS_MODULES="apisupport cnd dlight enterprise ergonomics groovy gsf harness ide identity j2ee java mobility nb php profiler ruby websvccommon xml" PHP_TARGETS="php5-3" QEMU_SOFTMMU_TARGETS="i386 ppc ppc64 x86_64" QEMU_USER_TARGETS="arm i386 x86_64" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="radeon vesa" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS



root@caiman:/root(16)# emerge -pqv =sci-libs/scipy-0.9.0-r2
[ebuild     U ] sci-libs/scipy-0.9.0-r2 [0.9.0-r1] USE="doc -umfpack"
Comment 1 Juergen Rose 2011-10-09 10:27:18 UTC
It seems me, that this bug is connected with numpy-1.5.1. At systems where numpy-1.6.1-r1 is installed, I can also install scipy-0.9.0-r2. At systems where the installation of >numpy-1.5.1 is blocked by sage-4.7.1-r2 'emerge scipy' fails.
Comment 2 François Bissey 2011-10-10 22:58:37 UTC
OK, taking over from the gentoo-science mailing list.
Output of:
eselect blas list 
eselect cblas list
eselect lapack list
And what does the "site.cfg" produced by scipy in src_prepare looks like?
Comment 3 Juergen Rose 2011-10-11 06:44:47 UTC
Hi Francois,

I have:

root@caiman:/root(31)# eselect blas list
Available providers for blas:
  [1]   atlas *
  [2]   atlas-threads
root@caiman:/root(32)# eselect cblas list
Available providers for cblas:
  [1]   atlas *
  [2]   atlas-threads
  [3]   gsl
root@caiman:/root(33)# eselect lapack list
Available providers for lapack:
  [1]   atlas *
  [2]   atlas-threads

I find the following site.cfg under /var/tmp/portage:

root@caiman:/root(38)# find /var/tmp/portage/ -name site.cfg -ls
23145063    4 -rw-r--r--   1 root     root          376 Aug 25 09:37 /var/tmp/portage/sci-libs/scipy-0.9.0-r1/work/scipy-0.9.0/build/py3k/site.cfg
23128011    4 -rw-r--r--   1 root     root          376 Aug 25 09:32 /var/tmp/portage/sci-libs/scipy-0.9.0-r1/work/scipy-0.9.0/site.cfg
27591833    4 -rw-r--r--   1 root     root          203 Oct 11 07:57 /var/tmp/portage/sci-libs/scipy-0.9.0-r2/work/scipy-0.9.0/build/py3k/site.cfg
27560760    4 -rw-r--r--   1 root     root          203 Oct 11 07:52 /var/tmp/portage/sci-libs/scipy-0.9.0-r2/work/scipy-0.9.0/site.cfg


The site.cfg for in work/scipy-0.9.0 and scipy-0.9.0/build/py3k are identical.
The content of /var/tmp/portage/sci-libs/scipy-0.9.0-r2/work/scipy-0.9.0/site.cfg is:

root@caiman:/root(41)# cat /var/tmp/portage/sci-libs/scipy-0.9.0-r2/work/scipy-0.9.0/site.cfg
[blas]
include_dirs = /usr/include/atlas  
library_dirs = :/usr/lib64
blas_libs = atlcblas, f77blas, m, atlas  
[lapack]
library_dirs = :/usr/lib64
lapack_libs = atllapack, f77blas, atlcblas, m, atlas  

Then I still find /usr/lib64/python2.7/site-packages/numpy/distutils/site.cfg /usr/lib64/python3.2/site-packages/numpy/distutils/site.cfg which are also identical.

root@caiman:/root(45)# cat  /usr/lib64/python2.7/site-packages/numpy/distutils/site.cfg
[atlas]
include_dirs = /usr/include/atlas  
library_dirs = :/usr/lib64
atlas_libs = atlcblas, f77blas, m, atlas  
lapack_libs = atllapack, f77blas, atlcblas, m, atlas  
[blas_opt]
include_dirs = /usr/include/atlas  
library_dirs = :/usr/lib64
libraries = atlcblas, f77blas, m, atlas  
[lapack_opt]
library_dirs = :/usr/lib64
libraries = atllapack, f77blas, atlcblas, m, atlas  

Regards Juergen
Comment 4 François Bissey 2011-10-11 21:32:26 UTC
OK. I suddenly realise that your build seems to break in python-3.2.2. Could you confirm if it does work with just python-2.7?
USE_PYTHON="2.7" emerge -uv scipy
Comment 5 Juergen Rose 2011-10-12 05:37:02 UTC
Hi Francois,

USE_PYTHON="2.7" emerge -uv scipy

works without problems.

Juergen
Comment 6 François Bissey 2011-10-12 21:05:46 UTC
OK, so let's put some things straight. scipy doesn't look for site.cfg in its own build directory if it finds one in numpy. It only uses its own if there is none in numpy, this only happens if you build numpy without lapack.

If we force numpy to be built with lapack for scipy then we can drop site.cfg from src_prepare altogether. I guess this fact may have been lost in the noise in the previous bug.

My suspicions here is that the site.cfg from numpy-1.5.1 which has the old syntax doesn't play nice with the combo scipy-0.9.0-r2/python-3.2.2.

Juergen could you replace site.cfg in 
/usr/lib64/python3.2/site-packages/numpy/distutils/site.cfg

by the one generated by scipy (or alternatively just remove it) and then try again.
Comment 7 Juergen Rose 2011-10-14 10:26:08 UTC
Hi Francois,

I now have no access to caiman where the error has originally happened. Now I am sitting at lynx with the same error. 

/var/tmp/portage/sci-libs/scipy-0.9.0-r2/work/scipy-0.9.0/site.cfg

disappeared, because 'USE_PYTHON="2.7" emerge -uv scipy' was succesfull, any other site.cfg belonging to scipy disappeared, because I did 'emerge -C scipy' to do again 'emerge -uvDN world' for emerging scipy-0.9.0-r2. Thus I can't replace /usr/lib64/python3.2/site-packages/numpy/distutils/site.cfg by the one generated by scipy. That's why I renamed it:

root@lynx:/root(15)# mv /usr/lib64/python3.2/site-packages/numpy/distutils/site.cfg  /usr/lib64/python3.2/site-packages/numpy/distutils/site.cfg_orig

The following 'emerge -uvDN world' fails with the old error:

root@lynx:/root(16)# emerge -vuND world
...
RefactoringTool: /var/tmp/portage/sci-libs/scipy-0.9.0-r2/work/scipy-0.9.0/build/py3k/scipy/integrate/setup.py
/var/tmp/portage/sci-libs/scipy-0.9.0-r2/work/scipy-0.9.0/build/py3k/scipy/io/__init__.py
...
/var/tmp/portage/sci-libs/scipy-0.9.0-r2/work/scipy-0.9.0/build/py3k/scipy/integrate/quadpack.py
blas_opt_info:
blas_mkl_info:
  libraries mkl,vml,guide not found in /usr/local/lib64
  libraries mkl,vml,guide not found in /usr/local/lib
  libraries mkl,vml,guide not found in /usr/lib64
  libraries mkl,vml,guide not found in /usr/lib
  NOT AVAILABLE

atlas_blas_threads_info:
Setting PTATLAS=ATLAS
  libraries blas,cblas,atlas not found in /usr/local/lib64
  libraries blas,cblas,atlas not found in /usr/local/lib
  libraries blas,cblas,atlas not found in /usr/lib64
  libraries blas,cblas,atlas not found in /usr/lib
  NOT AVAILABLE

atlas_blas_info:
  libraries blas,cblas,atlas not found in /usr/local/lib64
  libraries blas,cblas,atlas not found in /usr/local/lib
  libraries blas,cblas,atlas not found in /usr/lib64
  libraries blas,cblas,atlas not found in /usr/lib
  NOT AVAILABLE

Warning: No configuration returned, assuming unavailable./usr/lib64/python3.2/site-packages/numpy/distutils/system_info.py:1399: UserWarning: 
    Atlas (http://math-atlas.sourceforge.net/) libraries not found.
    Directories to search for the libraries can be specified in the
    numpy/distutils/site.cfg file (section [atlas]) or by setting
    the ATLAS environment variable.
  warnings.warn(AtlasNotFoundError.__doc__)
blas_info:
/usr/lib64/python3.2/site-packages/numpy/distutils/system_info.py:527: UserWarning: Specified path  is invalid.
  warnings.warn('Specified path %s is invalid.' % d)
  libraries atlcblas,f77blas,m,atlas not found in /usr/lib64
  NOT AVAILABLE

/usr/lib64/python3.2/site-packages/numpy/distutils/system_info.py:1408: UserWarning: 
    Blas (http://www.netlib.org/blas/) libraries not found.
    Directories to search for the libraries can be specified in the
    numpy/distutils/site.cfg file (section [blas]) or by setting
    the BLAS environment variable.
  warnings.warn(BlasNotFoundError.__doc__)
blas_src_info:
  NOT AVAILABLE

/usr/lib64/python3.2/site-packages/numpy/distutils/system_info.py:1411: UserWarning: 
    Blas (http://www.netlib.org/blas/) sources not found.
    Directories to search for the sources can be specified in the
    numpy/distutils/site.cfg file (section [blas_src]) or by setting
    the BLAS_SRC environment variable.
  warnings.warn(BlasSrcNotFoundError.__doc__)
Traceback (most recent call last):
  File "setup.py", line 181, in <module>
    setup_package()
  File "setup.py", line 173, in setup_package
    configuration=configuration )
  File "/usr/lib64/python3.2/site-packages/numpy/distutils/core.py", line 152, in setup
    config = configuration()
  File "setup.py", line 122, in configuration
    config.add_subpackage('scipy')
  File "/usr/lib64/python3.2/site-packages/numpy/distutils/misc_util.py", line 972, in add_subpackage
    caller_level = 2)
  File "/usr/lib64/python3.2/site-packages/numpy/distutils/misc_util.py", line 941, in get_subpackage
    caller_level = caller_level + 1)
  File "/usr/lib64/python3.2/site-packages/numpy/distutils/misc_util.py", line 878, in _get_configuration_from_setup_py
    config = setup_module.configuration(*args)
  File "scipy/setup.py", line 8, in configuration
    config.add_subpackage('integrate')
  File "/usr/lib64/python3.2/site-packages/numpy/distutils/misc_util.py", line 972, in add_subpackage
    caller_level = 2)
  File "/usr/lib64/python3.2/site-packages/numpy/distutils/misc_util.py", line 941, in get_subpackage
    caller_level = caller_level + 1)
  File "/usr/lib64/python3.2/site-packages/numpy/distutils/misc_util.py", line 878, in _get_configuration_from_setup_py
    config = setup_module.configuration(*args)
  File "scipy/integrate/setup.py", line 10, in configuration
    blas_opt = get_info('blas_opt',notfound_action=2)
  File "/usr/lib64/python3.2/site-packages/numpy/distutils/system_info.py", line 310, in get_info
    return cl().get_info(notfound_action)
  File "/usr/lib64/python3.2/site-packages/numpy/distutils/system_info.py", line 461, in get_info
    raise self.notfounderror(self.notfounderror.__doc__)
numpy.distutils.system_info.BlasNotFoundError: 
    Blas (http://www.netlib.org/blas/) libraries not found.
    Directories to search for the libraries can be specified in the
    numpy/distutils/site.cfg file (section [blas]) or by setting
    the BLAS environment variable.
 * ERROR: sci-libs/scipy-0.9.0-r2 failed (compile phase):
 *   Building failed with CPython 3.2 in distutils_building() function
Comment 8 Juergen Rose 2011-10-14 11:38:02 UTC
Next attempt, I copied the site.cfg from scipy to numpy:

root@lynx:/root(24)# cp -a /var/tmp/portage/sci-libs/scipy-0.9.0-r2/work/scipy-0.9.0/site.cfg /usr/lib64/python3.2/site-packages/numpy/distutils/

'emerge -vuND world' fails with:
...

/usr/lib64/python3.2/site-packages/numpy/distutils/system_info.py:1411: UserWarning: 
    Blas (http://www.netlib.org/blas/) sources not found.
    Directories to search for the sources can be specified in the
    numpy/distutils/site.cfg file (section [blas_src]) or by setting
    the BLAS_SRC environment variable.
  warnings.warn(BlasSrcNotFoundError.__doc__)
Traceback (most recent call last):
...
 * ERROR: sci-libs/scipy-0.9.0-r2 failed (compile phase):
 *   Building failed with CPython 3.2 in distutils_building() function


Next test: I delete sage and try once more:

root@lynx:/root(27)# emerge -C sage
root@lynx:/root(28)# emerge -pvuND world

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild     U  ] dev-python/pexpect-2.4-r1 [2.0] USE="doc%* examples%*" 111 kB [1]
[ebuild     U  ] dev-python/numpy-1.6.1-r1 [1.5.1] USE="doc lapack -test" 18,029 kB [0]
[ebuild  N     ] sci-libs/scipy-0.9.0-r2  USE="doc -umfpack" 0 kB [0]
root@lynx:/root(29)# emerge -vuND world

works like a charm.
Comment 9 François Bissey 2011-10-14 18:51:34 UTC
I'll have to scratch my head a little bit more on that one. First off it looks like a python-3.2.2 problem, I cannot reproduce it with python-3.1. site.cfg is at fault but there has to be something else.
Comment 10 François Bissey 2011-10-18 21:43:38 UTC
Created attachment 290207 [details]
updated numpy-15.1 ebuild

OK the attached ebuild migrate numpy-1.5.1 to the new style style.cfg. It works here but of course I didn't check with python-3.2.2.

Could you try this to build numpy-1.5.1 and then scipy?
Comment 11 Juergen Rose 2011-10-19 13:50:34 UTC
I created a local overlay /usr/local/portage/dev-python/numpy, put the new numpy-1.5.1.ebuild to that overlay, generated a new manifest, masked again >=dev-python/numpy-1.6.0 in /etc/portage/packages.mask. The next 'emerge -v1 numpy' 
downgrades succesfully numpy to numpy-1.5.1:

root@lynx:/usr/local/portage/dev-python/numpy(30)# ebuild numpy-1.5.1.ebuild digest
>>> Creating Manifest for /usr/local/portage/dev-python/numpy
root@lynx:/usr/local/portage/dev-python/numpy(31)# emerge -v1 numpy

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild     UD ] dev-python/numpy-1.5.1 [1.6.1-r1] USE="doc lapack -test" 18,067 kB [0=>1]

Total: 1 package (1 downgrade), Size of downloads: 18,067 kB
Portage tree and overlays:
 [0] /usr/portage
 [1] /usr/local/portage
...
>>> dev-python/numpy-1.5.1 merged.
>>> Auto-cleaning packages...
>>> No outdated packages were found on your system.
 * GNU info directory index is up-to-date.

The subsequent 'emerge -v1 scipy' fails again as far as I see with the same error:

root@lynx:/usr/local/portage/dev-python/numpy(32)# emerge -v1 scipy
These are the packages that would be merged, in order:
Calculating dependencies... done!
[ebuild   R    ] sci-libs/scipy-0.9.0-r2  USE="doc -umfpack" 0 kB
Total: 1 package (1 reinstall), Size of downloads: 0 kB
>>> Verifying ebuild manifests
>>> Emerging (1 of 1) sci-libs/scipy-0.9.0-r2
...
RefactoringTool: /var/tmp/portage/sci-libs/scipy-0.9.0-r2/work/scipy-0.9.0/build/py3k/scipy/maxentropy/examples/bergerexample.py
RefactoringTool: Warnings/messages while refactoring:
RefactoringTool: ### In file /var/tmp/portage/sci-libs/scipy-0.9.0-r2/work/scipy-0.9.0/build/py3k/scipy/stats/distributions.py ###
RefactoringTool: Line 479: You should use 'operator.mul([value],product(shape,axis=0),axis=0)' here.
RefactoringTool: ### In file /var/tmp/portage/sci-libs/scipy-0.9.0-r2/work/scipy-0.9.0/build/py3k/scipy/weave/blitz_tools.py ###
RefactoringTool: Line 36: could not convert: raise "inputs failed to pass size check."
RefactoringTool: Python 3 does not support string exceptions
RefactoringTool: ### In file /var/tmp/portage/sci-libs/scipy-0.9.0-r2/work/scipy-0.9.0/build/py3k/scipy/weave/ast_tools.py ###
RefactoringTool: Line 183: cannot convert map(None, ...) with multiple arguments because map() now truncates to the shortest sequence
RefactoringTool: Line 183: cannot convert map(None, ...) with multiple arguments because map() now truncates to the shortest sequence
RefactoringTool: ### In file /var/tmp/portage/sci-libs/scipy-0.9.0-r2/work/scipy-0.9.0/build/py3k/scipy/weave/bytecodecompiler.py ###
RefactoringTool: Line 1157: cannot convert map(None, ...) with multiple arguments because map() now truncates to the shortest sequence
RefactoringTool: Line 1157: cannot convert map(None, ...) with multiple arguments because map() now truncates to the shortest sequence
RefactoringTool: Line 150: cannot convert map(None, ...) with multiple arguments because map() now truncates to the shortest sequence
RefactoringTool: Line 150: cannot convert map(None, ...) with multiple arguments because map() now truncates to the shortest sequence
RefactoringTool: ### In file /var/tmp/portage/sci-libs/scipy-0.9.0-r2/work/scipy-0.9.0/build/py3k/scipy/weave/bytecodecompiler.py ###
RefactoringTool: Line 242: could not convert: raise "Executing code failed."
RefactoringTool: Python 3 does not support string exceptions
RefactoringTool: ### In file /var/tmp/portage/sci-libs/scipy-0.9.0-r2/work/scipy-0.9.0/build/py3k/scipy/weave/c_spec.py ###
RefactoringTool: Line 380: absolute and local imports together
RefactoringTool: ### In file /var/tmp/portage/sci-libs/scipy-0.9.0-r2/work/scipy-0.9.0/build/py3k/scipy/interpolate/fitpack.py ###
RefactoringTool: Line 1173: cannot convert map(None, ...) with multiple arguments because map() now truncates to the shortest sequence
RefactoringTool: Line 1173: cannot convert map(None, ...) with multiple arguments because map() now truncates to the shortest sequence
RefactoringTool: Skipping implicit fixer: buffer
...
/var/tmp/portage/sci-libs/scipy-0.9.0-r2/work/scipy-0.9.0/build/py3k/scipy/integrate/ode.py
/var/tmp/portage/sci-libs/scipy-0.9.0-r2/work/scipy-0.9.0/build/py3k/scipy/integrate/quadpack.py
blas_opt_info:
blas_mkl_info:
  libraries mkl,vml,guide not found in /usr/local/lib64
  libraries mkl,vml,guide not found in /usr/local/lib
  libraries mkl,vml,guide not found in /usr/lib64
  libraries mkl,vml,guide not found in /usr/lib
  NOT AVAILABLE

atlas_blas_threads_info:
Setting PTATLAS=ATLAS
  libraries blas,cblas,atlas not found in /usr/local/lib64
  libraries blas,cblas,atlas not found in /usr/local/lib
  libraries blas,cblas,atlas not found in /usr/lib64
  libraries blas,cblas,atlas not found in /usr/lib
  NOT AVAILABLE

atlas_blas_info:
  libraries blas,cblas,atlas not found in /usr/local/lib64
  libraries blas,cblas,atlas not found in /usr/local/lib
  libraries blas,cblas,atlas not found in /usr/lib64
  libraries blas,cblas,atlas not found in /usr/lib
  NOT AVAILABLE

Warning: No configuration returned, assuming unavailable./usr/lib64/python3.2/site-packages/numpy/distutils/system_info.py:1399: UserWarning: 
    Atlas (http://math-atlas.sourceforge.net/) libraries not found.
    Directories to search for the libraries can be specified in the
    numpy/distutils/site.cfg file (section [atlas]) or by setting
    the ATLAS environment variable.
  warnings.warn(AtlasNotFoundError.__doc__)
blas_info:
/usr/lib64/python3.2/site-packages/numpy/distutils/system_info.py:527: UserWarning: Specified path  is invalid.
  warnings.warn('Specified path %s is invalid.' % d)
  libraries atlcblas,f77blas,m,atlas not found in /usr/lib64
  NOT AVAILABLE

/usr/lib64/python3.2/site-packages/numpy/distutils/system_info.py:1408: UserWarning: 
    Blas (http://www.netlib.org/blas/) libraries not found.
    Directories to search for the libraries can be specified in the
    numpy/distutils/site.cfg file (section [blas]) or by setting
    the BLAS environment variable.
  warnings.warn(BlasNotFoundError.__doc__)
blas_src_info:
  NOT AVAILABLE

/usr/lib64/python3.2/site-packages/numpy/distutils/system_info.py:1411: UserWarning: 
    Blas (http://www.netlib.org/blas/) sources not found.
    Directories to search for the sources can be specified in the
    numpy/distutils/site.cfg file (section [blas_src]) or by setting
    the BLAS_SRC environment variable.
  warnings.warn(BlasSrcNotFoundError.__doc__)
Traceback (most recent call last):
  File "setup.py", line 181, in <module>
    setup_package()
  File "setup.py", line 173, in setup_package
    configuration=configuration )
  File "/usr/lib64/python3.2/site-packages/numpy/distutils/core.py", line 152, in setup
    config = configuration()
  File "setup.py", line 122, in configuration
    config.add_subpackage('scipy')
  File "/usr/lib64/python3.2/site-packages/numpy/distutils/misc_util.py", line 972, in add_subpackage
    caller_level = 2)
  File "/usr/lib64/python3.2/site-packages/numpy/distutils/misc_util.py", line 941, in get_subpackage
    caller_level = caller_level + 1)
  File "/usr/lib64/python3.2/site-packages/numpy/distutils/misc_util.py", line 878, in _get_configuration_from_setup_py
    config = setup_module.configuration(*args)
  File "scipy/setup.py", line 8, in configuration
    config.add_subpackage('integrate')
  File "/usr/lib64/python3.2/site-packages/numpy/distutils/misc_util.py", line 972, in add_subpackage
    caller_level = 2)
  File "/usr/lib64/python3.2/site-packages/numpy/distutils/misc_util.py", line 941, in get_subpackage
    caller_level = caller_level + 1)
  File "/usr/lib64/python3.2/site-packages/numpy/distutils/misc_util.py", line 878, in _get_configuration_from_setup_py
    config = setup_module.configuration(*args)
  File "scipy/integrate/setup.py", line 10, in configuration
    blas_opt = get_info('blas_opt',notfound_action=2)
  File "/usr/lib64/python3.2/site-packages/numpy/distutils/system_info.py", line 310, in get_info
    return cl().get_info(notfound_action)
  File "/usr/lib64/python3.2/site-packages/numpy/distutils/system_info.py", line 461, in get_info
    raise self.notfounderror(self.notfounderror.__doc__)
numpy.distutils.system_info.BlasNotFoundError: 
    Blas (http://www.netlib.org/blas/) libraries not found.
    Directories to search for the libraries can be specified in the
    numpy/distutils/site.cfg file (section [blas]) or by setting
    the BLAS environment variable.
 * ERROR: sci-libs/scipy-0.9.0-r2 failed (compile phase):
 *   Building failed with CPython 3.2 in distutils_building() function
 * 
 * Call stack:
 *     ebuild.sh, line   91:  Called src_compile
 *   environment, line 6032:  Called distutils_src_compile 'config_fc' '--noopt' '--noarch'
 *   environment, line 1820:  Called python_execute_function 'distutils_building' 'config_fc' '--noopt' '--noarch'
 *   environment, line 4253:  Called die
 * The specific snippet of code:
 *                       die "${failure_message}";
Comment 12 François Bissey 2011-10-19 21:05:37 UTC
Thanks for trying. Back to head scratching. This is specific to python-3.2 but cannot fathom what yet. May be some incompatibilities between numpy-1.5.1 distutils and python-3.2.2 (how did it install in the first place then?).
Actually can you attach a build log of numpy-1.5.1 in case there is some interesting info in there.
Comment 13 Thomas Kahle (RETIRED) gentoo-dev 2012-06-03 08:45:26 UTC
I also ran into this, but it seems to be working with scipy-0.10.1.
Maybe this bug can be closed as fixed upstream.
Comment 14 Thomas Kahle (RETIRED) gentoo-dev 2012-06-03 10:35:59 UTC
(In reply to comment #13)
> I also ran into this, but it seems to be working with scipy-0.10.1.
> Maybe this bug can be closed as fixed upstream.

I take that back.  Just ran into it again on scipy-0.10.1  Completly mysterious why it works sometimes and fails on a revdep rebuild run later...
Comment 15 Olaf Leidinger 2013-08-27 14:49:25 UTC
Just a thought: I noticed today, that neither scipy-0.9 nor scipy-0.12 want to compile on my system. Yet, it doesn't depend on the python version. The problem seems to be the generated site.cfg:

[blas]
include_dirs = /opt/intel/composerxe-2013_update4.5.192/mkl/include 
library_dirs = /opt/intel/composerxe-2013_update4.5.192/mkl/lib/intel64 :/usr/lib64
blas_libs = mkl_rt,mkl_rt
[lapack]
library_dirs = /opt/intel/composerxe-2013_update4.5.192/mkl/lib/intel64 :/usr/lib64
lapack_libs = mkl_rt


note the space in library_dirs. Removing it manually, and calling

/usr/bin/python3.2 setup.py build --build-base /var/tmp/portage/sci-libs/scipy-0.12.0/work/scipy-0.12.0-python3_2/build --build-platlib /var/tmp/portage/sci-libs/scipy-0.12.0/work/scipy-0.12.0-python3_2/build/lib --build-purelib /var/tmp/portage/sci-libs/scipy-0.12.0/work/scipy-0.12.0-python3_2/build/lib --build-scripts /var/tmp/portage/sci-libs/scipy-0.12.0/work/scipy-0.12.0-python3_2/build/scripts config_fc --noopt --noarc

setup works just fine.

So I'm wondering how to fix this in the ebuild.

echo "$(pkg-config --libs-only-L cblas blas):hhh" yields:

-L/opt/intel/composerxe-2013_update4.5.192/mkl/lib/intel64 :hhh

So the space is there already. I'm wondering if :${libdir} from

library_dirs = $(pc_libdir cblas blas):${libdir}

as written in the ebuild is needed. If $libdir is always /usr/lib64 it should be really unnecessary. I'd either remove ${libdir}, or trim the whitespace of the pc_libdir command, maybe by writing

$(pc_libdir cblas blas | sed -e 's/ *$//g') -- which works for me
Comment 16 Jeroen Roovers (RETIRED) gentoo-dev 2014-05-08 11:20:03 UTC
*** Bug 509816 has been marked as a duplicate of this bug. ***
Comment 17 Jeroen Roovers (RETIRED) gentoo-dev 2014-05-08 11:21:53 UTC
*** Bug 456280 has been marked as a duplicate of this bug. ***
Comment 18 Justin Lecher (RETIRED) gentoo-dev 2015-02-19 08:32:22 UTC
Please see whether this is still valid for scipy 0.14/0.15.