[GRASS-dev] [GRASS GIS] #620: Platform.make odd variables settings

#620: Platform.make odd variables settings
-------------------------+--------------------------------------------------
Reporter: frankie | Owner: grass-dev@lists.osgeo.org
     Type: defect | Status: new
Priority: normal | Milestone: 6.4.0
Component: default | Version: 6.4.0 RCs
Keywords: | Platform: Unspecified
      Cpu: Unspecified |
-------------------------+--------------------------------------------------
A recent issue reported on debian:

,-----[ /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}
`-----

It seems to me that the grass building system is creating inconsistent
vars in Platform.make.

A build log
https://buildd.debian.org/fetch.cgi?pkg=grass;ver=6.4.0~rc4-3;arch=amd64;stamp=1242167209

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/620&gt;
GRASS GIS <http://grass.osgeo.org>

#620: Platform.make odd variables settings
--------------------------+-------------------------------------------------
  Reporter: frankie | Owner: grass-dev@lists.osgeo.org
      Type: defect | Status: new
  Priority: normal | Milestone: 6.4.0
Component: default | Version: 6.4.0 RCs
Resolution: | Keywords:
  Platform: Unspecified | Cpu: Unspecified
--------------------------+-------------------------------------------------
Comment (by frankie):

Sorry, a better view:

{{{
,-----[ /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}
`-----
}}}

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/620#comment:1&gt;
GRASS GIS <http://grass.osgeo.org>

#620: Platform.make odd variables settings
--------------------------+-------------------------------------------------
  Reporter: frankie | Owner: grass-dev@lists.osgeo.org
      Type: defect | Status: new
  Priority: normal | Milestone: 6.4.0
Component: default | Version: 6.4.0 RCs
Resolution: | Keywords:
  Platform: Unspecified | Cpu: Unspecified
--------------------------+-------------------------------------------------
Comment (by glynn):

Replying to [ticket:620 frankie]:
> A recent issue reported on debian:

> It seems to me that the grass building system is creating inconsistent
vars in Platform.make.

What exactly is the problem here?

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/620#comment:2&gt;
GRASS GIS <http://grass.osgeo.org>

#620: Platform.make odd variables settings
---------------------------+------------------------------------------------
  Reporter: frankie | Owner: grass-dev@lists.osgeo.org
      Type: defect | Status: new
  Priority: normal | Milestone: 6.4.0
Component: Installation | Version: 6.4.0 RCs
Resolution: | Keywords:
  Platform: Unspecified | Cpu: Unspecified
---------------------------+------------------------------------------------
Changes (by hamish):

  * component: default => Installation

Comment:

Glynn:
> What exactly is the problem here?

Debian ships a grass-dev package with include/Make, .h and friends.

This way people with grass installed from the binary packages can
compile addon modules by using:
{{{
  make MODULE_TOPDIR=/usr/lib/grass
}}}

instead of having to maintain & build the entire source tree.

because Platform.make does not get modified to use --prefix=/usr during
the 'make install' step, the debian package is left with remnant chroot
build directory names there.

For anyone building from source, and those of us running directly from the
src/dist.i686* dir (never ran 'make install') the given build dir is
appropriate.

see
  http://thread.gmane.org/gmane.comp.gis.grass.user/29683/focus=29684

Hamish

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/620#comment:3&gt;
GRASS GIS <http://grass.osgeo.org>

#620: Platform.make odd variables settings
---------------------------+------------------------------------------------
  Reporter: frankie | Owner: grass-dev@lists.osgeo.org
      Type: defect | Status: new
  Priority: normal | Milestone: 6.4.0
Component: Installation | Version: 6.4.0 RCs
Resolution: | Keywords:
  Platform: Unspecified | Cpu: Unspecified
---------------------------+------------------------------------------------
Comment (by glynn):

Replying to [comment:3 hamish]:

> > What exactly is the problem here?
>
> Debian ships a grass-dev package with include/Make, .h and friends.

I see now.

"make install" should probably modify the GRASS_HOME setting in
Platform.make similar to the modification of GISBASE in the grassNN[.bat]
scripts and etc/fontcap.

At the very least, RUN_GISBASE should probably be set to either
$(GRASS_HOME)/dist.$(ARCH) or $(ARCH_DISTDIR) in Grass.make, rather than
being substituted by configure.

But there's still a lot more work to be done in disentangling the GRASS,
source and output directories so that building against an installed
version of GRASS works correctly. E.g. both BIN and INC are defined
relative to ARCH_DISTDIR, so you can't re-build a module against installed
headers without installing the resulting module.

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/620#comment:4&gt;
GRASS GIS <http://grass.osgeo.org>

#620: Platform.make odd variables settings
---------------------------+------------------------------------------------
  Reporter: frankie | Owner: grass-dev@lists.osgeo.org
      Type: defect | Status: new
  Priority: normal | Milestone: 6.4.0
Component: Installation | Version: 6.4.0 RCs
Resolution: | Keywords:
  Platform: Unspecified | Cpu: Unspecified
---------------------------+------------------------------------------------
Comment (by mlennert):

Replying to [comment:3 hamish]:
> Glynn:
> > What exactly is the problem here?
>
> Debian ships a grass-dev package with include/Make, .h and friends.
>
> This way people with grass installed from the binary packages can
> compile addon modules by using:
> {{{
> make MODULE_TOPDIR=/usr/lib/grass
> }}}
>
> instead of having to maintain & build the entire source tree.
>
> because Platform.make does not get modified to use --prefix=/usr during
the 'make install' step, the debian package is left with remnant chroot
build directory names there.
>
> For anyone building from source, and those of us running directly from
the src/dist.i686* dir (never ran 'make install') the given build dir is
appropriate.
>
>
> see
> http://thread.gmane.org/gmane.comp.gis.grass.user/29683/focus=29684
>

While waiting for a solution to this, what is the recommended way of
compiling addons without downloading the entire source tree ?

Moritz

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/620#comment:5&gt;
GRASS GIS <http://grass.osgeo.org>

#620: Platform.make odd variables settings
---------------------------+------------------------------------------------
  Reporter: frankie | Owner: grass-dev@lists.osgeo.org
      Type: defect | Status: new
  Priority: normal | Milestone: 6.4.0
Component: Installation | Version: 6.4.0 RCs
Resolution: | Keywords:
  Platform: Unspecified | Cpu: Unspecified
---------------------------+------------------------------------------------
Comment (by neteler):

Replying to [comment:5 mlennert]:
> what is the recommended way of compiling addons without downloading the
entire source tree ?

Won't the new g.extension script do the job?

Markus

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/620#comment:6&gt;
GRASS GIS <http://grass.osgeo.org>

#620: Platform.make odd variables settings
---------------------------+------------------------------------------------
  Reporter: frankie | Owner: grass-dev@lists.osgeo.org
      Type: defect | Status: new
  Priority: normal | Milestone: 6.4.0
Component: Installation | Version: 6.4.0 RCs
Resolution: | Keywords:
  Platform: Unspecified | Cpu: Unspecified
---------------------------+------------------------------------------------
Comment (by hamish):

Replying to [comment:5 mlennert]:
> While waiting for a solution to this, what is the recommended
> way of compiling addons without downloading the entire source
> tree ?

try
{{{
svn checkout --non-recursive https://svn.osgeo.org/grass/grass-
addons/path/to/addon/
cd /path/to/addon/
make MODULE_TOPDIR=/path/to/grass_source_tree/
}}}

you probably would not use --non-recursive in this case, but it may give
you an idea how it can be made to be flexible.

Hamish

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/620#comment:7&gt;
GRASS GIS <http://grass.osgeo.org>

#620: Platform.make odd variables settings
---------------------------+------------------------------------------------
  Reporter: frankie | Owner: grass-dev@lists.osgeo.org
      Type: defect | Status: new
  Priority: normal | Milestone: 6.4.0
Component: Installation | Version: 6.4.0 RCs
Resolution: | Keywords:
  Platform: Unspecified | Cpu: Unspecified
---------------------------+------------------------------------------------
Comment (by mlennert):

Replying to [comment:7 hamish]:
> Replying to [comment:5 mlennert]:
> > While waiting for a solution to this, what is the recommended
> > way of compiling addons without downloading the entire source
> > tree ?
>
> try
> {{{
> svn checkout --non-recursive https://svn.osgeo.org/grass/grass-
addons/path/to/addon/
> cd /path/to/addon/
> make MODULE_TOPDIR=/path/to/grass_source_tree/
> }}}

So this means that there is no way to avoid downloading the entire source
tree ?

Moritz

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/620#comment:8&gt;
GRASS GIS <http://grass.osgeo.org>

#620: Platform.make odd variables settings
---------------------------+------------------------------------------------
  Reporter: frankie | Owner: grass-dev@lists.osgeo.org
      Type: defect | Status: new
  Priority: normal | Milestone: 6.4.0
Component: Installation | Version: 6.4.0 RCs
Resolution: | Keywords:
  Platform: Unspecified | Cpu: Unspecified
---------------------------+------------------------------------------------
Comment (by hamish):

Replying to [comment:8 mlennert]:
> So this means that there is no way to avoid downloading the
> entire source tree ?

no, just the opposite.

e.g. to download v.strahler:

{{{
svn checkout https://svn.osgeo.org/grass/grass-addons/vector/v.strahler
}}}

Hamish

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/620#comment:9&gt;
GRASS GIS <http://grass.osgeo.org>

#620: Platform.make odd variables settings
---------------------------+------------------------------------------------
  Reporter: frankie | Owner: grass-dev@lists.osgeo.org
      Type: defect | Status: new
  Priority: normal | Milestone: 6.4.0
Component: Installation | Version: 6.4.0 RCs
Resolution: | Keywords:
  Platform: Unspecified | Cpu: Unspecified
---------------------------+------------------------------------------------
Comment (by mlennert):

Replying to [comment:9 hamish]:
> Replying to [comment:8 mlennert]:
> > So this means that there is no way to avoid downloading the
> > entire source tree ?
>
> no, just the opposite.
>
> e.g. to download v.strahler:
>
> {{{
> svn checkout https://svn.osgeo.org/grass/grass-addons/vector/v.strahler
> }}}
>

I'm not talking about checking out the AddOn, I'm talking about compiling
it. You suggest:

{{{
make MODULE_TOPDIR=/path/to/grass_source_tree/
}}}

which indicates that I need the source tree for compilation...

I am looking for a way to get the equivalent of

{{{
make MODULE_TOPDIR=/usr/lib/grass
}}}

but working around the bug reported here...

This is not for me, but for my students who would like to install some
addons, and so I would like to know if there is any way for them to do so
currently, using the grass-dev package, or whether this bug makes this
impossible.

Moritz

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/620#comment:10&gt;
GRASS GIS <http://grass.osgeo.org>

#620: Platform.make odd variables settings
---------------------------+------------------------------------------------
  Reporter: frankie | Owner: grass-dev@lists.osgeo.org
      Type: defect | Status: new
  Priority: normal | Milestone: 6.4.0
Component: Installation | Version: 6.4.0 RCs
Resolution: | Keywords:
  Platform: Unspecified | Cpu: Unspecified
---------------------------+------------------------------------------------
Comment (by mlennert):

Replying to [comment:6 neteler]:
> Replying to [comment:5 mlennert]:
> > what is the recommended way of compiling addons without downloading
the entire source tree ?
>
> Won't the new g.extension script do the job?
>

Here are my attempts (using self-compiled 6.4svn debian package after
having moved the original build tree to simulate use on a different
machine):

{{{
Compiling 'r.terracost'...
Makefile:15: warning: overriding commands for target
`/home/mlennert/SRC/GRASS/grass64_release/dist.i486-pc-linux-
gnu/bin/r.terracost'
/usr/lib/grass/include/Make/Module.make:15: warning: ignoring old commands
for target `/home/mlennert/SRC/GRASS/grass64_release/dist.i486-pc-linux-
gnu/bin/r.terracost'
mkdir -p /home/mlennert/SRC/GRASS/grass64_release/bin.i486-pc-linux-gnu
mkdir -p /home/mlennert/SRC/GRASS/grass64_release/dist.i486-pc-linux-
gnu/include/grass
mkdir -p /home/mlennert/SRC/GRASS/grass64_release/dist.i486-pc-linux-
gnu/lib
mkdir -p /home/mlennert/SRC/GRASS/grass64_release/dist.i486-pc-linux-
gnu/bin
mkdir -p /home/mlennert/SRC/GRASS/grass64_release/dist.i486-pc-linux-
gnu/etc
mkdir -p /home/mlennert/SRC/GRASS/grass64_release/dist.i486-pc-linux-
gnu/driver
mkdir -p /home/mlennert/SRC/GRASS/grass64_release/dist.i486-pc-linux-
gnu/driver/db
mkdir -p /home/mlennert/SRC/GRASS/grass64_release/dist.i486-pc-linux-
gnu/fonts
test -d OBJ.i486-pc-linux-gnu || mkdir -p OBJ.i486-pc-linux-gnu
c++ -I/home/mlennert/SRC/GRASS/grass64_release/dist.i486-pc-linux-
gnu/include -g -O2 -DPACKAGE=\""grassmods"\"
-I/home/mlennert/SRC/GRASS/grass64_release/dist.i486-pc-linux-gnu/include
-o OBJ.i486-pc-linux-gnu/boundary.o -c boundary.cc
In file included from boundary.cc:18:
boundary.h:22:32: error: grass/iostream/ami.h: No such file or directory
In file included from boundary.h:25,
                  from boundary.cc:18:
common.h:30:23: error: grass/gis.h: No such file or directory
In file included from boundary.cc:22:
pqueue.h:24:31: error: grass/iostream/mm.h: No such file or directory
[...]
make: *** [OBJ.i486-pc-linux-gnu/boundary.o] Error 1
ERROR: Compilation failed, sorry. Please check above error messages.
}}}

i.e.: it obviously cannot find the headers since it is looking for them in
the original build directory.

If I go into /usr/lib/grass/include/Make/Platform.make and set GRASS_HOME
to /usr/lib/grass, I get:

{{{
Makefile:15: warning: overriding commands for target `/usr/lib/grass/dist.
i486-pc-linux-gnu/bin/r.terracost'
/usr/lib/grass/include/Make/Module.make:15: warning: ignoring old commands
for target `/usr/lib/grass/dist.i486-pc-linux-gnu/bin/r.terracost'
mkdir -p /usr/lib/grass/bin.i486-pc-linux-gnu
mkdir: cannot create directory `/usr/lib/grass/bin.i486-pc-linux-gnu':
Permission denied
make: *** [/usr/lib/grass/bin.i486-pc-linux-gnu] Error 1
ERROR: Compilation failed, sorry. Please check above error messages.
}}}

And even if I use the original grass-dev with GRASS_HOME pointing to the
local build directory and keep this directory accessible, I get:

{{{
Installing 'r.terracost'...
Makefile:15: warning: overriding commands for target
`/home/mlennert/SRC/GRASS/grass64_release/dist.i486-pc-linux-
gnu/bin/r.terracost'
/usr/lib/grass/include/Make/Module.make:15: warning: ignoring old commands
for target `/home/mlennert/SRC/GRASS/grass64_release/dist.i486-pc-linux-
gnu/bin/r.terracost'
/usr/bin/install -c /home/mlennert/SRC/GRASS/grass64_release/dist.i486-
pc-linux-gnu/bin/r.terracost /home/mlennert/.grass/addons/bin/
/usr/bin/install: target `/home/mlennert/.grass/addons/bin/' is not a
directory: No such file or directory
make: *** [install] Error 1
WARNING: Installation failed, sorry. Please check above error messages.
}}}

If I create the .grass/addons/bin directory by hand, I get:

{{{
Installing 'r.terracost'...
Makefile:15: warning: overriding commands for target
`/home/mlennert/SRC/GRASS/grass64_release/dist.i486-pc-linux-
gnu/bin/r.terracost'
/usr/lib/grass/include/Make/Module.make:15: warning: ignoring old commands
for target `/home/mlennert/SRC/GRASS/grass64_release/dist.i486-pc-linux-
gnu/bin/r.terracost'
/usr/bin/install -c /home/mlennert/SRC/GRASS/grass64_release/dist.i486-
pc-linux-gnu/bin/r.terracost /home/mlennert/.grass/addons/bin/
/usr/bin/install -c -m 644 /home/mlennert/SRC/GRASS/grass64_release/dist.
i486-pc-linux-gnu/docs/html/r.terracost.html
/home/mlennert/.grass/addons/docs/html/
/usr/bin/install: target `/home/mlennert/.grass/addons/docs/html/' is not
a directory: No such file or directory
make: *** [install] Error 1
WARNING: Installation failed, sorry. Please check above error messages.
}}}

I'll stop here before this becomes more of a bug report on g.extension
than on the current issue, but it would be nice to get to a situation
where by installing the grass binaries and libs and the grass headers, it
is possible to compile extensions without needing the source tree.

Moritz

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/620#comment:11&gt;
GRASS GIS <http://grass.osgeo.org>

#620: Platform.make odd variables settings
---------------------------+------------------------------------------------
  Reporter: frankie | Owner: grass-dev@lists.osgeo.org
      Type: defect | Status: new
  Priority: normal | Milestone: 6.4.0
Component: Installation | Version: 6.4.0 RCs
Resolution: | Keywords:
  Platform: Unspecified | Cpu: Unspecified
---------------------------+------------------------------------------------
Comment (by glynn):

Replying to [comment:10 mlennert]:

> I'm not talking about checking out the AddOn, I'm talking about
compiling it. You suggest:
>
{{{
make MODULE_TOPDIR=/path/to/grass_source_tree/
}}}
>
> which indicates that I need the source tree for compilation...
>
> I am looking for a way to get the equivalent of
>
{{{
make MODULE_TOPDIR=/usr/lib/grass
}}}

This should work in 7.0, although you also may also need to set GISBASE,
ARCH_DISTDIR and/or RUN_GISBASE.

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/620#comment:12&gt;
GRASS GIS <http://grass.osgeo.org>

#620: Platform.make odd variables settings
---------------------------+------------------------------------------------
  Reporter: frankie | Owner: grass-dev@lists.osgeo.org
      Type: defect | Status: new
  Priority: normal | Milestone: 6.4.0
Component: Installation | Version: 6.4.0 RCs
Resolution: | Keywords:
  Platform: Linux | Cpu: Unspecified
---------------------------+------------------------------------------------
Changes (by neteler):

  * platform: Unspecified => Linux

Comment:

Same problem on Ubuntu apparently:

http://lists.osgeo.org/pipermail/grass-user/2009-August/052073.html

http://lists.osgeo.org/pipermail/grass-user/2009-August/052074.html

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/620#comment:13&gt;
GRASS GIS <http://grass.osgeo.org>

#620: Platform.make odd variables settings
--------------------------+-------------------------------------------------
Reporter: frankie | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 6.4.0
Component: Installation | Version: 6.4.0 RCs
Keywords: | Platform: Linux
      Cpu: Unspecified |
--------------------------+-------------------------------------------------

Comment(by neteler):

Same problem on OpenSuSe:

http://osgeo-org.1803224.n2.nabble.com/Installing-r-area-
td5340139.html#a5363725

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/620#comment:14&gt;
GRASS GIS <http://grass.osgeo.org>

#620: Platform.make odd variables settings
--------------------------+-------------------------------------------------
Reporter: frankie | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 6.4.1
Component: Installation | Version: 6.4.0 RCs
Keywords: g.extension | Platform: Linux
      Cpu: Unspecified |
--------------------------+-------------------------------------------------
Changes (by hamish):

  * keywords: => g.extension
  * milestone: 6.4.0 => 6.4.1

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/620#comment:15&gt;
GRASS GIS <http://grass.osgeo.org>

#620: Platform.make odd variables settings
--------------------------+-------------------------------------------------
Reporter: frankie | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 6.4.1
Component: Installation | Version: 6.4.0 RCs
Keywords: g.extension | Platform: Linux
      Cpu: Unspecified |
--------------------------+-------------------------------------------------

Comment(by hamish):

see also #854, #1178, and #1180

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/620#comment:16&gt;
GRASS GIS <http://grass.osgeo.org>

#620: Platform.make odd variables settings
--------------------------+-------------------------------------------------
Reporter: frankie | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 6.4.1
Component: Installation | Version: 6.4.0 RCs
Keywords: g.extension | Platform: Linux
      Cpu: Unspecified |
--------------------------+-------------------------------------------------

Comment(by hamish):

hopefully now fixed for 'make install' in 6.5svn. some calls to sed in the
`install` target in the Makefile now replace the build dir with the
install dir as part of the install process.

if distro package install scripts are not using 'make install' they'll
have to recreate this step themselves.

combined patch for 6.4svn from r43737, r43748, r43749, r43811:
{{{
Index: Makefile

--- Makefile (revision 43826)
+++ Makefile (working copy)
@@ -95,6 +95,7 @@
         -cp -f $(FILES) ${ARCH_DISTDIR}/
         -cp -f
${ARCH_BINDIR}/grass${GRASS_VERSION_MAJOR}${GRASS_VERSION_MINOR}
${ARCH_DISTDIR}/grass${GRASS_VERSION_MAJOR}${GRASS_VERSION_MINOR}.tmp
         @test -d ${ARCH_DISTDIR}/tools/ || mkdir -p ${ARCH_DISTDIR}/tools/
+ -${INSTALL} tools/g.html2man/g.html2man ${ARCH_DISTDIR}/tools/
2>/dev/null
         -${INSTALL} tools/mkhtml.sh ${ARCH_DISTDIR}/tools/ 2>/dev/null
         @(cd tools ; sh -c "./build_html_index.sh")
         @if [ `cat "$(ERRORLOG)" | wc -l` -gt 5 ] ; then \
@@ -288,6 +289,8 @@
         @ # default to be /usr/local
         @##### -cd ${GISBASE} ; tar cBf - man | (cd ${INST_DIR} ; tar xBf
- ) 2>/dev/null
         -cd ${GISBASE} ; tar cBf - include | (cd ${INST_DIR} ; tar xBf - )
2>/dev/null
+ -sed -i -e "s#^\(GRASS_HOME.[^=]*\).*#\1= ${INST_DIR}#" -e
"s#^\(RUN_GISBASE.[^=]*\).*#\1= ${INST_DIR}#"
${INST_DIR}/include/Make/Platform.make
+ -sed -i -e 's#/tools/g.html2man/g.html2man#/tools/g.html2man#'
${INST_DIR}/include/Make/Man.make
         -cd ${GISBASE} ; tar cBf - lib | (cd ${INST_DIR} ; tar xBf - )
2>/dev/null
         -sed 's#'${GISBASE}'#'${INST_DIR}'#g' ${GISBASE}/etc/monitorcap >
${INST_DIR}/etc/monitorcap
         -sed 's#'${GISBASE}'#'${INST_DIR}'#g' ${GISBASE}/etc/fontcap >
${INST_DIR}/etc/fontcap
}}}

Hamish

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/620#comment:17&gt;
GRASS GIS <http://grass.osgeo.org>

#620: Platform.make odd variables settings
--------------------------+-------------------------------------------------
Reporter: frankie | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 6.4.1
Component: Installation | Version: 6.4.0 RCs
Keywords: g.extension | Platform: Linux
      Cpu: Unspecified |
--------------------------+-------------------------------------------------

Comment(by neteler):

Please attach the patch as file, not inline, thanks.

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/620#comment:18&gt;
GRASS GIS <http://grass.osgeo.org>

#620: Platform.make odd variables settings
--------------------------+-------------------------------------------------
Reporter: frankie | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 6.4.1
Component: Installation | Version: 6.4.0 RCs
Keywords: g.extension | Platform: Linux
      Cpu: Unspecified |
--------------------------+-------------------------------------------------

Comment(by hamish):

latest g.extension from 6.5svn, built from source and 'make installed' to
/usr/local/ on linux:
{{{
GRASS65> g.extension i.landsat.toar
Fetching <i.landsat.toar> from GRASS-Addons SVN (be patient)...
A i.landsat.toar/landsat_set.c
A i.landsat.toar/local_proto.h
A i.landsat.toar/main.c
A i.landsat.toar/description.html
A i.landsat.toar/landsat.c
A i.landsat.toar/earth_sun.c
A i.landsat.toar/landsat.h
A i.landsat.toar/landsat_met.c
A i.landsat.toar/Makefile
A i.landsat.toar/earth_sun.h
Checked out revision 43842.
Compiling <i.landsat.toar>...
/usr/local/grass-6.5.svn/include/Make/Module.make:25: warning: overriding
commands for target `install'
/usr/local/grass-6.5.svn/include/Make/Rules.make:90: warning: ignoring old
commands for target `install'
mkdir -p /usr/local/grass-6.5.svn/bin.x86_64-unknown-linux-gnu
mkdir: cannot create directory `/usr/local/grass-6.5.svn/bin.x86_64
-unknown-linux-gnu': Permission denied
make: *** [/usr/local/grass-6.5.svn/bin.x86_64-unknown-linux-gnu] Error 1
ERROR: Compilation failed, sorry. Please check above error messages.
}}}

the problem is that the end-user doesn't have write permission to
/usr/local/grass-6.x/.

the goal is for the addon to compile in the .tmp/ dir where the source
code was downloaded, then be installed to the ~user/$ADDON_DIR later on.
but the current `make` request is trying to install it to (what we've
tricked it into thinking is) the build dir.

I'm not sure how to proceed; hopefully something can be passed on the
`make` command line to avoid this.

It works ok if grass was built from source (and that source tree still
exists, user can write to it, etc).

Hamish

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/620#comment:19&gt;
GRASS GIS <http://grass.osgeo.org>