[GRASS5] Solaris, GRASS 5.1, and Proj

Wallace, Beverly T beverly.t.wallace at lmco.com
Tue Sep 16 13:49:55 EDT 2003


Thanks for the advice.  I've installed PROJ 4.4.7.

I ran "make distclean" and configured both 50 and 51 for the external PROJ.  
There were no problems making 50.

But I have trouble making lib/proj in 51.  I'm using GNU make.

It fails with the following message:
	gcc  
	-L/sim/home1/Grass/grass5.1/grass51_exp_2003_09_06/dist.sparc-sun-solaris2.9/lib 
	  -Wl,-R, -shared    \
	        OBJ.sparc-sun-solaris2.9/get_proj.o OBJ.sparc-sun-solaris2.9/do_proj.o 
	OBJ.sparc-sun-solaris2.9/convert.o OBJ.sparc-sun-solaris2.9/datum.o 
	OBJ.sparc-sun-solaris2.9/ellipse.o  -o 
	/sim/home1/Grass/grass5.1/grass51_exp_2003_09_06/dist.sparc-sun-solaris2.9/lib/l
	ibgrass_gproj.so
	make[2]: *** No rule to make target 
	`/sim/home1/Grass/grass5.1/grass51_exp_2003_09_06/dist.sparc-sun-solaris2.9/etc/
	nad', needed by `default'.  Stop.
	make[2]: Leaving directory 
	`/sim/home1/Grass/grass5.1/grass51_exp_2003_09_06/lib/proj'
	make[1]: *** [subdirs] Error 1
Note, the $(GISBASE)/etc/nad directory does not yet exist.  If I create etc/nad, "make" does nothing and leaves the directory empty.

The Makefile looks like:
	MODULE_TOPDIR = ../..

	LIB_NAME = $(GPROJ_LIBNAME)

	EXTRA_CFLAGS = $(PICFLAGS)
	EXTRA_INC = $(PROJINC)

	LIB_OBJS = get_proj.o do_proj.o convert.o datum.o ellipse.o

	NAD_TABLES = FL.lla MD.lla TN.lla WI.lla WO.lla alaska.lla conus.lla \
	             hawaii.lla prvi.lla stgeorge.lla stlrnc.lla stpaul.lla

	NT_TABLES = ntv1_can.dat nzgd2kgrid0005.gsb

	$(NAD2BIN): nad2bin.o
		$(CC) $(LDFLAGS) $? -o $@

	$(NAD_DIR): $(NAD_TABLES) $(NT_TABLES) $(NAD2BIN)
		@ if [ ! -d $@ ] ; then mkdir $@ ; fi
		for i in $(NAD_TABLES) ; do $(NAD2BIN) < $$i $@/`echo $$i | sed 
	's/.lla//'`; done
		cp -f $(NT_TABLES) $@
		@ touch $@

	NAD_DIR = $(GISBASE)/etc/nad

	include $(MODULE_TOPDIR)/include/Make/Lib.make 

	default: lib $(NAD_DIR)

If I modify the Makefile to move the "NAD_DIR =" line after the "NT_TABLE=" line, I get a different error message:
	mkdir: Failed to make directory "/etc/nad"; Permission denied
	make: *** [/etc/nad] Error 2
It seems to have lost $(GISBASE).

If I also change $@ to $(NAD_DIR) in the $(NAD_DIR) target, the error messages are:
	wallace<640> make
	for i in FL.lla MD.lla TN.lla WI.lla WO.lla alaska.lla conus.lla hawaii.lla 
	prvi.lla stgeorge.lla stlrnc.lla stpaul.lla ; do  < $i 
	/sim/home1/Grass/grass5.1/grass51_exp_2003_09_06/dist.sparc-sun-solaris2.9/etc/n
	ad/`echo $i | sed 's/.lla//'`; done
	/bin/sh: 
	/sim/home1/Grass/grass5.1/grass51_exp_2003_09_06/dist.sparc-sun-solaris2.9/etc/n
	ad/FL: not found
	/bin/sh: 
	/sim/home1/Grass/grass5.1/grass51_exp_2003_09_06/dist.sparc-sun-solaris2.9/etc/n
	ad/MD: not found
	[snip]
	/bin/sh: 
	/sim/home1/Grass/grass5.1/grass51_exp_2003_09_06/dist.sparc-sun-solaris2.9/etc/n
	ad/stpaul: not found
	make: *** [/etc/nad] Error 1

Does anyone know what the problem could be?

- Bev Wallace

> -----Original Message-----
> From:	Paul Kelly [SMTP:paul-grass at stjohnspoint.co.uk]
> Sent:	Thursday, September 11, 2003 12:43 PM
> To:	Wallace, Beverly T
> Cc:	grass5 at grass.itc.it
> Subject:	Re: [GRASS5] Solaris, GRASS 5.1, and Proj
> 
> Hello
> 
> On Thu, 11 Sep 2003, Wallace, Beverly T wrote:
> 
> > Hi Grass Developers,
> >
> > I am trying to build the experimental GRASS 5.1.
> >
> > I downloaded the 2003_09_06 snapshots for 5.0 and 5.1.
> > I successfully built 5.0.
> > I am using a Sun with Solaris 9, gcc version 2.95.3, and GNU make.
> > I used configure --with-motif --without-postgres --without-odbc --without-fftw --without_gdal.
> >
> > (1)  When I tried to configure with proj, configure failed while trying to find proj_api.h.  But proj_api.h does not exist in either snapshot.  So I added --without_proj to the configure.
> 
> You need to have an external PROJ library from remotesensing.org> 
> installed, version 4.4.6 or later. GRASS 5.7 (as it is now) does not
> include the internal copy of PROJ any more so an external PROJ is an
> absolute requirement. This should probably be documented somewhere; I'm
> not familiar with all the 5.1/5.7 documentation and am not sure where is
> the best place; can you suggest a file this information could be added to?
> 
> >
> > (2)  There is no setenv function for Solaris.  I solved that by adding a setenv function in lib/db/dbmi_client/start.c.
> 
> No setenv in IRIX either. It was suggested to me before to replace
> setenv() by putenv() and I recall that that worked. I haven't had that
> particular error compiling on IRIX; maybe I have disabled something in
> configure that doesn't compile that part of the database code.
> 
> >
> > (3)  It then fails in lib/proj with the message
> > 	proj_api.h: No such file or directory
> > Is there supposed to be a proj_api.h file?
> > Since I configured without-proj, why is it trying to compile lib/proj?
> 
> (See above) It is set up that you are expected to have PROJ; quite a lot
> of modules depend on it and it would need more changes to all their
> Makefiles to disable compiling them if PROJ was not present. But could be
> done if we decided it was worthwhile. The PROJ library is small and easy
> to compile and install however.
> 
> Paul Kelly




More information about the grass-dev mailing list