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

Olaf Meeuwissen paddy-hack at member.fsf.org
Wed Dec 19 09:30:36 GMT 2018


Hi Andy,

Sorry for the very late follow up.  Cleaning out mailing list backlog.

Can't you just

  ./configure BACKENDS=avision
  make -C backends

using 1.0.27 and use the scanimage frontend and dll backend from 1.0.19?


Andy Bennett writes:

> Hi,
>
> Sorry for the top post!
> Here's an update on my progress. I've managed to get a build but there seem
> to be some runtime linking issues.
>
>
> I've included the lib/getopt.c and lib/getopt1.c code with #include
> directives in frontend/scanimage.c, frontend/saned.c and tools/sane-desc.c.
>
> This has allowed me to produce a build that completes without error.
> However, when I run the resulting execuables they do not work.
>
> scanimage bombs out immediately. saned bombs out when scanimage connects to
> it across the network.
>
> Both give an error similar to this:
>
> -----
> scanimage: rld: Fatal Error: attempted access to unresolvable symbol in
> .../libsane.so.1: sane_dll_init
> -----
>
> If I configure with --disable-shared --enable-static and rebuild then the
> build fails with the same symbols being unresolvable.
>
>
> Grepping the source reveals that sane_dll_init does not appear anywhere
> either as a declaration or a reference.
>
> Does anyone know what's going on here?
>
>
>
>
>> 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
>>
>
> --
> Regards,
> @ndy
>
> --
> andyjpb at ashurst.eu.org
> http://www.ashurst.eu.org/
> 0x7EBA75FF


--
Olaf Meeuwissen, LPIC-2            FSF Associate Member since 2004-01-27
 GnuPG key: F84A2DD9/B3C0 2F47 EA19 64F4 9F13  F43E B8A4 A88A F84A 2DD9
 Support Free Software                        https://my.fsf.org/donate
 Join the Free Software Foundation              https://my.fsf.org/join



More information about the sane-devel mailing list