Re: Problem comiling Sane

From: Douglas Gilbert (dgilbert@interlog.com)
Date: Sat Jun 09 2001 - 09:34:46 PDT

  • Next message: Simon Krix: "Re: Work started on FB630U"

    Maier Gerfried wrote:
    >
    > Dear Ladies and Gents,
    >
    > Due to my problem scanning colour-images (sane 1.0.4, Agfa Snapscan 600,
    > Backend: snapscan; my system: Suse Linux 6.3 (gcc updated to
    > egcs-2.91.66)) with xsane Oliver Rauch told me, that using the
    > CVS-snapshot of sane-backend (sane-backends-CVS-2001-06-05_tar.gz) cold
    > be a solution to my problem.
    >
    > So I downloaded that file from www.mostang.com, untarred it, called
    > configure - all without problems. But when I call make, it stops
    > working. The last lines printed on the screen are:
    >
    > gcc -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
    > -D__NO_STRING_INLINES -W -Wall -Wcast-align -Wcast-qual
    > -Wmissing-declarations -Wmissing-prototypes -Wpointer-arith
    > -Wreturn-type -Wstrict-prototypes -pedantic -ansi sanei_scsi.c -fPIC
    > -DPIC -o .libs/sanei_scsi.lo
    > sanei_scsi.c: In function `sanei_scsi_req_enter2':
    > sanei_scsi.c:1907: warning: cast discards `const' from pointer target
    > type
    > sanei_scsi.c: In function `lx_chk_id':
    > sanei_scsi.c:2262: storage size of `ssid' isn't known
    > sanei_scsi.c:2262: warning: unused variable `ssid'
    > sanei_scsi.c: In function `sanei_scsi_req_enter':
    > sanei_scsi.c:4267: warning: cast discards `const' from pointer target
    > type
    > sanei_scsi.c:4275: warning: cast discards `const' from pointer target
    > type
    > sanei_scsi.c: In function `sanei_scsi_cmd':
    > sanei_scsi.c:4283: warning: cast discards `const' from pointer target
    > type
    > sanei_scsi.c:4291: warning: cast discards `const' from pointer target
    > type
    > make[1]: *** [sanei_scsi.o] Error 1
    > make[1]: Leaving directory
    > `/home/moali/sane-backends-CVS-2001-06-05/sanei'
    > make: *** [all-recursive] Error 1
    >
    > What could be a solution to this error?

    Maier,
    Could you try the attached patch on that file found in
    sane-backends-CVS-2001-06-05 ?

    Doug Gilbert

    --- sanei/sanei_scsi.c Tue Jun 5 12:15:07 2001
    +++ sanei/sanei_scsi.c_v2 Sat Jun 9 12:23:59 2001
    @@ -266,6 +266,8 @@
     #endif
     #ifndef SG_GET_SCSI_ID
     #define SG_GET_SCSI_ID 0x2276
    +#else
    +#define SG_GET_SCSI_ID_FOUND
     #endif
     #ifndef SG_GET_VERSION_NUM
     #define SG_GET_VERSION_NUM 0x2282
    @@ -2258,7 +2260,7 @@
     static int /* Returns 1 for match, else 0 */
     lx_chk_id(int dev_fd, int host, int channel, int id, int lun)
     {
    -#ifdef SG_GET_SCSI_ID
    +#ifdef SG_GET_SCSI_ID_FOUND
       struct sg_scsi_id ssid;
     
       if ((ioctl(dev_fd, SG_GET_SCSI_ID, &ssid) >= 0))

    --
    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 : Sat Jun 09 2001 - 09:32:17 PDT