[GRASS-dev] Re: [GRASS GIS] #854: g.extension does not work on a Mac (probably not on Windows either

GRASS GIS trac at osgeo.org
Sun May 8 19:47:26 EDT 2011


#854: g.extension does not work on a Mac (probably not on Windows either
---------------------------------+------------------------------------------
 Reporter:  cmbarton             |       Owner:  grass-dev@…              
     Type:  defect               |      Status:  new                      
 Priority:  normal               |   Milestone:  7.0.0                    
Component:  Installation         |     Version:  svn-trunk                
 Keywords:  g.extension, addons  |    Platform:  All                      
      Cpu:  OSX/Intel            |  
---------------------------------+------------------------------------------

Comment(by kyngchaos):

 I got a chance to poke around.

 Problems I identified:

  * as mentioned on the mailing list, $GRASS_ADDON_PATH can't be used
 because g.extension needs a single path, while GRASS_ADDON_PATH can have
 multiple paths, and does in my Mac distribution (a global and user addon
 path).  The workaround is to specify the user path when running
 g.extension.  That's:
    * `/Library/GRASS/6.4/Modules` for the global path for GRASS 6.4 (and
 6.5, just change the version in the path)
    * `~/Library/GRASS/6.4/Modules` for the user path (and similar for 6.5)
    *`/Library/Application Support/GRASS/7.0/Modules` for the global path
 for GRASS 7.0 (and similar for future versions)
    *`~/Library/Application Support/GRASS/7.0/Modules` for the user path
 for GRASS 7.0 (and similar for future versions)
  * the makefile parts are hardwired to the source.  This can be overridden
 when running make, it's just a matter of figuring out which to do.
  * the compile stage compiles to ARCH_DISTDIR, which is constructed from
 GISBASE, which is the installed app.  Even if the user uses a prefix that
 they have permissions to, they will still need admin privileges to compile
  * mkhtml.sh and g.html2man are not installed, so installation only
 partially succeeds - binaries are installed but not help files, and
 g.extension reports it as a failed install.

 I was able to get partial compilation and installation (without the help
 files) by overriding a few more make variables (patch attached):

  * ARCH_DISTDIR = TMPDIR/dist
  * ARCH_LIBDIR = GISBASE/lib
  * ARCH_INC = GISBASE/include, MYINST_DIR/include and TMPDIR/dist/include
  * ARCH_LIBPATH = GISBASE/lib, MYINST_DIR/lib and TMPDIR/dist/lib

 This will also find addon includes and libs that might be needed from
 another addon (ie for a group of addons).

 Fixing help compilation needs some more changes:

  * install tools/mkhtml.sh and tools/g.html2man
  * mkhtml.sh is found from MODULE_TOPDIR (in html.make), so that should
 work, but g.html2man is found from GRASS_HOME (in man.make).  Either
 change man.make to use MODULE_TOPDIR for consistency, or add another make
 override for GRASS_HOME.

-- 
Ticket URL: <https://trac.osgeo.org/grass/ticket/854#comment:5>
GRASS GIS <http://grass.osgeo.org>



More information about the grass-dev mailing list