Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 90598 - sane-backends with selectable backends
Summary: sane-backends with selectable backends
Status: RESOLVED WORKSFORME
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All All
: Low enhancement (vote)
Assignee: Patrick Kursawe (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-04-27 03:32 UTC by Diego Elio Pettenò (RETIRED)
Modified: 2005-08-23 05:35 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
sane-backends-selected.patch (sane-backends-selected.patch,3.22 KB, patch)
2005-04-27 03:32 UTC, Diego Elio Pettenò (RETIRED)
Details | Diff
strace -f -o log scanimage -L (log,110.85 KB, text/plain)
2005-07-27 02:37 UTC, fctk86
Details
strace -f -o log scanimage -L (log,13.71 KB, text/plain)
2005-07-27 05:33 UTC, fctk86
Details
$ sane-find-scanner -v (log,4.96 KB, text/plain)
2005-07-27 06:52 UTC, fctk86
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Diego Elio Pettenò (RETIRED) gentoo-dev 2005-04-27 03:32:30 UTC
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
Comment 1 Diego Elio Pettenò (RETIRED) gentoo-dev 2005-04-27 03:32:46 UTC
Created attachment 57372 [details, diff]
sane-backends-selected.patch
Comment 2 Patrick Kursawe (RETIRED) gentoo-dev 2005-04-27 05:26:08 UTC
Just in time, a few hours after a revision bump :-)
Will take a little time to test that.
Comment 3 Diego Elio Pettenò (RETIRED) gentoo-dev 2005-04-27 05:37:00 UTC
I remembered to have that patch laying around when I saw sane-backends being updated :)
Comment 4 Patrick Kursawe (RETIRED) gentoo-dev 2005-05-09 00:12:34 UTC
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).
Comment 5 Patrick Kursawe (RETIRED) gentoo-dev 2005-05-09 02:02:01 UTC
I think I have found the problem... we will see.
Comment 6 Patrick Kursawe (RETIRED) gentoo-dev 2005-05-09 02:45:32 UTC
Ok, thanks! In portage.
Comment 7 fctk86 2005-07-12 14:21:09 UTC
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
Comment 8 Patrick Kursawe (RETIRED) gentoo-dev 2005-07-12 22:55:01 UTC
Re-opening this bug... can't check it currently. Will take quite some time.
Comment 9 Patrick Kursawe (RETIRED) gentoo-dev 2005-07-13 05:21:43 UTC
what's the output of sane-find-scanner -v
and what's your "emerge info" output?
Comment 10 fctk86 2005-07-15 08:49:11 UTC
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
Comment 11 Diego Elio Pettenò (RETIRED) gentoo-dev 2005-07-15 09:00:56 UTC
Try using snapscan as backend, that's what i use the epson usb scanner/ 
 
Comment 12 fctk86 2005-07-16 01:54:30 UTC
snapscan backend doesn't support my device...
i'm pretty sure there is a problem with the ebuild...
Comment 13 Patrick Kursawe (RETIRED) gentoo-dev 2005-07-25 01:49:25 UTC
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?
Comment 14 fctk86 2005-07-25 01:52:01 UTC
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)
Comment 15 Patrick Kursawe (RETIRED) gentoo-dev 2005-07-27 02:00:46 UTC
Could you please run
strace -f -o log scanimage -L
and attach the resulting log?
Comment 16 fctk86 2005-07-27 02:37:32 UTC
Created attachment 64421 [details]
strace -f -o log scanimage -L
Comment 17 Patrick Kursawe (RETIRED) gentoo-dev 2005-07-27 04:38:33 UTC
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.
Comment 18 fctk86 2005-07-27 04:47:40 UTC
fctk@thorium ~ $ scanimage -L
device `epson:libusb:002:002' is a Epson CC-570L flatbed scanner
Comment 19 Patrick Kursawe (RETIRED) gentoo-dev 2005-07-27 05:18:39 UTC
Call me a bit picky, but this doesn't look like "does not find my scanner". 
Comment 20 fctk86 2005-07-27 05:31:36 UTC
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).
Comment 21 fctk86 2005-07-27 05:33:34 UTC
Created attachment 64432 [details]
strace -f -o log scanimage -L

this is the correct output
Comment 22 Patrick Kursawe (RETIRED) gentoo-dev 2005-07-27 06:35:30 UTC
does sane-find-scanner -v give a different output than the last time you pasted
it here?
Comment 23 fctk86 2005-07-27 06:52:37 UTC
Created attachment 64442 [details]
$ sane-find-scanner -v
Comment 24 Patrick Kursawe (RETIRED) gentoo-dev 2005-07-27 07:15:08 UTC
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?
Comment 25 fctk86 2005-07-27 07:17:17 UTC
$ 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)
Comment 26 Patrick Kursawe (RETIRED) gentoo-dev 2005-07-29 10:02:07 UTC
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.
Comment 27 fctk86 2005-07-29 11:14:16 UTC
maybe the problem is in some configuration files...
Comment 28 fctk86 2005-08-23 05:20:56 UTC
sane-backends-1.0.16-r1 fixes the problem. thanks!
Comment 29 Patrick Kursawe (RETIRED) gentoo-dev 2005-08-23 05:35:52 UTC
No idea why. However. Closing this until someone else has new similar problems :-/