Re: Problems with sane-scsi

From: Benjamin Hell (ben@spectrum.uni-bielefeld.de)
Date: Thu Jun 08 2000 - 09:29:04 PDT

  • Next message: Henning Meier-Geinitz: "Re: sane.init() and version_code"

    On Thu, Jun 08, 2000 at 02:09:47PM +0200, abel deuring wrote:
    > Benjamin Hell wrote:
    >
    > > Today I tried to use a Canon CanoScan 2700F with
    > > sane 1.0.2 on a Ultra Sparc 5 with Solaris 7.
    > >
    > > I got the newest sg-driver from J"org Schily and
    > > the most recent driver for the 2700F. I compiled
    > > sane and find-scanner correctly reports:
    > [...]
    > > [canon] attach: sending GET SCAN MODE for scan control conditions
    > > sanei_scsi.c:3456: failed assertion 'Cdb_size == src_size'
    > > zsh: IOT instruction (core dumped) scanimage -L
    > >
    > > Does anybody know what's going on here and perhaps
    > > even knows a cure??
    >
    > Benjamin,
    >
    > The problem is, that the (vendor specific) GET SCAN MODE command uses an
    > "unusual" command length, which cannot be handled properly in the recent
    > Sane distributions. Please try this patch (mainly to sanei_scsi.c and to
    > the Canon backend):
    > http://www.mostang.com/mail-archive/sane-devel/2000-05/0057.html .
    > Please note, that I have only been able to test the patch with Linux; it
    > could therefore of course be that I introduced another bug in the parts
    > of sanei_scsi.c for other Unixes. But at least you should get a
    > different error :)
    >

    Hi,

    I got the patch but now compilation fails:

    gcc -I/usr/local/gimp/include -c -DHAVE_CONFIG_H -I. -I. -I../include
    -I../include -D_GNU_SOURCE -DPATH_SANE_CONFIG_DIR=/usr/local/etc/sane.d
    -DPATH_SANE_DATA_DIR=/usr/local/share -DV_MAJOR=1 -DV_MINOR=0 -g -O2 -W
    -Wall -DSCSIBUFFERSIZE=131072 sanei_scsi.c -fPIC -DPIC -o
    .libs/sanei_scsi.lo
    sanei_scsi.c: In function nit_ready':
    sanei_scsi.c:3647: warning: passing arg 6 of csi_cmd' makes pointer from
    integer without a cast
    sanei_scsi.c:3647: too few arguments to function csi_cmd'
    sanei_scsi.c: At top level:
    sanei_scsi.c:3659: conflicting types for anei_scsi_req_enter2'
    ../include/sane/sanei_scsi.h:121: previous declaration of
    anei_scsi_req_enter2'
    sanei_scsi.c: In function anei_scsi_req_enter2':
    sanei_scsi.c:3660: md' undeclared (first use in this function)
    sanei_scsi.c:3660: (Each undeclared identifier is reported only once
    sanei_scsi.c:3660: for each function it appears in.)
    sanei_scsi.c:3660: md_size' undeclared (first use in this function)
    sanei_scsi.c:3658: warning: unused parameter dp'
    sanei_scsi.c: In function anei_scsi_req_wait':
    sanei_scsi.c:3664: warning: unused parameter d'
    sanei_scsi.c: In function anei_scsi_req_enter':
    sanei_scsi.c:3689: warning: passing arg 5 of anei_scsi_req_enter2' makes
    point
    er from integer without a cast
    sanei_scsi.c:3689: too many arguments to function anei_scsi_req_enter2'
    sanei_scsi.c: In function anei_scsi_find_devices':
    sanei_scsi.c:3713: warning: unused parameter indvendor'
    sanei_scsi.c:3713: warning: unused parameter indmodel'
    sanei_scsi.c:3714: warning: unused parameter indtype'
    sanei_scsi.c:3715: warning: unused parameter indbus'
    sanei_scsi.c:3715: warning: unused parameter indchannel'
    sanei_scsi.c:3715: warning: unused parameter indid'
    sanei_scsi.c:3715: warning: unused parameter indlun'
    sanei_scsi.c:3716: warning: unused parameter ttach'
    sanei_scsi.c: At top level:
    sanei_scsi.c:717: warning: g_version' defined but not used
    make[1]: *** [sanei_scsi.o] Error 1
    make[1]: Leaving directory /src/new/sane-1.0.2/sanei'
    make: *** [all-recursive] Error 1

    At least I found out that the first error is due
    to a unpatched call to scsi_cmd in unit_ready which
    is still using the parameters of the unpatched scsi_cmd
    function. I think, this must be a solaris thing because of
    this block of code is enclosed in #if USE == SOLARIS_INTERFACE,
    so you won't get in touch with this under Linux or so, but I
    should better consign the analysis to the professionals :-)

    Ben

    -- 
    **************************************************
    **                 Benjamin Hell                **
    **         ben@spectrum.uni-bielefeld.de        **
    **    http://coral.lili.uni-bielefeld.de/~ben   **
    **       University of Bielefeld - Germany      **
    ** Faculty for Linguistics and Literary Studies **
    **  Computational Linguistics & Spoken Language **
    **************************************************
    

    -- Source code, list archive, and docs: http://www.mostang.com/sane/ To unsubscribe: echo unsubscribe sane-devel | mail majordomo@mostang.com



    This archive was generated by hypermail 2b29 : Thu Jun 08 2000 - 09:28:15 PDT