[SciPy-user] Where do I put site.cfg? What should it contain? Can I build w/o atlas?

skip@pobox.com skip at pobox.com
Wed Feb 15 13:32:39 CST 2006

I'm trying to build numpy an svn sandbox (just updated a couple minutes
ago).  If I grub around in numpy/distutils/system_info.py it says something
about creating a site.cfg file with (for example) information about locating
atlas.  It says nothing about where this file belongs.  I took a stab and
placed it in my numpy source tree, right next to setup.py, with these lines:

    library_dirs = /home/titan/skipm/src/ATLAS/lib/SunOS_Babe
    include_dirs = /home/titan/skipm/src/ATLAS/include/SunOS_Babe
    # for overriding the names of the atlas libraries
    atlas_libs = lapack, f77blas, cblas, atlas

I then verified that those directories exist, contain apparently useful
contents, and that I didn't have a conflicting environment variable named

    % ls /home/titan/skipm/src/ATLAS/lib/SunOS_Babe
    Make.inc       libatlas.a     libf77blas.a   libtstatlas.a
    Makefile       libcblas.a     liblapack.a
    % ls /home/titan/skipm/src/ATLAS/include/SunOS_Babe
    atlas_buildinfo.h   atlas_dmv.h         atlas_smvT.h        atlas_zr1.h
    atlas_cNCmm.h       atlas_dmvN.h        atlas_sr1.h         atlas_zsysinfo.h
    atlas_cacheedge.h   atlas_dmvS.h        atlas_ssysinfo.h
    atlas_cmv.h         atlas_dmvT.h        atlas_strsmXover.h  cXover.h
    atlas_cmvN.h        atlas_dr1.h         atlas_trsmNB.h      cmm.h
    atlas_cmvS.h        atlas_dsysinfo.h    atlas_type.h        dXover.h
    atlas_cmvT.h        atlas_dtrsmXover.h  atlas_zNCmm.h       dmm.h
    atlas_cr1.h         atlas_sNCmm.h       atlas_zmv.h         sXover.h
    atlas_csysinfo.h    atlas_smv.h         atlas_zmvN.h        smm.h
    atlas_ctrsmXover.h  atlas_smvN.h        atlas_zmvS.h        zXover.h
    atlas_dNCmm.h       atlas_smvS.h        atlas_zmvT.h        zmm.h
    % env | grep ATLAS

Then I tried "python setup.py build":

    Script started on Wed Feb 15 13:23:21 2006
    babe:% python setup.py build
    Running from numpy source directory.
    No module named __svn_version__
    F2PY Version 2_2110

        libraries = ['ptf77blas', 'ptcblas', 'atlas']
        library_dirs = ['/opt/lib']
        language = c
        include_dirs = ['/opt/include']

    running build_src
    building extension "atlas_version" sources
      adding 'build/src/atlas_version_0x4568501b.c' to sources.
    running build_ext
    customize UnixCCompiler
    customize UnixCCompiler using build_ext
    building 'atlas_version' extension
    compiling C sources
    gcc options: '-fno-strict-aliasing -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC'
    compile options: '-I/opt/include -Inumpy/core/include -I/opt/app/g++lib6/python-2.4/include/python2.4 -c'
    /opt/lang/gcc-3.4/bin/gcc -shared build/temp.solaris-2.8-i86pc-2.4/build/src/atlas_version_0x4568501b.o -L/opt/lib -lptf77blas -lptcblas -latlas -o build/temp.solaris-2.8-i86pc-2.4/atlas_version.so
    Text relocation remains                                                                                     referenced
        against symbol                                                                                              offset in file
    <unknown>                           0x7                                                                                 /opt/lib/libatlas.a(ATL_buildinfo.o)
    <unknown>                           0xc                                                                                 /opt/lib/libatlas.a(ATL_buildinfo.o)
    <unknown>                           0x11                                                                        /opt/lib/libatlas.a(ATL_buildinfo.o)
    <unknown>                           0x16                                                                        /opt/lib/libatlas.a(ATL_buildinfo.o)

How come distutils is ignoring my site.cfg file?  Neither of these commands:

    python setup.py --help
    python setup.py build --help

mention site.cfg.

Failing all this, is there some way to build numpy/scipy without atlas?  At
this point I just want the damn thing to build.  I'll worry about
performance later (if at all).


Skip Montanaro
skip at pobox.com

More information about the SciPy-user mailing list