[Numpy-discussion] Re: gcc-4.1

Darren Dale dd55 at cornell.edu
Sat Mar 18 15:07:09 EST 2006


Hi David,

I cant build numpy with the changes you just commited:

Running from numpy source directory.
No module named __svn_version__
F2PY Version 2_2258
blas_opt_info:
blas_mkl_info:
/home/darren/src/numpy/numpy/distutils/system_info.py:531: UserWarning: 
Library error: libs=['mkl', 'vml', 'guide'] found_libs=[]
  warnings.warn("Library error: libs=%s found_libs=%s" % \
  NOT AVAILABLE

atlas_blas_threads_info:
Setting PTATLAS=ATLAS
Setting PTATLAS=ATLAS
Setting PTATLAS=ATLAS
  FOUND:
    libraries = ['lapack', 'blas', 'cblas', 'atlas']
    library_dirs = ['/usr/lib']
    language = c
    include_dirs = ['/usr/include/atlas']

running build_src
building extension "atlas_version" sources
creating build
creating build/src
  adding 'build/src/atlas_version_-0x54967df6.c' to sources.
running build_ext
customize UnixCCompiler
customize UnixCCompiler using build_ext
building 'atlas_version' extension
compiling C sources
i686-pc-linux-gnu-gcc options: '-pthread -fno-strict-aliasing -DNDEBUG -fPIC'
creating build/temp.linux-i686-2.4
creating build/temp.linux-i686-2.4/build
creating build/temp.linux-i686-2.4/build/src
compile 
options: '-I/usr/include/atlas -Inumpy/core/include -I/usr/include/python2.4 -c'
i686-pc-linux-gnu-gcc: build/src/atlas_version_-0x54967df6.c
i686-pc-linux-gnu-gcc -pthread -shared 
build/temp.linux-i686-2.4/build/src/atlas_version_-0x54967df6.o -L/usr/lib -llapack -lblas -lcblas -latlas -o 
build/temp.linux-i686-2.4/atlas_version.so
  FOUND:
    libraries = ['lapack', 'blas', 'cblas', 'atlas']
    library_dirs = ['/usr/lib']
    language = c
    define_macros = [('ATLAS_INFO', '"\\"3.7.11\\""')]
    include_dirs = ['/usr/include/atlas']

lapack_opt_info:
lapack_mkl_info:
mkl_info:
  NOT AVAILABLE

  NOT AVAILABLE

atlas_threads_info:
Setting PTATLAS=ATLAS
/home/darren/src/numpy/numpy/distutils/system_info.py:531: UserWarning: 
Library error: libs=['lapack_atlas'] found_libs=[]
  warnings.warn("Library error: libs=%s found_libs=%s" % \
numpy.distutils.system_info.atlas_threads_info
Setting PTATLAS=ATLAS
Setting PTATLAS=ATLAS
  FOUND:
    libraries = ['lapack', 'lapack', 'blas', 'cblas', 'atlas']
    library_dirs = ['/usr/lib']
    language = f77
    include_dirs = ['/usr/include/atlas']

running build_src
building extension "atlas_version" sources
  adding 'build/src/atlas_version_0x26de9279.c' to sources.
running build_ext
customize UnixCCompiler
customize UnixCCompiler using build_ext
invalid syntax (gnu.py, line 225)
Could not locate executable ifort
Could not locate executable ifc
Could not locate executable ifort
Could not locate executable efort
Could not locate executable efc
customize IntelFCompiler
customize LaheyFCompiler
customize PGroupFCompiler
customize AbsoftFCompiler
customize NAGFCompiler
invalid syntax (gnu.py, line 225)
customize CompaqFCompiler
customize IntelItaniumFCompiler
invalid syntax (gnu.py, line 225)
customize G95FCompiler
invalid syntax (gnu.py, line 225)
invalid syntax (gnu.py, line 225)
##### msg: invalid syntax (gnu.py, line 225)
invalid syntax (gnu.py, line 225)
  FOUND:
    libraries = ['lapack', 'lapack', 'blas', 'cblas', 'atlas']
    library_dirs = ['/usr/lib']
    language = f77
    define_macros = [('NO_ATLAS_INFO', 2)]
    include_dirs = ['/usr/include/atlas']

Warning: distutils distribution has been initialized, it may be too late to 
add an extension lapack_lite
Warning: distutils distribution has been initialized, it may be too late to 
add a subpackage linalg
Warning: distutils distribution has been initialized, it may be too late to 
add an extension mtrand
Warning: distutils distribution has been initialized, it may be too late to 
add a subpackage random
Traceback (most recent call last):
  File "setup.py", line 76, in ?
    setup_package()
  File "setup.py", line 63, in setup_package
    config.add_subpackage('numpy')
  File "/home/darren/src/numpy/numpy/distutils/misc_util.py", line 592, in 
add_subpackage
    config_list = self.get_subpackage(subpackage_name,subpackage_path)
  File "/home/darren/src/numpy/numpy/distutils/misc_util.py", line 582, in 
get_subpackage
    subpackage_path)
  File "/home/darren/src/numpy/numpy/distutils/misc_util.py", line 539, in 
_get_configuration_from_setup_py
    config = setup_module.configuration(*args)
  File "/home/darren/src/numpy/setup.py", line 15, in configuration

  File "/home/darren/src/numpy/numpy/distutils/misc_util.py", line 636, in 
add_data_dir
    self.add_data_files((ds,filenames))
  File "/home/darren/src/numpy/numpy/distutils/misc_util.py", line 702, in 
add_data_files
    dist.data_files.extend(data_dict.items())
AttributeError: 'NoneType' object has no attribute 'extend'


On Saturday 18 March 2006 5:47 pm, David M. Cooke wrote:
> Darren Dale <dd55 at cornell.edu> writes:
> > On Monday 13 March 2006 9:05 pm, Robert Kern wrote:
> >> Darren Dale wrote:
> >> > Has anyone been able to build numpy with gcc-4.1? I upgraded gcc on my
> >> > home computer this weekend from glibc-2.3.6 and gcc-3.4.5 to glibc-2.4
> >> > and gcc-4.1. When I try to build numpy I get warnings like "warning:
> >> > build_ext: fcompiler=gnu is not available." I tried forcing numpy to
> >> > use gfortran with "python setup.py config_fc --fcompiler=gnu95 build",
> >> > and got the same warning for fcompiler=gnu95.
> >>
> >> Building numpy shouldn't require any kind of Fortran compiler.
> >>
> >> However, the problem is that the version-recognizing regex doesn't like
> >> the version string "GNU Fortran 95 (GCC) 4.1.0 (Gentoo 4.1.0)". Look in
> >> numpy/distutils/fcompiler/gnu.py and the class attribute
> >> Gnu95FCompiler.version_pattern .
> >
> > Thanks Robert. May I suggest the following change, from:
> > version_pattern = r'GNU Fortran 95 \(GCC (?P<version>[^\s*\)]+)'
> > to:
> > version_pattern = r'GNU Fortran 95 \(GCC?\) (?P<version>[^\s*\)]+)'
> > along with the following comment to go with the debian example:
> > # Gentoo: GNU Fortran 95 (GCC) 4.1.0 (Gentoo 4.1.0)
>
> I fixed that a few days ago and forgot to check my solution in :-)
> Now, you can define a version_match method that can do more complex
> matching, instead of just a regex. The GNU Fortran compilers now use
> this: gfortran, for instance, checks the version output to start
> with 'GNU Fortran 95', then something versionish (the regex [-.\d]+).
>
> > Also, I wonder if I found a bug in numpy/distutils/ccompiler.py.
> >
> >     if status in ok_status:
> >         m = re.match(self.version_pattern,output)
> >         if m:
> >             version = m.group('version')
> >             if not m:
> >                 raise ValueError("compiler version not matched (%r)" %\
> > (version,))
> >             version = LooseVersion(version)
> >     self.version = version
> >     return version
> >
> > That ValueError will never be raised, since it has already been
> > established that m is not NoneType.
>
> This is fixed too.







More information about the NumPy-Discussion mailing list