[sane-devel] failing make sane-backends-1.0.18; sanei_scsi question

abel deuring adeuring at gmx.net
Thu Jan 18 20:55:58 CET 2007


Gerhard Jaeger wrote:

>>> So my guess is, that the (HAVE_SCSI_SG_H) path is used and the glibc
>>> headers have changed somehow. What's the glibc version on SuSE 10.2?
>>> Please call /lib/libc.so.6
>> What do you mean with "call"? Anyway, HZ is defined somewhere in the
>> kernel header files, and I don't think it is related to libc.
> 
> callit means, do simply a /lib/libc.so.6 - call it from your shell
> like a real program to see, what's inside. I.e. on my SuSE10 it looks
> like:
> #~> /lib/libc.so.6
> GNU C Library stable release version 2.3.5 (20050802), by Roland McGrath et al.

GNU C Library stable release version 2.5 (20061011), by Roland
McGrath et al.
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
Configured for i686-suse-linux.
Compiled by GNU CC version 4.1.2 20061115 (prerelease) (SUSE Linux).
Compiled on a Linux 2.6.18 system on 2006-11-26.
Available extensions:
        crypt add-on version 2.1 by Michael Glad and others
        GNU Libidn by Simon Josefsson
        GNU libio by Per Bothner
        NIS(YP)/NIS+ NSS modules 0.19 by Thorsten Kukuk
        NoVersion patch for broken glibc 2.0 binaries
        Native POSIX Threads Library by Ulrich Drepper et al
        BIND-8.2.3-T5B
Thread-local storage support included.
For bug reporting instructions, please see:
<http://www.gnu.org/software/libc/bugs.html>.

>>> Anyway could you guys please try and add the compiler.h only to the 
>>> HAVE_SCSI_SG_H path?
>> Well, before making any "real" patch, the first thing I'd like to
>> know is, if we have a special Suse 10.2 bug, or if something changed
>> in the kernel headers...
> 
> Hmmm - seems we need to check how they compile their glibc and which
> kernel-headers they use - I think Johannes is around and might could
> shade some light on that - maybe also on that resmgr stuff.

I think you spotted the cause in the diff file:

> BTW: they use the following patch:
> --- sanei/sanei_scsi.c.orig     2005-04-22 10:36:17.000000000 +0200
> +++ sanei/sanei_scsi.c  2006-07-04 10:16:49.000000000 +0200
> @@ -1273,7 +1273,7 @@
>       disconnect... ;-( */
>    {
>      int timeout;
> -    timeout = sane_scsicmd_timeout * HZ;
> +    timeout = sane_scsicmd_timeout * sysconf(_SC_CLK_TCK);
>      ioctl (fd, SG_SET_TIMEOUT, &timeout);
>    }
>  #endif

Seems that the Suse folks did not trust the usage of the HZ macro
that much. IIRC, HZ gives something like the kernel-internal timer
resolution or similar, and specifiying this value outside a header
file make some sense.

Compiling sanei_scsi.c from sane-backends 1.1.18 with this patch
instead of the added #include line works fine.

Abel



More information about the sane-devel mailing list