[GRASS5] Problem compiling Grass51

Paul Kelly paul-grass at stjohnspoint.co.uk
Tue Apr 29 11:18:17 EDT 2003


On Tue, 29 Apr 2003, Markus Neteler wrote:

> right now (before reading this mail) I have submitted the dependencies for
> all LIBs. The next changes I would leave to an expert - as I don't know too
> much about Makefiles. On my Linux boxes it works well, but I have neither
> access to SGI nor Solaris to try there.

I don't see how d.where could compile anywhere the way it currently is (I
presume Bob is using Linux as well?) As I understand it the dependency has
to be an actual file or list of files that make can check to see when they
were last modified. The dependencies follow a colon on the makefile. And
underneath that are instructions for compiling the output program.

Before fixing it we have to know why it is done like that, with the full
pathname of the static library. Why not do it like GPROJLIB = -lproj,
GISLIB = -lgis etc. in GRASS 5.0. Neater looking and makes it possible to
use shared libraries.

> > I fixed it by sort of swapping round the definitions of $(GPROJLIB) and
> > $(GPROJDEP); probably this file needs to be re-arranged:
> > GPROJDEP    = $(ARCH_LIBDIR)/$(LIB_PREFIX)$(GPROJ_LIBNAME).$(LIB_SUFFIX)
> > first and then
> > GPROJLIB    = $(GPROJDEP) $(PROJLIB)
> > further down in the file. grass/src/CMD/generic/make.mid gives a clue as
> > to how this should be done properly.
> >
> > BTW I still can't compile d.where as there is a vsnprintf() somewhere in
> > libgrass_gis.a according to the error message.
>
> Here it is:
> ./lib/gis/debug.c

I think we need a G_snprintf() and G_vsnprintf() or something like that.
Would it be all right just to copy the code straight from a 3rd party snprintf
implementation to enable this?


> > I don't use GRASS 5.1 as it
> > is full of Linux-isms etc. and I can never get it to compile properly on the
> > Irix system I use most of them (GRASS 5.0 was like this also a year or two
> > ago but it is much tidier now).
>
> Would you mind to post the error messages? Only then we could avoid
> problems we are not aware of.

I will make a start (see below). It can be an occasional series...

make[2]: Entering
directory `/indigo-disk2/grass/grass51/lib/form' cc
-L/indigo-disk2/grass/grass51/dist.mips-sgi-irix6.2/lib
-L/indigo-disk2/grass/doom.ee.qub.ac.uk/lib -o
/indigo-disk2/grass/grass51/dist.mips-sgi-irix6.2/etc/form/form
OBJ.mips-sgi-irix6.2/form.o
/indigo-disk2/grass/grass51/dist.mips-sgi-irix6.2/lib/libgrass_dbmi.a
/indigo-disk2/grass/grass51/dist.mips-sgi-irix6.2/lib/libgrass_gis.a
-L/indigo-disk2/grass/doom.ee.qub.ac.uk/lib -ltk -lm -ltcl -lm \
                         -lm -lz
/indigo-disk2/grass/doom.ee.qub.ac.uk/lib/libsnprintf.a ld: WARNING 84:
/indigo-disk2/grass/doom.ee.qub.ac.uk/lib/libz.a is not used for resolving
any symbol. ld: ERROR 33: Unresolved text symbol "G_setenv2" -- 1st
referenced by
/indigo-disk2/grass/grass51/dist.mips-sgi-irix6.2/lib/libgrass_dbmi.a(connect.o).
ld: ERROR 33: Unresolved text symbol "G__getenv2" -- 1st referenced by
/indigo-disk2/grass/grass51/dist.mips-sgi-irix6.2/lib/libgrass_dbmi.a(connect.o).
ld: INFO 152: Output file removed because of error. make[2]: ***
[/indigo-disk2/grass/grass51/dist.mips-sgi-irix6.2/etc/form/form] Error 1
make[2]: Leaving directory `/indigo-disk2/grass/grass51/lib/form' make[1]:
*** [subdirs] Error 1 make[1]: Leaving directory
`/indigo-disk2/grass/grass51/lib' make: *** [default] Error 1




More information about the grass-dev mailing list