[GRASS5] Re: pg grass darwin - working

Glynn Clements glynn.clements at virgin.net
Wed Sep 11 15:29:08 EDT 2002


[Note: lines which are indented with ": " are from your make.log file.]

andy agena wrote:

> Well, I have PostgreSQL 7.2.2 running with GRASS, though I'm not really 
> sure why (well, I do need to add my grass user account to my postgresql 
> group to use it, but g.*.pg's are now in my bin--g.select.pg only 
> squawks about me not being part of the proper group).  I added the 
> quotes around postgres-includes two paths, but that's about it.
> 
> the only configure errors are:
> 
> Compilation error in module: src/libes/vect32/georef (ignored)

: gcc -L/Users/andyagena/Desktop/grass-5_0_0_src_0/grass-5.0.0/src/libes/LIB.powerpc-apple-darwin6.0 -L/sw/lib  -o /Users/andyagena/Desktop/grass-5_0_0_src_0/grass-5.0.0/dist.powerpc-apple-darwin6.0/etc/geo.point  OBJ.powerpc-apple-darwin6.0/bin_point.o  LIB.powerpc-apple-darwin6.0/libgeo.a -lgis -llock  -lz  
: ld: Undefined symbols:
: _ax
: _ay
: _bx
: _by
: _use

I've seen this before; it may have been reported by yourself (the
other plausible candidate is Jeshua Lacock; I'm not aware of any other
MacOS X users). I'm not sure if it was solved, though.

These symbols should be defined in vars.o, inside libgeo.a:

$ nm LIB.i686-pc-linux-gnu/libgeo.a
[snip]
vars.o:
00000050 C ax
00000050 C ay
00000050 C bx
00000050 C by
00000004 C reg_cnt
00000050 C residuals
00000008 C rms
00000028 C use

> Compilation error in module: src/display/d.zoom (ignored)

: gcc -I/Users/andyagena/Desktop/grass-5_0_0_src_0/grass-5.0.0/src/include -g -O2   -I/sw/include   -c set.c -o OBJ.powerpc-apple-darwin6.0/set.o
: set.c:11: conflicting types for `round'
: /usr/include/architecture/ppc/math.h:274: previous declaration of `round'

> Compilation error in module: src/imagery/i.pca (ignored)

: gcc -I/Users/andyagena/Desktop/grass-5_0_0_src_0/grass-5.0.0/src/include -g -O2   -I/sw/include   -c main.c -o OBJ.powerpc-apple-darwin6.0/main.o
: main.c:343: conflicting types for `round'
: /usr/include/architecture/ppc/math.h:274: previous declaration of `round'

A similar error has recently been reported for the latest version of
Cygwin.

Check whether your version of gcc has an option to disable C9X
features. C9X adds several new functions to existing ANSI C headers;
this causes problems for existing code which already uses those names
for something else.

Ultimately, GRASS will need to become C9X compatible rather quickly. 
It seems that the gcc developers have caught "free software
developers' disease" (i.e. "anything more than three months old is
obsolete, and no longer supported; all existing code must be upgraded
accordingly").

> Compilation error in module: src/raster/r.in.gdal (ignored)

: gcc -L/Users/andyagena/Desktop/grass-5_0_0_src_0/grass-5.0.0/src/libes/LIB.powerpc-apple-darwin6.0 -L/sw/lib -o /Users/andyagena/Desktop/grass-5_0_0_src_0/grass-5.0.0/dist.powerpc-apple-darwin6.0/etc/bin/cmd/r.in.gdal OBJ.powerpc-apple-darwin6.0/main.o OBJ.powerpc-apple-darwin6.0/gbgetsymbol.o OBJ.powerpc-apple-darwin6.0/gdalbridge.o OBJ.powerpc-apple-darwin6.0/make_loc.o \
: 	-ldl -lgis -lI -lproj  -lz  
: ld: Undefined symbols:
: _GBGetSymbol

This is defined in src/raster/r.in.gdal/gbgetsymbol.c. There are two
implementations:

1. The Unix dlopen/dlsym version, which is conditionalised upon:

	#if defined(__unix) || defined(__unix__)

2. The Windows LoadLibrary/GetProcAddress version, which is
conditionalised upon:

	#ifdef _WIN32

Presumably your gcc defines neither __unix nor __unix__; do you have
any idea what it does define? Try "gcc -E -dM foo.c", where foo.c is
an empty file.

Also, you could try linking directly against GDAL, instead of using
the "bridge" (dynamic loading) code, by using the --with-gdal
configure switch.

> Compilation error in module: src/raster/r.sun (ignored)

: gcc -I/Users/andyagena/Desktop/grass-5_0_0_src_0/grass-5.0.0/src/include -g -O2   -I/sw/include   -c main.c -o OBJ.powerpc-apple-darwin6.0/main.o
: main.c:46: header file 'malloc.h' not found

This is a straight bug (probably from someone who learned to program
with Borland C, where malloc() really is in "malloc.h"). According to
ANSI, the correct header is <stdlib.h>.

> Compilation error in module: src.contrib/GMSL/g3d/src3d/sites/s.vol.rst 
> (ignored

gcc -I/Users/andyagena/Desktop/grass-5_0_0_src_0/grass-5.0.0/src/include -g -O2   -I/sw/include   -c main.c -o OBJ.powerpc-apple-darwin6.0/main.o
main.c:33: header file 'malloc.h' not found

Ditto.

-- 
Glynn Clements <glynn.clements at virgin.net>




More information about the grass-dev mailing list