[NumPy-Tickets] [NumPy] #1525: Numpy is ignoring CFLAGS, which makes a 64-bit build difficult

NumPy Trac numpy-tickets@scipy....
Mon Jun 28 02:46:32 CDT 2010


#1525: Numpy is ignoring CFLAGS, which makes a 64-bit build difficult
------------------------+---------------------------------------------------
 Reporter:  drkirkby    |       Owner:  somebody
     Type:  defect      |      Status:  new     
 Priority:  normal      |   Milestone:  2.0.0   
Component:  numpy.core  |     Version:  1.3.0   
 Keywords:              |  
------------------------+---------------------------------------------------
 I am trying to get Numpy to build as a 64-bit executable, as part of a
 64-bit port of Sage to !OpenSolaris. But despite adding the compiler
 option -m64 (which generates 64-bit objects) to CFLAGS, Numpy ignores this
 so GCC generates an error.

 The same issue has been known in Sage for a long time affecting OS X
 systems where building 32-bit objects is the default, so one needed the
 -m64 compiler flag to generate the 64-bit code.

 {{{
  wrong ELF class: ELFCLASS64
 }}}

 which is typical of when a program is expecting to find a 32-bit object,
 but finds a 64-bit one.

 {{{
 numpy-1.3.0.p2/src/setup.py
 numpy-1.3.0.p2/src/MANIFEST.in
 numpy-1.3.0.p2/.hgtags
 Finished extraction
 ****************************************************
 Host system
 uname -a:
 SunOS hawk 5.11 snv_111b i86pc i386 i86pc
 ****************************************************
 ****************************************************
 CC Version
 gcc -v
 Using built-in specs.
 Target: i386-pc-solaris2.11
 Configured with: ../gcc-4.3.4/configure --prefix=/usr/local/gcc-4.3.4-GNU-
 assembler-Sun-linker --with-as=/usr/local/binutils-2.20/bin/as --with-
 ld=/usr/ccs/bin/ld --with-gmp=/usr/local --with-mpfr=/usr/local
 Thread model: posix
 gcc version 4.3.4 (GCC)
 ****************************************************
 Running from numpy source directory.
 F2PY Version 2
 blas_opt_info:
 blas_mkl_info:
   libraries mkl,vml,guide not found in
 /export/home/drkirkby/sage-4.3.1/local/lib
   NOT AVAILABLE

 atlas_blas_threads_info:
 Setting PTATLAS=ATLAS
   libraries ptf77blas,ptcblas,atlas not found in
 /export/home/drkirkby/sage-4.3.1/local/lib
   NOT AVAILABLE

 atlas_blas_info:
   FOUND:
     libraries = ['f77blas', 'cblas', 'atlas']
     library_dirs = ['/export/home/drkirkby/sage-4.3.1/local/lib']
     language = c
     include_dirs = ['/export/home/drkirkby/sage-4.3.1/local/include']

 /export/home/drkirkby/sage-4.3.1/spkg/build/numpy-1.3.0.p2/src/numpy/distutils/command/config.py:361:
 DeprecationWarning:
 +++++++++++++++++++++++++++++++++++++++++++++++++
 Usage of get_output is deprecated: please do not
 use it anymore, and avoid configuration checks
 involving running executable on the target machine.
 +++++++++++++++++++++++++++++++++++++++++++++++++

   DeprecationWarning)
 customize Sage_FCompiler_1
 customize Sage_FCompiler_1
 customize Sage_FCompiler_1 using config
 compiling '_configtest.c':

 /* This file is generated from numpy/distutils/system_info.py */
 void ATL_buildinfo(void);
 int main(void) {
   ATL_buildinfo();
   return 0;
 }
 C compiler: gcc -fno-strict-aliasing -DNDEBUG -g -O3 -Wall -Wstrict-
 prototypes -fPIC

 compile options: '-c'
 gcc: _configtest.c
 gcc _configtest.o -L/export/home/drkirkby/sage-4.3.1/local/lib -lf77blas
 -lcblas -latlas -o _configtest
 ld: fatal: file /export/home/drkirkby/sage-4.3.1/local/lib/libf77blas.so:
 wrong ELF class: ELFCLASS64
 ld: fatal: file /export/home/drkirkby/sage-4.3.1/local/lib/libcblas.so:
 wrong ELF class: ELFCLASS64
 ld: fatal: file /export/home/drkirkby/sage-4.3.1/local/lib/libatlas.so:
 wrong ELF class: ELFCLASS64
 ld: fatal: file processing errors. No output written to _configtest
 collect2: ld returned 1 exit status
 ld: fatal: file /export/home/drkirkby/sage-4.3.1/local/lib/libf77blas.so:
 wrong ELF class: ELFCLASS64
 ld: fatal: file /export/home/drkirkby/sage-4.3.1/local/lib/libcblas.so:
 wrong ELF class: ELFCLASS64
 ld: fatal: file /export/home/drkirkby/sage-4.3.1/local/lib/libatlas.so:
 wrong ELF class: ELFCLASS64
 ld: fatal: file processing errors. No output written to _configtest
 collect2: ld returned 1 exit status
 failure.
 removing: _configtest.c _configtest.o
 Status: 255
 Output:
   FOUND:
     libraries = ['f77blas', 'cblas', 'atlas']
     library_dirs = ['/export/home/drkirkby/sage-4.3.1/local/lib']
     language = c
     define_macros = [('NO_ATLAS_INFO', 2)]
     include_dirs = ['/export/home/drkirkby/sage-4.3.1/local/include']

 lapack_opt_info:
 lapack_mkl_info:
 }}}

-- 
Ticket URL: <http://projects.scipy.org/numpy/ticket/1525>
NumPy <http://projects.scipy.org/numpy>
My example project


More information about the NumPy-Tickets mailing list