[GRASS5] Misc. Module Errors

Eric G . Miller egm2 at jps.net
Wed Dec 6 02:20:19 EST 2000


On Tue, Dec 05, 2000 at 05:22:02PM -0800, Jeshua Lacock wrote:
> Here are the rest of the modules that fail to compile and their error(s):
> 
> Both "src/mapdev/v.geom/cmd" and "src/misc/m.clump" get this error:
>   /usr/bin/ld: Undefined symbols:
>   _GLOBAL_INTERRUPT_ALGORITHM
>   _gcvt
>   GISGEN failure at STEP: src/mapdev/v.geom

Well, I think this command must be moved out of default build anyway
(license problem).

> 
> #################################################################
> v.in.shape reported an error that it could not access malloc.h, so
> after copying malloc.h from
> "/System/Library/Frameworks/System.framework/Versions/B/Headers/bsd/sys/"
> to "src/include/" it only gets one error:

malloc.h should be part of the Standard C lib.  I'm thinking there must
be a problem somewhere between the C preprocessor, and the compilation
phase.  Based on your other error reports, it would seem various macros
in included header files may not be getting expanded correctly, and
hence generating errors.  All the 'illegal expression, found }' lead me
to believe that some kind of expansion is happening in the preprocessor
that is generating illegal code for the compiler.  Also, could be this
thing with the switch construct (see below).

> 
> /usr/src/grass/src/mapdev/v.in.shape make -f
> OBJ.powerpc-apple-darwin1.2/make.rules cc -g -O2
> -I/usr/src/grass/src/include  -c shp2dig.c -o
> OBJ.powerpc-apple-darwin1.2/shp2dig.o shp2dig.c:807: illegal
> expression, found `}' make: ***
> [OBJ.powerpc-apple-darwin1.2/shp2dig.o] Error 1
> 
> #################################################################
> /usr/src/grass/src/mapdev/v.rmdup/cmd make -f
> OBJ.powerpc-apple-darwin1.2/make.rules 
> 
> cc -g -O2   -I/usr/src/grass/src/include  -c rmdup.c -o
> OBJ.powerpc-apple-darwin1.2/rmdup.o rmdup.c: In function `killdups':
> rmdup.c:196: structure has no member named `_shortbuf' make[1]: ***
> [OBJ.powerpc-apple-darwin1.2/rmdup.o] Error 1 make: *** [all] Error 2
> 
> #################################################################
> /usr/src/grass/src/raster/r.in.gdal make -f
> OBJ.powerpc-apple-darwin1.2/make.rules 
> 
> cc  -o /usr/local/grass5/etc/bin/main/cmd/r.in.gdal
> OBJ.powerpc-apple-darwin1.2/main.o
> OBJ.powerpc-apple-darwin1.2/gbgetsymbol.o
> OBJ.powerpc-apple-darwin1.2/gdalbridge.o
> OBJ.powerpc-apple-darwin1.2/make_loc.o
> /usr/src/grass/src/libes/LIB.powerpc-apple-darwin1.2/libI.a
> /usr/src/grass/src/libes/LIB.powerpc-apple-darwin1.2/libgis.a  \
>                  
> /usr/bin/ld: Undefined symbols: _GBGetSymbol make: ***
> [/usr/local/grass5/etc/bin/main/cmd/r.in.gdal] Error 1
> 
> #################################################################
> /usr/src/grass/src/raster/r.mapcalc/mapcalc usr/bin/ld: Undefined
> symbols: _drand48 make[1]: ***
> [/usr/local/grass5/etc/bin/main/cmd/r.mapcalc] Error 1 make: *** [all]
> Error 1

I think these drand errors are a problem with Architecture specific
macros which choose between inclusion/exclusion of various random number
generators that may/may not be available.  The code probably needs some
additions to the "guards" for deciding to use drand48 or rand or
whatever.  Do you happen to know what the unique architechture symbol is
that is defined for Mac OS X?  It should be something like __MAC_OS_X__;
similar symbols are __AIX__, __CYGWIN__.  If you find out, we may be
able to add it to appropriate places.

> #################################################################
> /usr/src/grass/src/raster/r.random /usr/bin/ld: Undefined symbols:
> _lrand48 _srand48 make: ***
> [/usr/local/grass5/etc/bin/main/cmd/r.random] Error 1
> 
> #################################################################
> /usr/src/grass/src/sites/s.kcv
> 
>   /usr/bin/ld: Undefined symbols: _drand48 _srand48 make: ***
>   [/usr/local/grass5/etc/bin/contrib/cmd/s.kcv] Error 1
> 
> #################################################################
> /usr/src/grass/src/sites/s.random
> 
>   main.c: In function `main': main.c:127: `drand48' undeclared (first
>   use in this function) main.c:127: (Each undeclared identifier is
>   reported only once main.c:127: for each function it appears in.)
>   make: *** [OBJ.powerpc-apple-darwin1.2/main.o] Error 1
> 
> #################################################################
> /usr/src/grass/src/sites/s.to.rast main.c:251: illegal expression,
> found `}' main.c:335: illegal expression, found `}' make: ***
> [OBJ.powerpc-apple-darwin1.2/main.o] Error 1

Well at least this one is maybe again a case of an empty 'default:'
statement in a switch(){} construct.  I just added a 'break;', but I
believe we covered similar ground before elsewhere, and still believe
the compiler has a bug about this.

> #################################################################
> /usr/src/grass/src.garden/answers/src.answers/raster/r.fill.dir/cmd
> make -f OBJ.powerpc-apple-darwin1.2/make.rules 
> 
> c fmt_un.f -o OBJ.powerpc-apple-darwin1.2/fmt_un.o make[1]: c: Command
> not found make[1]: [OBJ.powerpc-apple-darwin1.2/fmt_un.o] Error 127
> (ignored) OBJ.powerpc-apple-darwin1.2/fmt_un.o -o
> /usr/local/grass5/etc/fill/fmt_un make[1]:
> OBJ.powerpc-apple-darwin1.2/fmt_un.o: Command not found make[1]: ***
> [/usr/local/grass5/etc/fill/fmt_un] Error 127 make: *** [all] Error 1

This requires a fortran compiler. Do you have one? Appears the 
FC = @F77@  in src/CMD/head/head.in is set to 'c', which is gibberish.

> #################################################################
> src.contrib/GMSL/g3d/src3d/raster/r3.mapcalc/mapcalc
> 
>   /usr/bin/ld: Undefined symbols: _drand48 make[4]: ***
>   [/usr/local/grass5/etc/bin/main/cmd/r3.mapcalc] Error 1 make[3]: ***
>   [all] Error 1 make[2]: *** [all] Error 2 make[1]: *** [all] Error 1
>   make: *** [all] Error 2
> 
> #################################################################

-- 
Eric G. Miller <egm2 at jps.net>

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