[sane-devel] sane SCSI 32bit emulation on 64bit

Volker Kuhlmann list0570 at paradise.net.nz
Sun Jan 8 20:54:15 UTC 2006

> > Most annoying that it doesn't work with SCSI scanners on 64bit machines,
> > something a recompile would fix. Hence my recent question about write()
> > encapsulation in sanei_scsi.c (which no-one replied to :( ).

> If somebody else needs such a special handling because of the
> binary-only nature of his software, it's up to him to fix the problems
> caused by this.

I feared such an attitude would prevail. Here is the situation:

1) sane is an API for scanners which works
2) sane is *NOT* a scanning application, i.e. some software which gets
   some scanning work done.
3) xsane is a GUI around sane, but not a scanning application either,
   its results are useless. Take this as a fact which we can debate
   elsewhere some other time. I am talking expensive film scanners here,
   not some 0 8 15 flatbed.
4) A very high-quality scanning application exists for Linux - the only
   one for Linux I know of. But it's compiled on a 32bit machine and
   doesn't run on a 64bit machine because the Linux SCSI 64/32bit
   emulation layer deals with ioctl() controls, but not data exchanged
   with write() (and read()?).
   Typically it's impossible to make an emulation layer for the data,
   but in this case the vuescan author says it's possible, I think it's
   because it happens in the application rather than in the lower-level
   device driver. He offered to link with a version of sanei_scsi.c
   which adapted at runtime to the architecture and wrapped the write()
   calls suitably. He doesn't want to recompile for 64bit because the
   amount of money he makes from the Linux version doesn't justify it.

I can understand your attitude, and I can understand the vuescan
author's attitude. Between the two, the net result is no functional
scanning application is available for SCSI scanners on a 64bit Linux
workstation. There goes "Linux is suitable for the desktop".

You're doing an excellent job on the sane engine in the face of a lot of
seriously annoying hardware manufactures. But to go places, it needs a
car - a motor is absolutely necessary, but not sufficient.

I'll dig further into it and see if I can cook up something as soon as
I'm more familiar with how all the SCSI things work. If someone by
chance has an idea of genereal direction I'd like to know ;)

> If there are general problems with sanei_scsi/SANE on 64 bit systems,
> I'd like to know about this. As far as I know, this is not the case,
> however.

If everything is compiled as 64bit, it works fine. Software which uses
sanei_scsi and is compiled as 32bit is non-functional running on a 64bit
architecture. This would be regardless of whether it's free open source



Volker Kuhlmann			is possibly list0570 with the domain in header
http://volker.dnsalias.net/		Please do not CC list postings to me.

More information about the sane-devel mailing list