[sane-devel] HP5400 backend progress

Henning Meier-Geinitz henning@meier-geinitz.de
Sun, 23 Feb 2003 15:11:44 +0100


On Mon, Feb 24, 2003 at 12:16:36AM +1100, Martijn van Oosterhout wrote:
> Well, I've got the color correction stuff in there (to fix where the R, G &
> B come in not next to eachother). And I've put a prototype SANE backend in.
> It'll build a .so which you can symlink into the right place. xscanimage
> finds the .so, loads it and calls sane_init but never calls sane_get_devices
> before bailing out saying it can't find any scanners.

You are talking about sane-hp5400.so that's in your package?
ls -l sane-hp5400.so
-rwxr-xr-x    1 hmg      hmg         83577 2003-02-23 13:52 sane-hp5400.so

nm sane-hp5400.so|grep sane
000056cc T sane_hp5400_cancel
00004f48 T sane_hp5400_close

There is no sane_init (etc.). That may work if you load the library by
the dll meta backend but you can't link to it from a frontend directly.

E.g. my test program (just posted, see thread about segfaults)

testing libsane-hp5400.so: getting symbol sane_init failed:
./sane-test: undefined symbol: sane_init

So are you sure that sane_init of your backend is called at all?

If you set the appropriate links and run it with the dll backend you
[dll] load: searching backend hp5400' in /usr/local/lib/sane'
[dll] load: trying to load /usr/local/lib/sane/libsane-hp5400.so.1'
[dll] load: dlopen()ing /usr/local/lib/sane/libsane-hp5400.so.1'
[dll] init: initializing backend hp5400'
[dll] init: backend hp5400' has a wrong major version (0 instead of 1)

Maybe that's because V_MAJOR and V_MINOR is set by sane-backend's