[SciPy-dev] scipy / SGI MIPSpro compiler (part 2)
Steve M. Robbins
steven.robbins at videotron.ca
Fri Aug 23 15:23:09 CDT 2002
Hi again,
Got stuck in scipy_base/_compiled_base.c with three errors and a
warning.
cc -O -OPT:Olimit=0 -I/usr/local/unstable/include/python2.1 -c /tmp/smr/scipy/scipy_base/_compiled_base.c -o build/temp.irix64-6.5-2.1/_compiled_base.o
error: command 'cc' failed with exit status 2
swmgr at wart{scipy}cc -O -OPT:Olimit=0 -I/usr/local/unstable/include/python2.1 -c /tmp/smr/scipy/scipy_base/_compiled_base.c
cc-3316 cc: ERROR File = /tmp/smr/scipy/scipy_base/_compiled_base.c, Line = 45
The expression must be a pointer to a complete object type.
for (k=0; k < asize; k++,ip+=instride) {
^
cc-3316 cc: ERROR File = /tmp/smr/scipy/scipy_base/_compiled_base.c, Line = 48
The expression must be a pointer to a complete object type.
for (j=0; j < copied; j++,op2+=elsize) {
^
cc-3316 cc: ERROR File = /tmp/smr/scipy/scipy_base/_compiled_base.c, Line = 58
The expression must be a pointer to a complete object type.
op += elsize; /* Get ready to put next match */
^
cc-1174 cc: WARNING File = /tmp/smr/scipy/scipy_base/_compiled_base.c, Line = 87
The variable "f1" was declared but never referenced.
PyObject *m, *d, *s, *f1;
^
My understanding is that you can't do pointer arithmetic on void*
types. I changed them to char*, assuming that the strides are given
in bytes.
Index: scipy_base/_compiled_base.c
===================================================================
RCS file: /home/cvsroot/world/scipy/scipy_base/_compiled_base.c,v
retrieving revision 1.1
diff -u -b -B -r1.1 _compiled_base.c
--- scipy_base/_compiled_base.c 16 Aug 2002 13:09:42 -0000 1.1
+++ scipy_base/_compiled_base.c 23 Aug 2002 20:29:44 -0000
@@ -15,8 +15,8 @@
int asize, abytes, new;
int copied=0, nd;
int instride=0, elsize, k, j, dims[1];
- void *ip, *op; /* Current memory buffer */
- void *op2;
+ char *ip, *op; /* Current memory buffer */
+ char *op2;
static char *kwlist[] = {"input", NULL};
@@ -84,7 +84,7 @@
};
DL_EXPORT(void) init_compiled_base(void) {
- PyObject *m, *d, *s, *f1;
+ PyObject *m, *d, *s;
/* Create the module and add the functions */
m = Py_InitModule("_compiled_base", methods);
More information about the Scipy-dev
mailing list