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

GRASS GIS trac at osgeo.org
Tue Jul 14 04:57:48 EDT 2009


#620: Platform.make odd variables settings
---------------------------+------------------------------------------------
  Reporter:  frankie       |       Owner:  grass-dev at 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>
GRASS GIS <http://grass.osgeo.org>


More information about the grass-dev mailing list