[GRASSLIST:2455] Re: compiling module s.kernel; for GRASS 5.0.3 binary Linux (SuSE 8.2)

Glynn Clements glynn.clements at virgin.net
Tue Feb 3 20:02:55 EST 2004


Lars Forseth wrote:

> I've just installed 5.0.3, binary for linux, on a SuSE 8.2 system.
> 
> How do I compile/get the module s.kernel into that? (I.E do I need to compile 
> all from source?)

If you need to compile any non-trivial module, you need the GRASS
source code.

Fortunately, s.kernel is sufficiently trivial that it should be
possible to compile it without the GRASS source code:

	cd /usr/src/grass/src/sites/s.kernel/
	gcc -c -I/usr/local/grass5/include main.c
	gcc -c -I/usr/local/grass5/include function.c
	gcc -L/usr/local/grass5/lib -o /usr/local/grass5/etc/bin/cmd/s.kernel main.o function.o -lgis -ldatetime -lm -lz
	ln /usr/local/grass5/etc/bin/cmd/s.kernel /usr/local/grass5/bin/s.kernel

[You still need the source code for s.kernel, obviously.]

In general, if a module only needs libgis (and libdatetime, which is
required by libgis), it can be built without having the GRASS source
code.

OTOH, if a module needs other libraries (e.g. vector or display
libraries), you need the GRASS source code, as binary packages don't
include the necessary libraries or their associated header files.

Also, you can't use the "gmake5" script or the Gmakefiles without
having the GRASS source code (you also need to have run configure, and
to have at least let "make" run for a few seconds).

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




More information about the grass-user mailing list