Opened 9 years ago

Last modified 4 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

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 Changed 9 years ago by hamish

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.

Hamish

comment:2 Changed 9 years ago by hellik

Keywords: wingrass added

comment:3 Changed 9 years ago 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).

comment:4 Changed 7 years ago by hamish

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

comment:5 Changed 4 years ago by neteler

Milestone: 6.4.16.4.6
Note: See TracTickets for help on using tickets.