Opened 12 years ago

Last modified 7 years ago

#1235 new defect

ERROR: G_getenv(): Variable LOCATION_NAME not set

Reported by: apgis Owned by: grass-dev@…
Priority: normal Milestone: 6.4.6
Component: LibGIS Version: unspecified
Keywords: wingrass Cc:
CPU: Unspecified Platform: MSWindows XP


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'.

Change History (5)

comment:1 by hamish, 12 years ago

Component: DefaultLibGIS
Platform: UnspecifiedMSWindows XP

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.


comment:2 by hellik, 12 years ago

Keywords: wingrass added

comment:3 by marisn, 12 years ago

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).

comment:4 by hamish, 10 years ago

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

comment:5 by neteler, 7 years ago

Note: See TracTickets for help on using tickets.