[sane-devel] SANE 1.0.5 -> 1.0.8 *help*! (long)

Henning Meier-Geinitz henning@meier-geinitz.de
Sun, 30 Jun 2002 19:37:07 +0200


Hi,

On Sun, Jun 30, 2002 at 06:46:22PM +0200, Journeyman wrote:
> Henning Meier-Geinitz <henning@meier-geinitz.de> wrote:
> 
> > Try something like 
> > export LD_LIBRARY_PATH=/usr/local/lib
> > 
> > (Untested).
> Question 1: where does the export cmd you gave me write the path for
> 1.0.8 libraries? I'd like to modify some config file so that I don't
> need everytime to give this cmd before launching xsane.

That's all a problem of the dynamic linker and the dll backend. The
"export" doesn't write to any file, it just sets the environment
variable. I'm not quite sure what really happens: either the frontend
is linked to libsane.so and so the dynamic linker ususally searches
the lib in its default directories (e.g. /lib, /usr/lib). As the
variable is set, it first checks /usr/local/lib and finds the right
library. Another possibility is that the dll backend checks the
variable and looks at /usr/local/lib/sane for the backends to load.

You could enter the line in a start-up file, e.g. $HOME/.bashrc. I
can't remember which one is the right one :-)

However, it's not SANE-specific, that means that all libraries in
/usr/local/lib may be preferred to the ones in /usr/lib.

> Question 2: backends 1.0.8 compiled and installed by me is virtually
> stuck in /usr/local as I don't see anywhere its uninstall script!
> Where do I find it? I didnt find it

That's simple: do "make uninstall" in the sane-backends-1.0.8
directory (as user root).

You can also install SANE in different directories using configure
options like --prefix. But you should know what you do because you
will overwrite your distribution's SANE installation.

> Question 3: Now I have a weird sane file composition: libraries 1.0.5
> and both 1.0.5 + 1.0.8 backends. With your trick I make xsane call
> 1.0.8 libs in /usr/local/lib instead of 1.0.5 of /usr/lib. What if
> someday I want to completely remove 1.0.5 and start from scratch
> installing 1.0.8? Just do it, you might say, but it's not so easy as
> installing the 1.0.8 rpms requests 1.0.5 files anyway!

Sorry, that's Mandrake-specific. You would better ask Mandrake about
it. In my opinion it's better to not mix RPMs and self-compiled
packages. So either use the SANE RPMs or the .tar.gz packages.

> Generally speaking, do you suggest working on tarballs rather than
> rpms? In my newbie experience I found that rpms often are confusing
> ...
 
I have no experience with RPMs as I use Debians debs. And with Debian,
I have never thought about such things, the packages just work. If you
need another one because of a dependency, apt-get will download and
install it for you.

As I'm a SANE developer, I usually use the .tar.gz files and the CVS
directly. But if I wouldn't write code for SANE I would use the
pacakges from Debian if they were uptodate (they aren't :-().

Bye,
  Henning