Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

numpy fails to compile with SAGE_ATLAS_LIB #20524

Closed
vbraun opened this issue Apr 30, 2016 · 3 comments
Closed

numpy fails to compile with SAGE_ATLAS_LIB #20524

vbraun opened this issue Apr 30, 2016 · 3 comments

Comments

@vbraun
Copy link
Member

vbraun commented Apr 30, 2016

If I'm building numpy with my own atlas install it fails. The cblas, atlas libraries are symlinked to SAGE_LOCAL/lib and the correct pkg-config output is present:

$ pkg-config --libs cblas
-L/mnt/disk/home/buildslave-sage/slave/sage_git/build/local/lib -lcblas -latlas 

Yet numpy fails with

$ ./sage -p numpy
This looks like the first time you are running Sage.
Updating various hardcoded paths...
(Please wait at most a few minutes.)
DO NOT INTERRUPT THIS.
Done updating paths.
Found local metadata for numpy-1.11.0
Using cached file /mnt/disk/home/buildslave-sage/slave/sage_git/build/upstream/numpy-1.11.0.tar.gz
numpy-1.11.0
====================================================
Setting up build directory for numpy-1.11.0
Finished set up
****************************************************
Host system:
Linux volker-desktop 4.4.7-300.fc23.x86_64 #1 SMP Wed Apr 13 02:52:52 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
****************************************************
C compiler: gcc
C compiler version:
Using built-in specs.
COLLECT_GCC=/usr/bin/gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-redhat-linux/5.3.1/lto-wrapper
Target: x86_64-redhat-linux
Configured with: ../configure --enable-bootstrap --enable-languages=c,c++,objc,obj-c++,fortran,ada,go,lto --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-shared --enable-threads=posix --enable-checking=release --enable-multilib --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-linker-hash-style=gnu --enable-plugin --enable-initfini-array --disable-libgcj --with-isl --enable-libmpx --enable-gnu-indirect-function --with-tune=generic --with-arch_32=i686 --build=x86_64-redhat-linux
Thread model: posix
gcc version 5.3.1 20160406 (Red Hat 5.3.1-6) (GCC) 
****************************************************
Running from numpy source directory.

Note: if you need reliable uninstall behavior, then install
with pip instead of using `setup.py install`:

  - `pip install .`       (from a git repo or downloaded source
                           release)
  - `pip install numpy`   (last Numpy release on PyPi)


blas_opt_info:
blas_mkl_info:
Disabled blas_mkl_info: (MKL is None)
Disabled blas_mkl_info: (MKL is None)
  libraries mkl,vml,guide not found in []
  NOT AVAILABLE

openblas_info:
Disabled openblas_info: (OPENBLAS is None)
  libraries openblas not found in []
  NOT AVAILABLE

atlas_3_10_blas_threads_info:
Disabled atlas_3_10_blas_threads_info: (PTATLAS is None)
  libraries tatlas not found in []
  NOT AVAILABLE

atlas_3_10_blas_info:
Disabled atlas_3_10_blas_info: (ATLAS is None)
  libraries satlas not found in []
  NOT AVAILABLE

atlas_blas_threads_info:
Disabled atlas_blas_threads_info: (PTATLAS is None)
  libraries ptf77blas,ptcblas,atlas not found in []
  NOT AVAILABLE

atlas_blas_info:
Disabled atlas_blas_info: (ATLAS is None)
  libraries f77blas,cblas,atlas not found in []
  NOT AVAILABLE

/mnt/disk/home/buildslave-sage/slave/sage_git/build/local/var/tmp/sage/build/numpy-1.11.0/src/numpy/distutils/system_info.py:1640: 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:
C compiler: cc

creating /tmp/tmpKqg0LI/tmp
creating /tmp/tmpKqg0LI/tmp/tmpKqg0LI
compile options: '-I/usr/local/include -I/usr/include -I/mnt/disk/home/buildslave-sage/slave/sage_git/build/local/include -c'
cc: /tmp/tmpKqg0LI/source.c
cc /tmp/tmpKqg0LI/tmp/tmpKqg0LI/source.o -L/mnt/disk/home/buildslave-sage/slave/sage_git/build/local/lib -lcblas -o /tmp/tmpKqg0LI/a.out
/usr/bin/ld: warning: libatlas.so.3, needed by /mnt/disk/home/buildslave-sage/slave/sage_git/build/local/lib/libcblas.so, not found (try using -rpath or -rpath-link)
/mnt/disk/home/buildslave-sage/slave/sage_git/build/local/lib/libcblas.so: undefined reference to `ATL_sasum'
/mnt/disk/home/buildslave-sage/slave/sage_git/build/local/lib/libcblas.so: undefined reference to `ATL_dsyr2'
[...]

For some reason numpy forgot -latlas...

CC: @kiwifb

Component: packages: standard

Issue created by migration from https://trac.sagemath.org/ticket/20524

@vbraun vbraun added this to the sage-7.2 milestone Apr 30, 2016
@kiwifb
Copy link
Member

kiwifb commented Apr 30, 2016

comment:1

What does the generated site.cfg look like?

@vbraun
Copy link
Member Author

vbraun commented Apr 30, 2016

comment:2
[ALL]
library_dirs = /mnt/disk/home/buildslave-sage/slave/sage_git/build/local/lib
include_dirs = /mnt/disk/home/buildslave-sage/slave/sage_git/build/local/include
[blas]
library_dirs = /mnt/disk/home/buildslave-sage/slave/sage_git/build/local/lib
blas_libs    = atlas, f77blas, cblas
[lapack]
library_dirs = /mnt/disk/home/buildslave-sage/slave/sage_git/build/local/lib
lapack_libs  = lapack, f77blas, cblas, atlas

@vbraun
Copy link
Member Author

vbraun commented Apr 30, 2016

comment:3

False alert, was due to #20487 not applying the numpy patches...

@vbraun vbraun closed this as completed Apr 30, 2016
@vbraun vbraun removed this from the sage-7.2 milestone Apr 30, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants