[Numpy-discussion] Error during scipy.fftpack._fftpack compilation ( AIX/cc_r)

Hans-Joachim Ehlers HansJoachim.Ehlers@eumetsat....
Mon Jan 28 10:39:33 CST 2008

AIX 5.3
xlc v8
xlf v10

During the build scipy the following error shows up:

building 'scipy.fftpack._fftpack' extension
compiling C sources
C compiler: cc_r -DNDEBUG -O2 -qmaxmem=-1
"scipy/fftpack/src/zfftnd_fftpack.c", line 92.5: 1506-046 (S) Syntax error.
"scipy/fftpack/src/zfftnd_fftpack.c", line 93.5: 1506-046 (S) Syntax error.
"scipy/fftpack/src/zfftnd_fftpack.c", line 115.13: 1506-046 (S) Syntax error.
error: Command "cc_r -DNDEBUG -O2 -qmaxmem=-1 -Ibuild/src.aix-5.3-2.5 -I/usr/local/lib/python2.5/site-packages/numpy/core/include -I/usr/local/include/python2.5 -c scipy/fftpack/src/zfftnd.c -o build/temp.aix-5.3-2.5/scipy/fftpack/src/zfftnd.o" failed with exit status 1

The problem comes from C++ comment lines within c-code. The IBM Compiler v8 invoked as cc_r will complain and stop compilation.

1) Remove C++ comments from source code 
2) add the option "-qcpluscmt"  for the cc_r compiler into the /etc/vac.cfg file or build python with this option. ( -qcpluscmt should be the default for cc_r but it does not afaics )
>From xlc 
-qcpluscmt | -qnocpluscmt
                Permits the usage of "//" to introduce a comment
                that lasts until the end of the current source
                line, as in C++.  The default is -qcpluscmt when
                you invoke the compiler with xlc, xlc_r, cc, or
                cc_r, or when -qlanglvl is set to stdc99 or extc99.
                Otherwise, the default setting is -qnocpluscmt.


Is there any way to add C-compiler options to the scipy build process. I could figure this out for the fortran compiler but for the c compiler i did not.

More information about the Numpy-discussion mailing list