[SciPy-user] problem building svn scipy

Damian Eads eads@soe.ucsc....
Fri Apr 25 20:20:17 CDT 2008


Hi,

I learned there is a compatibility package called compat-gcc-34, which I 
installed with yum. This is the first time I've tried compiling scipy 
with gcc-34.

$ yum install compat-gcc-34 gcc-gcc-34-c++

Then, I tried doing a clean, changing CC, reconfigure, and build.

$ python setup.py clean # in the scipy root
$ rm -rf build          # just to be sure
$ export CC=gcc34
$ python setup.py config
$ python setup.py build

...

C compiler: gcc34 -fno-strict-aliasing -DNDEBUG -O2 -g -pipe -Wall 
-Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector 
--param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic 
-fasynchronous-unwind-tables -D_GNU_SOURCE -fPIC -fPIC

compile options: '-c'
gcc34: optimize/Zeros/bisect.c
cc1: error: unrecognized command line option "-fstack-protector"
cc1: error: invalid parameter `ssp-buffer-size'
optimize/Zeros/bisect.c:1: error: bad value (generic) for -mtune= switch
cc1: error: unrecognized command line option "-fstack-protector"
cc1: error: invalid parameter `ssp-buffer-size'
optimize/Zeros/bisect.c:1: error: bad value (generic) for -mtune= switch
error: Command "gcc34 -fno-strict-aliasing -DNDEBUG -O2 -g -pipe -Wall 
-Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector 
--param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic 
-fasynchronous-unwind-tables -D_GNU_SOURCE -fPIC -fPIC -c 
optimize/Zeros/bisect.c -o 
build/temp.linux-i686-2.5/optimize/Zeros/bisect.o" failed with exit status 1
removed ./__svn_version__.py
$

For some reason, the options -fstack-protector, -mtune=generic are being 
inserted in the gcc command. I have a hunch this is an error may be 
caused by the distutils that comes bundled with Fedora's Python 2.5, 
which was probably compiled with gcc 4.1.2.

Ideas? Thanks.

Damian

Damian Eads wrote:
> Hi there,
> 
> The hierarchy_wrap.c file is code I wrote and Chris Burns checked in. I 
> did not try to compile it with an earlier version of gcc. Sorry about that.
> 
> $ gcc --version
> gcc (GCC) 4.1.2 20070925 (Red Hat 4.1.2-33)
> $
> 
> I will log-in to a machine with gcc-3.4.1 and try recompiling. I hope to 
> have a fix soon.
> 
> Robert: interesting catch. I could try renaming CS, _X, and _dm. Let me 
> try reproducing this compiler error on a machine with the gcc version 
> John is using.
> 
> Damian
> 
> 
> On Fri, Apr 25, 2008 at 9:28 AM, John Hunter <jdh2358@gmail.com> wrote:
>  > With numpy r5083 and scipy r4176 I am getting the following build error
>  >
>  >  building 'scipy.cluster._hierarchy_wrap' extension
>  >  compiling C sources
>  >  C compiler: /opt/app/g++lib6/gcc-3.4/bin/gcc -fno-strict-aliasing
>  >  -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC
>  >
>  >  compile options:
>  >  '-I/home/titan/johnh/dev/lib/python2.4/site-packages/numpy/core/include
>  >  -I/home/titan/johnh/dev/lib/python2.4/site-packages/numpy/core/include
>  >  -I/opt/app/g++lib6/python-2.4/include/python2.4 -c'
>  >  gcc: scipy/cluster/src/hierarchy_wrap.c
>  >  scipy/cluster/src/hierarchy_wrap.c: In function 
> `calculate_cluster_sizes_wrap':
>  >  scipy/cluster/src/hierarchy_wrap.c:117: error: parse error before
>  >  numeric constant
>  >  scipy/cluster/src/hierarchy_wrap.c:120: error: invalid lvalue in 
> unary `&'
>  >  scipy/cluster/src/hierarchy_wrap.c:124: error: invalid type argument 
> of `->'
> 
> It looks like something is #defining CS to be a number. Search through
> the headers for this.
> 
>  >  scipy/cluster/src/hierarchy_wrap.c: In function
>  >  `cluster_maxclust_monocrit_wrap':
>  >  scipy/cluster/src/hierarchy_wrap.c:251: warning: unused variable 
> `cutoff'
>  >  scipy/cluster/src/hierarchy_wrap.c: In function `pdist_euclidean_wrap':
>  >  scipy/cluster/src/hierarchy_wrap.c:387: error: parse error before
>  >  numeric constant
> 
> Possibly the same thing with _X or _dm. Are there any more errors
> following this?


More information about the SciPy-user mailing list