[GRASS-user] compile addon module with debian grass-dev package

[renaming subject]

Seb wrote:

Trying to compile a module (v.in.gshhs) following these
instructions I did (first relevant output lines only):

---<--------------------cut
here---------------start------------------->---
$ sudo make MODULE_TOPDIR=/usr/lib/grass64
mkdir -p
/build/buildd/grass-6.4.0~rc4/bin.x86_64-pc-linux-gnu
mkdir -p
/build/buildd/grass-6.4.0~rc4/dist.x86_64-pc-linux-gnu/include/grass
mkdir -p
/build/buildd/grass-6.4.0~rc4/dist.x86_64-pc-linux-gnu/lib
mkdir -p
/build/buildd/grass-6.4.0~rc4/dist.x86_64-pc-linux-gnu/bin
mkdir -p
/build/buildd/grass-6.4.0~rc4/dist.x86_64-pc-linux-gnu/etc
mkdir -p
/build/buildd/grass-6.4.0~rc4/dist.x86_64-pc-linux-gnu/driver
mkdir -p
/build/buildd/grass-6.4.0~rc4/dist.x86_64-pc-linux-gnu/driver/db
mkdir -p
/build/buildd/grass-6.4.0~rc4/dist.x86_64-pc-linux-gnu/fonts
test -d OBJ.x86_64-pc-linux-gnu || mkdir -p
OBJ.x86_64-pc-linux-gnu
gcc
-I/build/buildd/grass-6.4.0~rc4/dist.x86_64-pc-linux-gnu/include
-Wall -g -O -I/usr/include/gdal
-DPACKAGE=\""grassmods"\" -I/usr/include/gdal
-I/build/buildd/grass-6.4.0~rc4/dist.x86_64-pc-linux-gnu/include
-o OBJ.x86_64-pc-linux-gnu/main.o -c main.c
main.c:30:23: error: grass/gis.h: No such file or
directory
main.c:31:24: error: grass/dbmi.h: No such file or
directory
main.c:32:24: error: grass/Vect.h: No such file or
directory
main.c:33:29: error: grass/gprojects.h: No such file or
directory
main.c:34:27: error: grass/glocale.h: No such file or
directory
---<--------------------cut
here---------------end--------------------->---

This is in Debian sid AMD64 (with grass-dev installeds, I
don't understand why gis.h is not found),

it should be there,
  http://packages.debian.org/sid/i386/grass-dev/filelist

ls will confirm :slight_smile:

where the /build path doesn't exist.
What variable needs to be passed to 'make' to set that
/build path so as not to create such top level directories
beyond GRASS that might pollute the system? Thanks.

is some enviro variable missing so that $VARIABLE/build/.../
becomes ""/build/... which tries to create a subdir off the
root dir which fails for a normal user account? (and since it
is broken, please don't try as root because who knows what
will happen :slight_smile:

?,
Hamish

On Wed, 27 May 2009 14:36:03 -0700 (PDT),
Hamish <hamish_b@yahoo.com> wrote:

[...]

it should be there,
http://packages.debian.org/sid/i386/grass-dev/filelist

ls will confirm :slight_smile:

Yes, these files are certainly there, but somehow are not found when
building.

where the /build path doesn't exist. What variable needs to be
passed to 'make' to set that /build path so as not to create such top
level directories beyond GRASS that might pollute the system? Thanks.

is some enviro variable missing so that $VARIABLE/build/.../ becomes
""/build/... which tries to create a subdir off the root dir which
fails for a normal user account?

Digging a bit, I found:

,-----[ /usr/lib/grass64/include/Make/Platform.make (lines: 66 - 70) ]
| # GRASS dirs
| GRASS_HOME = /build/buildd/grass-6.4.0~rc4
| RUN_GISBASE = /build/buildd/grass-6.4.0~rc4/dist.x86_64-pc-linux-gnu
| RUN_GISRC = ${ARCH_DISTDIR}/demolocation/.grassrc${GRASS_VERSION_MAJOR}${GRASS_VERSION_MINOR}
`-----

so this seems hard-coded, unless something like:

make MODULE_TOPDIR=/usr/lib/grass64 GRASS_HOME=/usr/lib/grass64 \
    RUN_GISBASE=/usr/lib/grass64

could actually work?

(and since it is broken, please don't try as root because who knows
what will happen :slight_smile:

... I was a bit reckless there, but it seems the only wild stuff was the
creation of the /build tree! Thanks.

Cheers,

--
Seb