[GRASSLIST:1816] 5.0.3 compilation problems

Hi,

I'm building 5.0.3 on my Mac (OS 10.2.8) and I get compilation errors with a lot of proj involved modules (similar list to Byron Amerson's recent post - Grasslist:1729).

As an example from a build log:

GISGEN: src/sites/s.proj - Tue Nov 18 17:46:22 GMT 2003

#################################################################
/usr/local/src/grass-5.0.3/src/sites/s.proj
  mkdir OBJ.powerpc-apple-darwin6.8
  make -f OBJ.powerpc-apple-darwin6.8/make.rules

gcc -I/usr/local/src/grass-5.0.3/src/include -g -O2 -I/usr/local/include/ -c main.c -o > OBJ.powerpc-apple-darwin6.8/main.o
gcc -L/usr/local/src/grass-5.0.3/src/libes/LIB.powerpc-apple-darwin6.8 -L/usr/local/lib/ -o /usr/local/src/grass-5.0.3/dist.powerpc-apple-darwin6.8/etc/bin/cmd/s.proj OBJ.powerpc-apple-darwin6.8/main.o -lproj -lgis -ldatetime -lz
ld: Undefined symbols:
_pj_get_kv
_set_datumshift
make[1]: *** [/usr/local/src/grass-5.0.3/dist.powerpc-apple-darwin6.8/etc/bin/cmd/s.proj] Error 1
GISGEN failure at STEP: src/sites/s.proj

I have proj.4 installed and working on my machine:

[doibook:~] dorme% proj
Rel. 4.4.7, 31 March 2003
usage: proj [ -beEfiIlormsStTvVwW [args] ] [ +opts[=arg] ] [ files ]

Can anyone suggest a solution?

Many thanks,
David

David Orme wrote:

I'm building 5.0.3 on my Mac (OS 10.2.8) and I get compilation errors
with a lot of proj involved modules (similar list to Byron Amerson's
recent post - Grasslist:1729).

As an example from a build log:

> ld: Undefined symbols:
> _pj_get_kv
> _set_datumshift

GRASS includes and uses a modified version of the PROJ library. These
symbols are present in the modified version, but not in the standard
version. Unfortunately, the Mac's linker uses the installed version in
preference to that included with GRASS.

Can anyone suggest a solution?

Two alternative approaches:

1. Remove, rename or move the dynamic PROJ library (probably
libproj.dylib) which is installed on the system, so that it can't be
found when building GRASS. You can put it back afterwards.

2. In src/CMD/generic/make.mid, change the lines:

  DEPGPROJLIB = $(LIBDIR)/libproj.a
  GPROJLIB = -lproj
to:
  DEPGPROJLIB = $(LIBDIR)/libgproj.a
  GPROJLIB = -lgproj $(PROJLIB)

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