[sane-devel] Possible bugs in SANE 'configure'

Petrie, Glen glen.petrie at eitc.epson.com
Wed Sep 12 20:25:57 UTC 2012


While testing sane for LSB adoption, I want to use the testing
application already in SANE for the test requirement of an LSB
submission.  In testing I discover a couple of potential bugs in the
SANE configure file.   The potential bugs were found using the LSB
compiler which is quite strict.   I believe the potential bugs are fixes
to the intended testing within the configure file; however, if I have
misinterpreted the test intent, please ignore my suggested fix.

 

The configure command line is 

 

CC=lsbcc CXX=lsbc++ CFLAGS=-static-libgcc ./configure

 

I have saved the config.log file; it anyone is interest in examining the
file. 

 

---------------------------------------------------------------------

In the test for le32toh, the conftest.c program seraches for endian.h as
<machine/endian.h> and a compiler error occurs because the file can not
be found.  However, if the include is set to <endian.h> then the header
is found even though le32toh is still not found.   

 

    Should the test be changed to look in both locations; unless there

    is a specific reason to look only in <machine/endian.h>.

 

    affected line is configure:5748: checking for le32toh in
machine/endian.h

----------------------------------------------------------------------

Same comment as above for

 

    Affected line is configure:5842: checking for swap32 in
machine/endian.h

----------------------------------------------------------------------

For Tiff Library Support, there are a number of undefined references to
various jpeg and zip functions.  This is fixed by adding jpeg and zip
libraries.

 

    changed line 7114 from  LIBS="-ltiff $LIBS"

                      to    LIBS="-ltiff -ljpeg -lz $LIBS"

 

----------------------------------------------------------------------

Using LSB, the code fragment for Tiff testing needs actually return a
value; otherwise an error is return but not because TIFFFdOpen can not
be; simply because there is not return.  Thus,

 

    changed line 7124 from   char TIFFFdOpen ();

                      to     char TIFFFdOpen () {return('l');}

 

----------------------------------------------------------------------

Using LSB, the code fragment for IEEE-1284 needs the 'buf' to actually
be defined.  Thus,

 

    changed line 7174 from    struct parport p; char *buf; 

                      to      struct parport p; char  buf[100];

 

----------------------------------------------------------------------

To resolve undefined references for netsnmp timeout it is necessary to
add crypto library.  Thus, 

 

    changed line 7826 from    LIBS="-lnetsnmp $LIBS"

                      to      LIBS="-lnetsnmp -lcrypto $LIBS"

 

----------------------------------------------------------------------

LSB 4.x does not support __longjmp_chk; thus, SANE is compiled with a 

    static flag.  However, for the crypto library, this produces a

    warning.  To resolve, I needed to use -static-libgcc.

 

----------------------------------------------------------------------

To eliminate warning for 'exit' function; i.e.

 

conftest.c:xxx: warning: implicit declaration of function 'exit'

conftest.c:xxx: warning: incompatible implicit declaration of built-in
function 'exit'

 

need to add:  #include <stdlib.h> 

 

example is c-code fragment for IPv6.  This does not appear to

change the result needed for configure file.

 

 

 

I will start 'make' testing next.

 

glen

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/sane-devel/attachments/20120912/d0b92046/attachment-0001.html>


More information about the sane-devel mailing list