[GRASS5] CRAY T3E compile errors
Markus Neteler
neteler at geog.uni-hannover.de
Wed Sep 20 08:57:15 EDT 2000
Hi,
On Wed, Sep 20, 2000 at 03:56:57PM +0700, Justin Hickey wrote:
> Hi Markus
>
> Markus Neteler wrote:
> > /home/t3e/fsn/nhdc/nhdcmark/grass5/src/libes/digitizer
> > sh-48 /home/t3e/fsn/nhdc/nhdcmark/grass5bin/gmake5[7]:
> > OBJ.alpha-cray-unicosmk2.0.4.X/make.rules: file already exists.
> > make -f OBJ.alpha-cray-unicosmk2.0.4.X/make.rules
> >
> > cmd-2415 make: line '158': 'syntax error'. Stop.
> > Make: "/home/t3e/fsn/nhdc/nhdcmark/grass5bin/gmake5 digitizer": Error
> > code 1
> > -> I can't see any problems in libes/digitizer/OBJ*/make.rules
> > But somehow it is different to other make.rules files?!
>
> I came across this type of error before in the old grass code (that is,
> I haven't seen it recently). The line at the stated line number for me
> was something like
>
> $(LIB): # in case LIB changes.
>
> I'm not sure, but this sounds like the LIB target contained something
> like -lm which is an invalid target. Check to see if the line mentioned
> is something like this, then check the definition for the target to make
> sure it only contains proper values (if it is a LIB target it should
> only have -L values).
The affecting line is 158:
#################################################################
/home/t3e/fsn/nhdc/nhdcmark/grass5/src/libes/digitizer
make -f OBJ.alpha-cray-unicosmk2.0.4.X/make.rules
cmd-2415 make: line '158': 'syntax error'. Stop.
cat make.rules:
153 OBJ = \
154 $(OBJARCH)/graph_input.o
155
156 all: $(DIGITLIB)
157
158 $(DIGITLIB): $(OBJ)
159 $(AR)
160
161 #$(LIBDIR)/linkm.h: linkm.h
162 # rm -f $@
163 # cp $? $@
164 # chmod +r $@
165
166 $(OBJ): #linkm.h
I can't see an problem... Strange.
>
> > /home/t3e/fsn/nhdc/nhdcmark/grass5/src/libes/gis
> > sh-48 /home/t3e/fsn/nhdc/nhdcmark/grass5bin/gmake5[7]:
> > OBJ.alpha-cray-unicosmk2.0.4.X/make.rules: file already exists.
> > make -f OBJ.alpha-cray-unicosmk2.0.4.X/make.rules
> > cc -g -I/home/t3e/fsn/nhdc/nhdcmark/grass5/src/include -c
> > fork.c
> > -o OBJ.alpha-cray-unicosmk2.0.4.X/fork.o
> > CC-140 cc: ERROR File = fork.c, Line = 32
> > Too many arguments in function call.
> >
> > setpgrp (0, getpid());
> > ^
> > 1 error detected in the compilation of "fork.c".
> > Make: "cc -g -I/home/t3e/fsn/nhdc/nhdcmark/grass5/src/include -c fork.c
> > -o OBJ.alpha-cray-unicosmk2.0.4.X/fork.o": Error code 1
> > cmd-2436 make: Stop.
> > Make: "/home/t3e/fsn/nhdc/nhdcmark/grass5bin/gmake5 gis": Error code 1
> > -> mhhh, no idea here
>
> As you can see from you man page listing in your reply to Bernhard, the
> setpgrp() function on the cray does not take any arguments. You could
> use #ifdef's as you suggested but it would be much better to have this
> determined by configure. Unfortunately, I have no idea how to do that.
Good luck for me: I have detected the problem. I fork.c there is
already an #ifdef statement. Reason fro my problem was that the
ksh on CRAY was in a "noclobber" mode. By setting
set +C
By that I got rid of strange write errors while running "configure"
(affecting src/includes/config.h). Now, after re-running configure,
the SETPGRP_VOID was set properly.
.. src/libes/gis compiles now.
> > ---------------------------------------------------
> >
> > /home/t3e/fsn/nhdc/nhdcmark/grass5/src/libes/proj
> > sh-48 /home/t3e/fsn/nhdc/nhdcmark/grass5bin/gmake5[7]:
> > OBJ.alpha-cray-unicosmk2.0.4.X/make.rules: file already exists.
> > make -f OBJ.alpha-cray-unicosmk2.0.4.X/make.rules
> >
> > rm -f OBJ.alpha-cray-unicosmk2.0.4.X/bch2bps.o
> > cc -g -I. -I/home/t3e/fsn/nhdc/nhdcmark/grass5/src/include -c
> > bch2bps.c
> > CC-167 cc: ERROR File = bch2bps.c, Line = 141
> > Argument of type "UV **" is incompatible with parameter of type "void **".
> >
> > freev2(d, nu);
> > ^
> > 1 error detected in the compilation of "bch2bps.c".
> > Make: "cc -g -I. -I/home/t3e/fsn/nhdc/nhdcmark/grass5/src/include -c
> > bch2bps.c": Error code 1
> > Make: "/home/t3e/fsn/nhdc/nhdcmark/grass5bin/gmake5 proj": Error code 1
> > -> mhhh, no idea here
>
> Here, d has probably been defiined as type UV ** in bch2bps.c and as you
Yes, that's right.
> saw, the first argument to freev2 is a void **. Therefore, d needs to be
> cast to a void ** as follows:
>
> freev2((void **) d, nu);
>
> Unfortunately, this could be dangerous since the structure of UV
> (whatever it happens to be) is unknown to the freev2 function. This may
> not be a problem but should at least be considered.
Probably I should put the cast into an #ifdef depending on config.h?
But: what variable I would have to check from config.h? Sorry, here
I am very unexperienced.
> > ---------------------------------------------------
> > /home/t3e/fsn/nhdc/nhdcmark/grass5/src/libes/segment
> > sh-48 /home/t3e/fsn/nhdc/nhdcmark/grass5bin/gmake5[7]:
> > OBJ.alpha-cray-unicosmk2.
> > 0.4.X/make.rules: file already exists.
> > make -f OBJ.alpha-cray-unicosmk2.0.4.X/make.rules
> >
> > rm -f OBJ.alpha-cray-unicosmk2.0.4.X/address.o
> > cc -g -I/home/t3e/fsn/nhdc/nhdcmark/grass5/src/include -c
> > address.c
> > CC-20 cc: ERROR File =
> > /home/t3e/fsn/nhdc/nhdcmark/grass5/src/include/segment.h,
> > Line = 39
> > The identifier "off_t" is undefined.
[...]
> > -> probably a problem with includes/config.h ?
>
> I think you're right here, which means another visit to configure.
Also fixed by above set +C setting and re-"configure".
Here a new error occured:
CC-852 cc: ERROR File = get_row.c, Line = 29
The expression must be a pointer to a complete object type.
buf += size;
^
1 error detected in the compilation of "get_row.c".
-> I am hesitating to change anything "intuitively"...
Recommendations?
> > ---------------------------------------------------
> >
> > /home/t3e/fsn/nhdc/nhdcmark/grass5/src/libes/vect32/georef
> > sh-48 /home/t3e/fsn/nhdc/nhdcmark/grass5bin/gmake5[7]:
> > OBJ.alpha-cray-unicosmk2.0.4.X/make.rules: file already exists.
> > make -f OBJ.alpha-cray-unicosmk2.0.4.X/make.rules
> >
> > rm -f OBJ.alpha-cray-unicosmk2.0.4.X/curses.o
> > cc -g -I../digitizers -I../libes
> > -I/home/t3e/fsn/nhdc/nhdcmark/grass5/src/include -c curses.c
> > CC-147 cc: ERROR File = georef.h, Line = 27
> > Declaration is incompatible with "int suspend(int, int)" (declared at line
> > 359
> > of "/usr/include/unistd.h").
> >
> > int suspend(void);
> > ^
> > 1 error detected in the compilation of "curses.c".
> > Make: "cc -g -I../digitizers -I../libes
> > -I/home/t3e/fsn/nhdc/nhdcmark/grass5/src/include -c curses.c": Error code 1
> > Make: "/home/t3e/fsn/nhdc/nhdcmark/grass5bin/gmake5 georef": Error code 1
>
> This is again similar to the setpgrp error and should be dealt with in
> configure.
Or probably an #ifdef environment, too? I try to search for another
suspend() call...
Thanks so far
Markus
----------------------------------------
If you want to unsubscribe from GRASS Development Team mailing list write to:
minordomo at geog.uni-hannover.de with
subject 'unsubscribe grass5'
More information about the grass-dev
mailing list