[SAGA-RG] usage of SAGA_LOCATION

Hartmut Kaiser hkaiser at cct.lsu.edu
Wed Oct 15 09:27:14 CDT 2008


> > In the latest release CCT's SAGA C++ implementation doesn't require a
> set
> > SAGA_LOCATION environment variable anymore (at least as long as the
> > installation has not been moved from the --prefix directory it was
> > configured and built with). If no $SAGA_LOCATION is set it internally
> > defaults to the directory used during ./configure --prefix=... This
> doesn't
> > free you from the need to properly set your LD_LIBRARY_PATH, but
> that's
> > another issue, I guess.
> 
> In my case, I don't have root access to my machine and can only access
> my
> home-dir. So installing in /usr/local/ is not really an option, and I
> need
> the $SAGA_LOCATION set.

You misunderstood. At compile time you can specify, where to install SAGA to
(the --prefix=... directory). This doesn't have to be /ur/lib, but may be
somewhere under your home directory. A subsequent make install puts the
generated saga files into this directory. As long as you don't move this
installation to another directory you don't need the $SAGA_LOCATION as the
generated code 'knows' where it got installed to.

> If I could install it in /usr/local/ and also have the java
> implementation
> installed, I still have to set $SAGA_LOCATION to the java
> implementation.
> Does this effect the C++ implementation since $SAGA_LOCATION is set,
> and it
> overrides internal C++ default?

If you set a SAGA_LOCATION for the Java implementation this might affect the
C++ implementation as well. 
To work around this problem you need to change the main saga.ini file from:

[saga]
location = ${SAGA_LOCATION}
ini_path = $[saga.location]/share/saga/ini

to

[saga]
ini_path = $[saga.location]/share/saga/ini

i.e. remove the location entry. Additionally you will have to make sure,
that all adaptor ini-files refer to the location as $[saga.location] and not
as ${SAGA_LOCATION}. The $[saga.location] entry is internally predefined to
point to the prefix directory used during make time.

All this should ensure that any existing $SAGA_LOCATION environment values
will be ignored. The code itself doesn't refer to $SAGA_LOCATION, all
references come from the ini-files.

HTH
Regards Hartmut




More information about the saga-rg mailing list