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

abel deuring adeuring at gmx.net
Wed Jan 17 00:21:46 CET 2007


Julien Michielsen wrote:
> A couple of days ago I posted the message below. No one replied to it
> yet, so I may have been unclear, and I'll add a few sentences that may
> make my question clearer.
> Before upgrading my SuSE from 10.1 to 10.2 my Epson Perfection 2580
> fotoscan worked fine, and gave me good quality scans. I was unable to
> get it installed on SuSE 10.2, appearantly because (as written below) it
> could not read ../mfpportctrl/mfpport.ko.  Indeed no subdirectory
> ./mfpportctrl exists under /lib/../drivers. I am afraid to show my
> ignorance with this question, but yet:
> My system does not contain any scsi peripherals but stll appears to bomb
> on this sanei_scsi function. Points of error:
> -1 Warning
> sanei_scsi.c:781: warning: 'rsm_open_device' is deprecated (declared at
> /usr/include/resmgr.h:24)
> program-line 781: fd = rsm_open_device(file, O_RDWR);
> -2 Identical warning for line 1245
> progl 1245: fd = rsm_open_device(dev, O_RDWR | O_EXCL | O_NONBLOCK);
> -3 Error
> sanei_scsi.c:1276: error: 'HZ' undeclared (first use in this function)
> progl 1276:timeout = sane_scsicmd_timeout * HZ;
> 
> I reported the failure of SuSE 10.2 to get my Epson working to the
> bug-list (jan. 1st) but did not get any reply. My knowledge (and
> interest ;-( ) are at a too low level to go much deeper into this. Would
> somebody be able to give me a hint how to get this installed and
> running? Bypassing the sanei_scsi-function will not be an option, I
> suppose.

Julien,

Seeing your mail, I too tried to compile Sane under Suse 10.2 -- and
got the same error message. HZ should be defined somewhere in the
"kernel-related" header files, and theoretically the right header
file should be included in sg.h , because HZ is used there too.

You can fix the error by adding the line

#include <linux/compiler.h>

to sanei/sanei_scsi.c, near line 89:

#if defined (HAVE_SCSI_SG_H)
# define USE LINUX_INTERFACE
#include <linux/compiler.h>
# include <scsi/sg.h>
#elif defined (HAVE__USR_SRC_LINUX_INCLUDE_SCSI_SG_H)
# define USE LINUX_INTERFACE
#include <linux/compiler.h>
# include "/usr/src/linux/include/scsi/sg.h"

(better add the line two times, as shown: I don't know, which
variant will be used on your system).

Out of curiosity, I compiled sane-backends 1.0.18 on Ubuntu 6.10 --
no problems there.

Suse 10.2 uses a slightly newer kernel version (2.6.18) than Ubuntu
6.10 (2.6.17). Does anybody know, if "something serious" changed in
the "kernel related" header files between these versions? Or is this
a problem specific for Suse 10.2?

Abel



More information about the sane-devel mailing list