[sane-devel] 32-bit proprietary drivers on AMD64: a plan

Ivan Boldyrev lispnik at gmail.com
Thu Dec 18 12:05:34 UTC 2008


I have found that my EPSON Perfection V200 doesn't work after upgrade
to 64 bit Linux.  The infamous AVASYS corporation gives only 32-bit
version of their proprietary "plugins".

The "plugin" is a 32-bit .so that is used by backend sane-epkowa.  But
64-bit code cannot use 32-bit libraries.

I see possible solutions:
0.  Switch to 32-bit Linux.  I don't want to even discuss it :)
1.  Use 32-bit sane (backends and frontends).  But it would also imply
that e.g. GIMP has to be compiled 32-bit too.
2.  Run 32-bit sane in a 32-bit chroot; 64-bit sane will talk with it
over net.  The great benefit of this way is that it doesn't require
writing any code, but requires some configuration and, probably
3.  Do a 32-bit wrapper for 32-bit drivers.  It is similair to
previous, but a) no chroot has to be mantained; b) 64-bit sane talks
to 32-bit backend over pipe.  It will require minimal configuration,
but some code has to be written: 64-bit meta-backend ("sane-host")
that will spawn 32-bit wrapper ("sane-wrapper") with popen and talk to
it over network protocol (as we don't want to reinvent a wheel).  The
wrapper uses 32-bit copy of libsane (and libusb for sane-epkowa),
loads proprierary backend and replies to "sane-host".

The "sane-host" seems to be quite simple, especially if you know sane
API; "sane-wrapper" seems to be simple too.  I'm reading SANE docs and
code and trying to write some code, but very slow.

I don't know if it worth distributing "sane-wrapper" code with SANE as
it requires cross-compilation; may be, it should be contrib or just
separate package.

I'd be glad to get some comments, suggestions, help or even code. :)

Ivan Boldyrev

More information about the sane-devel mailing list