[GRASS5] fink'ing grass on darwin/osx - $env(TCLTKGRASSBASE) error

hello all:

i decided to try my hand at compiling the grass5pre5 source within the fink structure (a great tool for os x / darwin users to get unix packages; see <http://fink.sourceforge.net/&gt;\). since fink has its own directory (/sw) i decided to put grass5 there (/sw/grass5) with the following:

sudo ./configure --prefix=/sw --with-includes=/sw/include --with-
libs=/sw/lib --with-tiff-includes=/sw/include --with-tiff-libs=/sw/lib --with-tcltk-includes=/sw/include --with-tcltk-libs=/sw/lib/tcl8.3 --with-gd-includes=/sw/include --with-opengl-includes=/usr/X11R6/include --with-fftw-includes=/sw/include --without-odbc --without-postgres

aside from the compilation errors below, this worked. i didn't include odbc or postgres, as they're not (yet) in the stable tree of fink; i'll add dbm, motif, freetype, and readline next ./configure, as i didn't have them fink'ed yet. g77 is also available via fink. as you can see, i've pointed configure to the fink includes and libs, tcltk included.

so my configuration is like this:

GRASS is now configured for powerpc-apple-darwin5.5

   Source directory: /sw/src/grass5.0.0pre5
   Build directory: /sw/src/grass5.0.0pre5
   Installation directory: /sw/grass5
   C compiler: gcc -g -O2
   FORTRAN compiler:

   NVIZ: yes

   X11 support: yes
   DBM support: no
   JPEG support: yes
   TIFF support: yes
   PNG support: yes
   GD support: yes
   Tcl/Tk support: yes
   PostgreSQL support: no
   OpenGL(R) support: yes
   ODBC support: no
   FFTW support: yes
   BLAS support: no
   LAPACK support: no
   Motif support: no
   FreeType support: no
   GLw support: no
   NLS support: no
   Readline support: no

only a couple errors:

GRASS GIS compilation log
-------------------------
Start of compilation: Thu Jun 27 08:12:57 CDT 2002
Errors:
Compilation error in module: src/libes/vect32/georef (ignored)
Compilation error in module: src/raster/r.in.gdal (ignored)
Compilation error in module: src/raster/r.sun (ignored)
Compilation error in module: src.contrib/GMSL/g3d/src3d/sites/s.vol.rst (ignored)
End of compilation: Thu Jun 27 08:50:47 CDT 2002
DONE generating GRASS GIS binary code

however, when i try to fire up tcltkgrass&, i get an error that $env(TCLTKGRASSBASE) isn't set, so i check my ~/.grassrc5 and its not there. what is this env variable looking for? can i just point it to the appropriate place via my ~/.grassrc5 file? i already tried the old ' source /etc/csh.cshrc /etc/csh.login ' and it didn't work.

thanks in advance for any suggestions.

take care,
andy a.

p.s. since i'm a digest lister, please write directly or cc me.

andy agena wrote:

Compilation error in module: src/libes/vect32/georef (ignored)
Compilation error in module: src/raster/r.in.gdal (ignored)
Compilation error in module: src/raster/r.sun (ignored)
Compilation error in module: src.contrib/GMSL/g3d/src3d/sites/s.vol.rst (ignored)

Can you send us the corresponding error messages?

however, when i try to fire up tcltkgrass&, i get an error that
$env(TCLTKGRASSBASE) isn't set, so i check my ~/.grassrc5 and its not
there. what is this env variable looking for? can i just point it to
the appropriate place via my ~/.grassrc5 file? i already tried the
old ' source /etc/csh.cshrc /etc/csh.login ' and it didn't work.

This seems to be a common problem for MacOS X users, but I have no
idea why. So far, I've been willing to attribute it to a problem in
the packaged version which they all seemed to be using. However, in
light of your report of building pre5 from source, that no longer
applies.

The actual "tcltkgrass" script should look like this:

  #!/bin/sh
  # the next line restarts using wish \
  exec $GRASS_WISH "$0" "$@"
  
  if ![info exists env(GISBASE)] {
      puts stderr {
  The TCLTKGRASS shell must be run (in the background) from the GRASS shell.
      }
      exit 1
  }
  
  set env(GISDBASE) [exec g.gisenv get=GISDBASE]
  set env(LOCATION_NAME) [exec g.gisenv get=LOCATION_NAME]
  set env(MAPSET) [exec g.gisenv get=MAPSET]
  
  set env(TCLTKGRASSBASE) $env(GISBASE)/tcltkgrass
  
  append regexp .* $env(GISBASE) {[^:]*}
  regsub -- $regexp $env(PATH) "&:$env(TCLTKGRASSBASE)/script" env(PATH)
  
  source $env(TCLTKGRASSBASE)/main/gui.tcl
  source $env(TCLTKGRASSBASE)/main/menu.tcl

It explicitly sets TCLTKGRASSBASE very early on, so I have absolutely
no idea how this error can occur.

What makes it even more puzzling is that the reported error refers to
the last line (source .../menu.tcl), which implies that the previous
line (source .../gui.tcl) worked fine.

Any help which you can provide in tracking this down would be
appreciated.

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