[GRASS-dev] [GRASS GIS] #1235: ERROR: G_getenv(): Variable LOCATION_NAME not set

#1235: ERROR: G_getenv(): Variable LOCATION_NAME not set
-------------------------+--------------------------------------------------
Reporter: apgis | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 6.4.1
Component: Default | Version: unspecified
Keywords: | Platform: Unspecified
      Cpu: Unspecified |
-------------------------+--------------------------------------------------
G_getenv() doesn't get the correct path from LD_LIBRARY_PATH.
For example, I setup LD_LIBRARY_PATH = C:\GRASS-64\lib in Windows XP, but
G_getenv gets LD_LIBRARY_PATH=/grass/lib that is why it appears 'ERROR:
G_getenv(): Variable LOCATION_NAME not set'.

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

#1235: ERROR: G_getenv(): Variable LOCATION_NAME not set
-------------------------+--------------------------------------------------
Reporter: apgis | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 6.4.1
Component: LibGIS | Version: unspecified
Keywords: | Platform: MSWindows XP
      Cpu: Unspecified |
-------------------------+--------------------------------------------------
Changes (by hamish):

  * platform: Unspecified => MSWindows XP
  * component: Default => LibGIS

Comment:

AFAIK, LD_LIBRARY_PATH is not used on non-UNIX systems. Are you using
Cygwin?

Is this your own code or part of the shipping binaries?

G_getenv() actually gets GIS variables from the $HOME/.grassrc6 file.
LD_LIBRARY_PATH is a UNIX environment variable. FWIW, environment
variables are read by libc's getenv(). Yes, the names are similar, but the
functionality is quite different, sorry for the confusion. See the
"variables" grass help page for details on both.

Typically LOCATION_NAME not being set is because it is missing from
$HOME/.grassrc6. Probably the easiet way to fix that is to start grass
from the command line with the full path to the mapset, e.g.
   grass64 c:\grassdata\spearfish60\user

from then on you should be ok.

Hamish

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

#1235: ERROR: G_getenv(): Variable LOCATION_NAME not set
-------------------------+--------------------------------------------------
Reporter: apgis | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 6.4.1
Component: LibGIS | Version: unspecified
Keywords: wingrass | Platform: MSWindows XP
      Cpu: Unspecified |
-------------------------+--------------------------------------------------
Changes (by hellik):

  * keywords: => wingrass

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

#1235: ERROR: G_getenv(): Variable LOCATION_NAME not set
-------------------------+--------------------------------------------------
Reporter: apgis | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 6.4.1
Component: LibGIS | Version: unspecified
Keywords: wingrass | Platform: MSWindows XP
      Cpu: Unspecified |
-------------------------+--------------------------------------------------

Comment(by marisn):

Please check Your paths for presence of non-latin letters. I get same
error because my username under Windows is "Māris" (see other issues for
details).

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

#1235: ERROR: G_getenv(): Variable LOCATION_NAME not set
-------------------------+--------------------------------------------------
Reporter: apgis | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 6.4.1
Component: LibGIS | Version: unspecified
Keywords: wingrass | Platform: MSWindows XP
      Cpu: Unspecified |
-------------------------+--------------------------------------------------

Comment(by hamish):

is the LD_LIBRARY_PATH problem still an issue with a modern install?

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