On Thursday 18 January 2007 20:55, abel deuring wrote:
[SNIPSNAP]
> GNU C Library stable release version 2.5 (20061011), by Roland

ah - I see pretty new beast ;)

> Compiled on a Linux 2.6.18 system on 2006-11-26.

Hmmm - okay. So they will use these headers...
> 
> >>> 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:

Well, I've only copied the patch from the SuSE srpm ;)

> > 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.

Since 2.6, the kernel runs with two timer resolutions, one for the
internal accounting, which is in general 1000Hz -> 1ms and the other
one having a 4ms = 100Hz resolution (the default). The later one is in
general reflected by the HZ, that is used in the scsi lib.
While doing some cross-compilation stuff, I've already seen this
sysconf stuff, so it should be save to use it. Could you please
check the attached patch? (It's borrowed from gdb code)

> Compiling sanei_scsi.c from sane-backends 1.1.18 with this patch
> instead of the added #include line works fine.
> 
That's what I've expected ;)

Gerhard
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sanei_scsi-HZ.patch
Type: text/x-diff
Size: 1038 bytes
Desc: not available
Url : 
http://lists.alioth.debian.org/pipermail/sane-devel/attachments/20070119/1f4a7757/sanei_scsi-HZ.bin
From [email protected]  Fri Jan 19 15:00:46 2007
From: [email protected] (Julien Michielsen)
Date: Fri Jan 19 15:06:54 2007
Subject: [sane-devel] failing make sane-backends-1.0.18;
        sanei_scsi question]
Message-ID: <[email protected]>

Being the origin of this thread I'd like to make a few contributions
Gerhard Jaeger wrote:
> On Thursday 18 January 2007 20:55, abel deuring wrote:
> [SNIPSNAP]
>> GNU C Library stable release version 2.5 (20061011), by Roland
> 
> ah - I see pretty new beast ;)
On my SuSE 10.2:
glibc-devel-2.5-25
>> Compiled on a Linux 2.6.18 system on 2006-11-26.
> 
> Hmmm - okay. So they will use these headers...
>>>>> 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:
> 
> Well, I've only copied the patch from the SuSE srpm ;)

When I compiled the sane-backend the include-file seemed to be unread:
sanei_scsi.c:1276: error: 'HZ' undeclared (first use in this function)
In addition, it only was defined for 60 Hz:
#define SG_DEFAULT_TIMEOUT (60*HZ) /* HZ == 'jiffies in 1 second' */
(/usr/include/scsi/sg.h line 268)
therefore I added a line to fix HZ on 50, and then installed the backend
without further problems.
Also sane-frontends installed fine.
The scanner was not recognized however. Starting xsane I got the message
"no devices available" with 6 possible reasons under "help":
- device not supported by sane?         Thought epson 2580 is supported
- supported device is busy              No, it isn't
- no permissions, try as root           Did not help
- back-end is not loaded by sane        Added usb 0x4b8 0x121 to                
                                
/etc/sane.d/epson.conf and think                                        this 
defines it properly
- back-end not configured properly      Answered on other back-end point
- possibly more than one sane-version   No there is not.
   installed.

My question: anyone a suggestion how to get my epson 2580 recognized?
Thanks
-- 
Julien Michielsen



-- 
Julien Michielsen

Reply via email to