Please test sane cvs - soname of backend libs

Oliver Rauch (oliver.rauch@Wolfsburg.DE)
Sat, 20 Nov 1999 10:34:03 +0100


I made a change to the in the sane cvs DEVEL_1_9:

I want to explain the background first:
The backend libs of sane are placed in an own subdir "sane" in a "libs" directory.
In the upper "libs" directory there is a link "*" -> "./sane/*".
(on some systems it is not "so", the correct name is given by libtool).

This is the standard installation. This way the dynamic library loader is
loaded when a frontend opens . SANE is designed that
a frontend can open any sane backend as*, only the link in the
"libs" directory has to be changed.
But that does not work with exisiting sane versions.

The problem is that the internal names of the shared libraries (sonames)
are equal to the backend library name, but the name of the sane libraryies
have to be "*" (or e.g. "*) instead of "*"

A frontend that links with "-lsane" agains the link "..../libs/*"
does not store the filename "*" to open the library when executed,
it stores the internal name of the shared library (soname) and in the standard
case that is "*".

So if you link a frontend with "-lsane" you are not able to repleace by an other sane backend because the frontend only
wants to open "*".
The second problem is that the real libs are placed in a subdirectory
of a libs directory where the shared library loader normally does not
This is the reason that e.g. xsane does not start when you did not
add the path of the sane libs to (on linux) /etc/

So I added the following line to

soname=`echo $soname | sed -e "s/libsane-[A-Za-z0-9]*/libsane/g"`

it removes the backend extension form the soname:* ->*

I tested it with linux (SuSE 6.2) and it works fine.

I want to know if this solves the described problems on all systems.

A simple test is:

$ldd /path_to/xsane
... => /usr/local/lib/ (0x40287000)
(that is correct)

$ldd /path_to/xsane
... => /usr/local/lib/sane/
(that is the current, wrong situation)


E-Mail:         mailto:Oliver.Rauch@Wolfsburg.DE

Source code, list archive, and docs:
To unsubscribe: echo unsubscribe sane-devel | mail