[SciPy-user] problem building svn scipy

Damian Eads eads at soe.ucsc.edu
Sat Apr 26 02:17:38 EDT 2008


Hi,

I have compiled python 2.5 with gcc 3.4, as verified below.

[eads scipy]$ gcc --version
gcc34 (GCC) 3.4.6 20060404 (Red Hat 3.4.6-8)
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
[eads scipy]$ python
Python 2.5.2 (r252:60911, Apr 25 2008, 19:21:27)
[GCC 3.4.6 20060404 (Red Hat 3.4.6-8)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
 >>> ^D
[eads scipy]$

I checked out numpy and scipy from scratch and they build with gcc 3.4.6 
without error. I tried searching through the numpy and scipy headers for 
CS, _X, and _dm. I could not find any references to them. I then tried 
building numpy and scipy with gcc34-python 2.4, and they also built 
without error.

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 at 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