[GRASS5] grass directory structure and locations

Dennis Veatch dveatch at woh.rr.com
Tue Aug 16 13:21:11 EDT 2005


On Tuesday 16 August 2005 02:40 pm, you wrote:
> Dennis Veatch wrote:
> > Hopefully I am on the right mail list, if not then please point me
> > elsewhere.
> >
> > A little background on my distro. Running a source based distro called
> > Lunar-Linux ( http://www.lunar-linux.org/ ) and I am creating some
> > install modules for grass, postgis and qgis. They all install fine but I
> > have noticed one thing.
> >
> > One of the abilities of Lunar-Linux is to perform integrity checks on
> > installed items. These checks consist of discovering missing binary
> > executable, libraries and header files, modified binaries and libraries,
> > misowned symlinks to files and broken executable and libraries.
> >
> > When I run these checks gqis fails sanity checks because the grass libs
> > seem to be in a non-standard location. At least that is how it appears to
> > me. In my limited experience an apps libs usually go in /usr/lib or /lib.
> >
> > And I see that the grass install essentially creates it's own tree under
> > /usr. One thing I have not done yet is to add /usr/grass to ld.so.conf.
> > Which I'm sure would take of the failed sanity checks. But I am curious
> > as to why grass does not use the "normal" directory locations of
> > Unix/UNIX/Linux.
>
> Simplicity.
>
> The whole of GRASS goes into its own directory, with the exception of
> the "grass61" (or similar) script used to start GRASS, which goes into
> a standard location.
>
> Nothing in GRASS (again, except for the startup script) hardcodes the
> installation path, but uses the environment variable GISBASE (which is
> set in the startup script). The startup process sets PATH,
> LD_LIBRARY_PATH etc to include the appropriate subdirectories of the
> GRASS installation tree.
>
> If you want to move or rename the GRASS installation directory, you
> only need to update the startup script accordingly. Also, as Stephan
> mentioned, if you want to uninstall GRASS, you only need to delete the
> GRASS directory and the startup script. If it installed into system
> directories, uninstalling would be difficult.
>

Alright I can live with that, not that I couldn't to begin with.

> The GRASS build system installs everything into a local directory
> within the source tree, from where you can run the newly-compiled
> version without having to install it. Running "make install" simply
> copies the entire directory to the installed location and installs a
> copy of the startup script which references the installed location.
>
> All in all, this makes it easy to keep multiple versions of GRASS
> around and to try new versions without any chance of affecting an
> existing installation.

That certainly is sensible and convenient.

>
> BTW, the default location is under /usr/local; you have to explicitly
> use --prefix=/usr to get it installed under /usr. Given that it
> doesn't install into the standard locations but to its own directory
> hierarchy, I prefer "--prefix=/opt --bindir=/usr/local/bin" so that
> GRASS goes into /opt/grass-<version>. /opt is the historical location
> for packages which use their own self-contained hierarchy.

Hmm, hadn't thought about /opt. Good point. I think I'll run with the /opt 
thing. And yes I did set my build script with "--prefix=/usr" as most apps I 
have run across live there, so it was somewhat of a habit.

Thanks for the informative reply..... and now back to the regularly scheduled 
program.




More information about the grass-dev mailing list