[sane-devel] Forcing local getopt (avision, SCSI, wait_4_lamp)

Andy Bennett andyjpb at ashurst.eu.org
Sun Oct 14 02:24:36 BST 2018


Hi,

I have an HP ScanJet 7400c that has dual USB1 and SCSI interfaces. When I 
use the USB1 interface on my modern Linux system it overruns the buffer 
several times on each page. This causes the scanner to stop, reposition 
itself and carry on. This is really slow.

I am trying to work out whether the scanner's SCSI bus has enough bandwidth 
to complete the scan without overflowing the buffer. The only machine I 
currently have with SCSI is an SGI O2 running IRIX. I have a binary copy of 
1.0.19 for this machine and I've managed to rebuild working binaries from 
the 1.0.19 source with the toolchain that I'm using

1.0.19 doesn't seem to work with the 7400c. The avision backend gets stuck 
in wait_4_lamp and eventually gives up after 90 tries. During this time the 
lamp is actually on! In the git tree I can see a later patch for 
'avision.c: Recognize "backlight on" status' and quite a lot of other fixes 
which are probably worth having.


Therefore, I'm trying to build the latest git on IRIX 6.5.30 with MIPSpro 
7.4.4 and gmake. This platform has an ancient libpng and doesn't have GNU 
getopt_long. At least MIPSpro 7.4.4 supports c99!

I end up with this in include/sane/config.h after configure:

-----
#define HAVE_GETOPT_H 1
...
/* 'undef HAVE_GETOPT_LONG */
...
#define HAVE_LIBPNG 1
-----


I can stop it trying to compile against the PNG headers by removing 
HAVE_LIBPNG by hand before running gmake. Is there something I can pass to 
configure that will do that automatically?


The getopt problem is more difficult. frontend/scanimage.c does not try to 
link against the code from lib/getopt.c or lib/getopt1.c and when I go into 
the lib/ directory the code does not even appear to have been built.

Is there a way I can force the configuration to build and link against the 
sane-backends supplied getopt code?

I've tried moving /usr/include/getopt.h aside but then configure fails when 
testing whether the C compiler can produce executables so I really need a 
way to change the sane-backends tree to do it.



Thanks for any help you can offer!




Regards,
@ndy

-- 
andyjpb at ashurst.eu.org
http://www.ashurst.eu.org/
0x7EBA75FF



More information about the sane-devel mailing list