Opened 14 years ago
Last modified 9 years ago
#1235 new defect
ERROR: G_getenv(): Variable LOCATION_NAME not set
Reported by: | apgis | Owned by: | |
---|---|---|---|
Priority: | normal | Milestone: | 6.4.6 |
Component: | LibGIS | Version: | unspecified |
Keywords: | wingrass | Cc: | |
CPU: | Unspecified | Platform: | MSWindows XP |
Description
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 , 14 years ago
Component: | Default → LibGIS |
---|---|
Platform: | Unspecified → MSWindows XP |
comment:2 by , 14 years ago
Keywords: | wingrass added |
---|
comment:3 by , 14 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:5 by , 9 years ago
Milestone: | 6.4.1 → 6.4.6 |
---|
Note:
See TracTickets
for help on using tickets.
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.
from then on you should be ok.
Hamish