I know this is something more like a dirt hack than a complete solution, but I'm still not sure how USE_EXPAND is assigned so I don't know if can be improved using that. The attached patch allows to define a SANE_BACKENDS variable with just the needed backends to install. I needed to do this because my scanner goes crazy if sane installs both snapscan and epson backends. HTH, Diego
Created attachment 57372 [details, diff] sane-backends-selected.patch
Just in time, a few hours after a revision bump :-) Will take a little time to test that.
I remembered to have that patch laying around when I saw sane-backends being updated :)
Trying to build sane-backends with SANE_BACKENDS="hp" I get the following error: i686-pc-linux-gnu-gcc -c -march=athlon-xp -O2 -pipe -W -Wall -DHAVE_CONFIG_H -I. -I. -I../include -I../include -DPATH_SANE_CONFIG_DIR=/etc/sane.d -DPATH_SANE_DATA_DIR=/usr/share -DV_MAJOR=1 -DV_MINOR=0 -I/usr/include/gphoto2 -DSTUBS -DBACKEND_NAME=dll dll-s.c -fPIC -DPIC -o .libs/dll-s.o libtool: link: `../sanei/sanei_jpeg.lo' is not a valid libtool object make[1]: *** [libsane-gphoto2.la] Error 1 Currently I don't have much time for this - would be nice if you'd have a look. For me it looks like the actions triggered by the dependency ../sanei/sanei_jpeg.lo do not build the .lo file, you'd have to cd into sanei first (and use the Makefile there).
I think I have found the problem... we will see.
Ok, thanks! In portage.
my scanner is an Epson CX3200, and according to here: http://www.sane-project.org/sane-backends.html#S-EPSON the backend should be "epson". anyway, if i compile sane-backends in that way: SANE_BACKENDS="epson" emerge sane-backends xsane (and scanimage -L as well) won't found the scanner any more... if then i recompile sane-backends without any variable set, everything will be ok again. some infos: [ebuild R ] media-gfx/sane-backends-1.0.15-r2 -gphoto2 -ipv6 +usb -v4l 0 kB [ebuild R ] media-gfx/xsane-0.97 +gtk2 +jpeg +nls +png +tiff 0 k
Re-opening this bug... can't check it currently. Will take quite some time.
what's the output of sane-find-scanner -v and what's your "emerge info" output?
sane-find-scanner -v: This is sane-find-scanner from sane-backends 1.0.15 searching for SCSI scanners: checking /dev/scanner... failed to open (Invalid argument) checking /dev/sg0... failed to open (Invalid argument) checking /dev/sg1... failed to open (Invalid argument) checking /dev/sg2... failed to open (Invalid argument) checking /dev/sg3... failed to open (Invalid argument) checking /dev/sg4... failed to open (Invalid argument) checking /dev/sg5... failed to open (Invalid argument) checking /dev/sg6... failed to open (Invalid argument) checking /dev/sg7... failed to open (Invalid argument) checking /dev/sg8... failed to open (Invalid argument) checking /dev/sg9... failed to open (Invalid argument) checking /dev/sga... failed to open (Invalid argument) checking /dev/sgb... failed to open (Invalid argument) checking /dev/sgc... failed to open (Invalid argument) checking /dev/sgd... failed to open (Invalid argument) checking /dev/sge... failed to open (Invalid argument) checking /dev/sgf... failed to open (Invalid argument) checking /dev/sgg... failed to open (Invalid argument) checking /dev/sgh... failed to open (Invalid argument) checking /dev/sgi... failed to open (Invalid argument) checking /dev/sgj... failed to open (Invalid argument) checking /dev/sgk... failed to open (Invalid argument) checking /dev/sgl... failed to open (Invalid argument) checking /dev/sgm... failed to open (Invalid argument) checking /dev/sgn... failed to open (Invalid argument) checking /dev/sgo... failed to open (Invalid argument) checking /dev/sgp... failed to open (Invalid argument) checking /dev/sgq... failed to open (Invalid argument) checking /dev/sgr... failed to open (Invalid argument) checking /dev/sgs... failed to open (Invalid argument) checking /dev/sgt... failed to open (Invalid argument) checking /dev/sgu... failed to open (Invalid argument) checking /dev/sgv... failed to open (Invalid argument) checking /dev/sgw... failed to open (Invalid argument) checking /dev/sgx... failed to open (Invalid argument) checking /dev/sgy... failed to open (Invalid argument) checking /dev/sgz... failed to open (Invalid argument) # No SCSI scanners found. If you expected something different, make sure that # you have loaded a SCSI driver for your SCSI adapter. # Also you need support for SCSI Generic (sg) in your operating system. # If using Linux, try "modprobe sg". searching for USB scanners: checking /dev/usb/scanner... failed to open (Invalid argument) checking /dev/usb/scanner0... failed to open (Invalid argument) checking /dev/usb/scanner1... failed to open (Invalid argument) checking /dev/usb/scanner2... failed to open (Invalid argument) checking /dev/usb/scanner3... failed to open (Invalid argument) checking /dev/usb/scanner4... failed to open (Invalid argument) checking /dev/usb/scanner5... failed to open (Invalid argument) checking /dev/usb/scanner5... failed to open (Invalid argument) checking /dev/usb/scanner7... failed to open (Invalid argument) checking /dev/usb/scanner8... failed to open (Invalid argument) checking /dev/usb/scanner9... failed to open (Invalid argument) checking /dev/usb/scanner10... failed to open (Invalid argument) checking /dev/usb/scanner11... failed to open (Invalid argument) checking /dev/usb/scanner12... failed to open (Invalid argument) checking /dev/usb/scanner13... failed to open (Invalid argument) checking /dev/usb/scanner14... failed to open (Invalid argument) checking /dev/usb/scanner15... failed to open (Invalid argument) checking /dev/usbscanner... failed to open (Invalid argument) checking /dev/usbscanner0... failed to open (Invalid argument) checking /dev/usbscanner1... failed to open (Invalid argument) checking /dev/usbscanner2... failed to open (Invalid argument) checking /dev/usbscanner3... failed to open (Invalid argument) checking /dev/usbscanner4... failed to open (Invalid argument) checking /dev/usbscanner5... failed to open (Invalid argument) checking /dev/usbscanner6... failed to open (Invalid argument) checking /dev/usbscanner7... failed to open (Invalid argument) checking /dev/usbscanner8... failed to open (Invalid argument) checking /dev/usbscanner9... failed to open (Invalid argument) checking /dev/usbscanner10... failed to open (Invalid argument) checking /dev/usbscanner11... failed to open (Invalid argument) checking /dev/usbscanner12... failed to open (Invalid argument) checking /dev/usbscanner13... failed to open (Invalid argument) checking /dev/usbscanner14... failed to open (Invalid argument) checking /dev/usbscanner15... failed to open (Invalid argument) found USB scanner (vendor=0x04b8 [EPSON], product=0x0802 [USB MFP]) at libusb:002:003 # Your USB scanner was (probably) detected. It may or may not be supported by # SANE. Try scanimage -L and read the backend's manpage. # Not checking for parallel port scanners. # Most Scanners connected to the parallel port or other proprietary ports # can't be detected by this program. # You may want to run this program as root to find all devices. Once you # found the scanner devices, be sure to adjust access permissions as # necessary. done emerge info: Portage 2.0.51.22-r1 (default-linux/x86/2005.0, gcc-3.4.4, glibc-2.3.5-r0, 2.6.11-gentoo-r4 i686) ================================================================= System uname: 2.6.11-gentoo-r4 i686 AMD Sempron(tm) 2600+ Gentoo Base System version 1.6.12 ccache version 2.4 [enabled] dev-lang/python: 2.4.1-r1 sys-apps/sandbox: 1.2.10 sys-devel/autoconf: 2.13, 2.59-r7 sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6 sys-devel/binutils: 2.16.1 sys-devel/libtool: 1.5.18-r1 virtual/os-headers: 2.6.11-r2 ACCEPT_KEYWORDS="x86 ~x86" AUTOCLEAN="yes" CBUILD="i686-pc-linux-gnu" CFLAGS="-O3 -march=athlon-xp -pipe -fomit-frame-pointer" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config /usr/lib/MozillaFirefox/searchplugins/ /usr/lib/X11/xkb /usr/share/config /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/splash /etc/terminfo /etc/texmf/web2c /etc/env.d" CXXFLAGS="-O3 -march=athlon-xp -pipe -fomit-frame-pointer" DISTDIR="/usr/portage/distfiles" FEATURES="autoconfig ccache distlocks sandbox sfperms strict" GENTOO_MIRRORS="http://www.die.unipd.it/pub/Linux/distributions/gentoo-sources/ http://mirror.switch.ch/mirror/gentoo/ ftp://mirror.switch.ch/mirror/gentoo/ ftp://ftp.solnet.ch/mirror/Gentoo http://gentoo.mirror.solnet.ch" LANG="it_IT.UTF-8" LC_ALL="it_IT.UTF-8" LINGUAS="it" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage /usr/local/bmg-main /usr/local/fluidportage/trunk /usr/local/gentoo-de" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="x86 3dnow X alsa apm avi bash-completion berkdb bitmap-fonts cdr crypt cups curl emboss encode fam flac foomaticdb fortran gdbm gif gpm gtk gtk2 imagemagick imlib java jpeg libg++ libwww mad mikmod mmx motif mp3 mpeg ncurses nls nptl nptlonly nvidia ogg oggvorbis opengl oss pdflib perl png ppds python quicktime readline ruby scanner sdl slang spell sqlite sse ssl svga tcpd tetex tiff truetype truetype-fonts type1-fonts unicode usb vorbis xml2 xv zlib linguas_it userland_GNU kernel_linux elibc_glibc" Unset: ASFLAGS, CTARGET, LDFLAGS
Try using snapscan as backend, that's what i use the epson usb scanner/
snapscan backend doesn't support my device... i'm pretty sure there is a problem with the ebuild...
Hm... since the scanner is shown (with sane-find-scanner) maybe the backend is somehow broken. What's the result of ldd /usr/lib/sane/libsane-epson.so on your system?
thorium fctk # ldd /usr/lib/sane/libsane-epson.so linux-gate.so.1 => (0xffffe000) libusb-0.1.so.4 => /usr/lib/libusb-0.1.so.4 (0xb7fb8000) libnsl.so.1 => /lib/libnsl.so.1 (0xb7f9f000) libm.so.6 => /lib/libm.so.6 (0xb7f79000) libjpeg.so.62 => /usr/lib/libjpeg.so.62 (0xb7f60000) libieee1284.so.3 => /usr/lib/libieee1284.so.3 (0xb7f58000) libdl.so.2 => /lib/libdl.so.2 (0xb7f54000) libc.so.6 => /lib/libc.so.6 (0xb7e21000) /lib/ld-linux.so.2 (0x80000000)
Could you please run strace -f -o log scanimage -L and attach the resulting log?
Created attachment 64421 [details] strace -f -o log scanimage -L
Francesco, according to the log the epson backend tries to open some USB device and scanimage also shows some output (which is truncated in the log) - please tell me the scanimage -L output. From the log it looks more like it has trouble connecting to the scanner, not like it does not find it.
fctk@thorium ~ $ scanimage -L device `epson:libusb:002:002' is a Epson CC-570L flatbed scanner
Call me a bit picky, but this doesn't look like "does not find my scanner".
sorry!!! i forgot i removed SANE_BACKENDS variable from make.conf... now i just recompiled sane-backends with that variable and this is the output: fctk@thorium ~ $ scanimage -L No scanners were identified. If you were expecting something different, check that the scanner is plugged in, turned on and detected by the sane-find-scanner tool (if appropriate). Please read the documentation which came with this software (README, FAQ, manpages). thorium fctk # scanimage -L No scanners were identified. If you were expecting something different, check that the scanner is plugged in, turned on and detected by the sane-find-scanner tool (if appropriate). Please read the documentation which came with this software (README, FAQ, manpages).
Created attachment 64432 [details] strace -f -o log scanimage -L this is the correct output
does sane-find-scanner -v give a different output than the last time you pasted it here?
Created attachment 64442 [details] $ sane-find-scanner -v
Looks like your epson backend does not try to open any usb device at all (only scsi). What about the ldd output for libsane-epson.so? Does it still contain libusb?
$ ldd /usr/lib/sane/libsane-epson.so linux-gate.so.1 => (0xffffe000) libusb-0.1.so.4 => /usr/lib/libusb-0.1.so.4 (0xb7edf000) libnsl.so.1 => /lib/libnsl.so.1 (0xb7ecc000) libm.so.6 => /lib/libm.so.6 (0xb7eab000) libjpeg.so.62 => /usr/lib/libjpeg.so.62 (0xb7e92000) libieee1284.so.3 => /usr/lib/libieee1284.so.3 (0xb7e8a000) libdl.so.2 => /lib/libdl.so.2 (0xb7e86000) libc.so.6 => /lib/libc.so.6 (0xb7d99000) /lib/ld-linux.so.2 (0x80000000)
Since on my system the scanimage executable, libsane.so and libsane-epson.so are completely identical, byte by byte (whether I use SANE_BACKENDS or not) - I have absolutely no idea what's going wrong here.
maybe the problem is in some configuration files...
sane-backends-1.0.16-r1 fixes the problem. thanks!
No idea why. However. Closing this until someone else has new similar problems :-/