Hi Nicolas,<br><br>Ok, so indeed, the git version without pthtread works flawlessy (see attached log). However, I so far didn&#39;t manage to build sane-backends with pthread. After exactly following your instructions, I get the message below. This is with no ubuntu sane packages installed. Can anybody tell me which dev package I miss to build sane with pthread?<br>
<br>Regards,<br><br>Rogier<br><br><br>Error message during build process:<br><br>[snip]<br><br>rm -fr  .libs/libsanei.a .libs/<a href="http://libsanei.la">libsanei.la</a><br>ar cru .libs/libsanei.a .libs/sanei_ab306.o .libs/sanei_constrain_value.o .libs/sanei_init_debug.o .libs/sanei_net.o .libs/sanei_wire.o .libs/sanei_codec_ascii.o .libs/sanei_codec_bin.o .libs/sanei_scsi.o .libs/sanei_config.o .libs/sanei_config2.o .libs/sanei_pio.o .libs/sanei_pa4s2.o .libs/sanei_auth.o .libs/sanei_usb.o .libs/sanei_thread.o .libs/sanei_pv8630.o .libs/sanei_pp.o .libs/sanei_lm983x.o .libs/sanei_access.o .libs/sanei_tcp.o .libs/sanei_udp.o .libs/sanei_magic.o .libs/sanei_jpeg.o<br>
ranlib .libs/libsanei.a<br>creating <a href="http://libsanei.la">libsanei.la</a><br>(cd .libs &amp;&amp; rm -f <a href="http://libsanei.la">libsanei.la</a> &amp;&amp; ln -s ../<a href="http://libsanei.la">libsanei.la</a> <a href="http://libsanei.la">libsanei.la</a>)<br>
make[1]: Leaving directory `/home/rogier/Software/Src/sane-backends-git20091201/sanei&#39;<br>Making all in backend<br>make[1]: Entering directory `/home/rogier/Software/Src/sane-backends-git20091201/backend&#39;<br>make  all-am<br>
make[2]: Entering directory `/home/rogier/Software/Src/sane-backends-git20091201/backend&#39;<br>/bin/bash ../libtool --silent  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I../include/sane -I/usr/local/include -I. -I. -I../include -I../include -DLIBDIR=&quot;/usr/lib/sane&quot; -DBACKEND_NAME=dll -DPATH_SANE_CONFIG_DIR=/etc/sane.d       -DPATH_SANE_DATA_DIR=/usr/share       -DPATH_SANE_LOCK_DIR=/var/lock/sane       -DV_MAJOR=1 -DV_MINOR=0  -DUSE_PTHREAD -W -Wall -Wcast-align -Wcast-qual -Wmissing-declarations -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wstrict-prototypes -pedantic -ansi -MT libdll_la-dll.lo -MD -MP -MF .deps/libdll_la-dll.Tpo -c -o libdll_la-dll.lo `test -f &#39;dll.c&#39; || echo &#39;./&#39;`dll.c<br>
dll.c: In function ‘load’:<br>dll.c:535: warning: ISO C forbids conversion of object pointer to function pointer type<br>dll.c:560: warning: ISO C forbids conversion of object pointer to function pointer type<br>mv -f .deps/libdll_la-dll.Tpo .deps/libdll_la-dll.Plo<br>
/bin/bash ../libtool --silent --tag=CC   --mode=link gcc  -DUSE_PTHREAD -W -Wall -Wcast-align -Wcast-qual -Wmissing-declarations -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wstrict-prototypes -pedantic -ansi -Wl,-z,defs  -o <a href="http://libdll.la">libdll.la</a>  libdll_la-dll.lo  <br>
/bin/bash ../libtool --silent --tag=CC   --mode=link gcc  -DUSE_PTHREAD -W -Wall -Wcast-align -Wcast-qual -Wmissing-declarations -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wstrict-prototypes -pedantic -ansi -Wl,-z,defs -rpath &#39;/usr/lib&#39; -version-number 1:0:21  -o <a href="http://libsane.la">libsane.la</a> -rpath /usr/lib libsane_la-dll-s.lo ../lib/<a href="http://liblib.la">liblib.la</a>  <a href="http://libdll.la">libdll.la</a> sane_strstatus.lo ../sanei/sanei_init_debug.lo ../sanei/sanei_constrain_value.lo ../sanei/sanei_config.lo ../sanei/sanei_config2.lo ../sanei/sanei_usb.lo ../sanei/sanei_scsi.lo ../sanei/sanei_pv8630.lo ../sanei/sanei_pp.lo ../sanei/sanei_thread.lo  ../sanei/sanei_lm983x.lo ../sanei/sanei_access.lo ../sanei/sanei_net.lo ../sanei/sanei_wire.lo ../sanei/sanei_codec_bin.lo ../sanei/sanei_pa4s2.lo ../sanei/sanei_ab306.lo ../sanei/sanei_pio.lo ../sanei/sanei_tcp.lo ../sanei/sanei_udp.lo -ldl   -lm  -lieee1284  -ltiff  -ljpeg  -lgphoto2 -lgphoto2_port -lexif -lm -lusb  -lusb     <br>
../sanei/.libs/sanei_thread.o: In function `sanei_thread_kill&#39;:<br>sanei_thread.c:(.text+0xe5): undefined reference to `pthread_cancel&#39;<br>../sanei/.libs/sanei_thread.o: In function `sanei_thread_begin&#39;:<br>sanei_thread.c:(.text+0x302): undefined reference to `pthread_create&#39;<br>
../sanei/.libs/sanei_thread.o: In function `sanei_thread_sendsig&#39;:<br>sanei_thread.c:(.text+0x3ac): undefined reference to `pthread_kill&#39;<br>../sanei/.libs/sanei_thread.o: In function `sanei_thread_waitpid&#39;:<br>
sanei_thread.c:(.text+0x3fa): undefined reference to `pthread_join&#39;<br>sanei_thread.c:(.text+0x484): undefined reference to `pthread_detach&#39;<br>collect2: ld returned 1 exit status<br>make[2]: *** [<a href="http://libsane.la">libsane.la</a>] Error 1<br>
make[2]: Leaving directory `/home/rogier/Software/Src/sane-backends-git20091201/backend&#39;<br>make[1]: *** [all] Error 2<br>make[1]: Leaving directory `/home/rogier/Software/Src/sane-backends-git20091201/backend&#39;<br>
make: *** [all-recursive] Error 1<br><br><br><br><br><br><br><br><br><div class="gmail_quote">On Sat, Nov 28, 2009 at 3:32 PM, Nicolas Martin <span dir="ltr">&lt;<a href="mailto:nicolas0martin@gmail.com">nicolas0martin@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">After analysis: your log trace shows that Sane is compiled in Ubuntu<br>
Karmic with the USE_PTHREAD/-lpthread support, which revealed a bug at<br>
end of scan (not produced when pthread support is not activated).<br>
<br>
Just committed a fix, so could you please give a try with git Sane, and<br>
test both compilations options, with and without pthread support.<br>
<br>
You can follow the guidelines here to compile and install Sane:<br>
<a href="http://mp610.blogspot.com/2008/04/give-your-scanner-new-freshly-sane.html" target="_blank">http://mp610.blogspot.com/2008/04/give-your-scanner-new-freshly-sane.html</a><br>
<br>
- To compile without pthread support, set firstly 2 export lines this:<br>
<br>
make distclean<br>
export CFLAGS=&quot;&quot;<br>
export LIBS=&quot;&quot;<br>
<br>
Then go on from the ./configure steps<br>
<br>
When you run a scan after activating the log trace (as explained in a<br>
previous mail), you should get in the log trace, a line like this near<br>
the beginning:<br>
<div class="im"><br>
[pixma] Reader task id=xxxx (forked)<br>
<br>
</div>- To compile with pthread support (this is the Ubuntu/Karmic way), set<br>
first 2 export lines this:<br>
<br>
make distclean<br>
export CFLAGS=&quot;-DUSE_PTHREAD&quot;<br>
export LIBS=&quot;-lpthread&quot;<br>
<br>
Then go on from the ./configure steps<br>
<br>
When you run a scan after activating the log trace, you should get in<br>
the log trace, a line like this near the beginning:<br>
<br>
[pixma] Reader task id=-xxxxxxxxxx (threaded)<br>
<br>
In both cases, hopefully, the multi-page ADF scan should work correctly<br>
now ;-)<br>
<br>
Let us know.<br>
Nicolas<br>
<br>
Le mercredi 25 novembre 2009 à 21:44 +0100, Nicolas Martin a écrit :<br>
<div><div></div><div class="h5">&gt; I&#39;ll take a look to the log trace and compare it to some others I have<br>
&gt; for multi-page ADF.<br>
&gt; There&#39;s something abnormal at the end of the first scan page, which<br>
&gt; leads to the &quot;Canceled by Software&quot; condition after the first scanned<br>
&gt; page. Never saw it before, so will try to understand what produces that,<br>
&gt; and will keep you posted.<br>
&gt;<br>
&gt; Probably will require a small change to the backend, so in the meantime,<br>
&gt; could you download, recompile and install the git Sane version, as I&#39;ll<br>
&gt; send you some patched file to be recompiled with the git version.<br>
&gt;<br>
&gt; Nicolas<br>
&gt;<br>
&gt; Le mardi 24 novembre 2009 à 23:55 +0100, Rogier Eggers a écrit :<br>
&gt; &gt; Hi Nicolas,<br>
&gt; &gt;<br>
&gt; &gt; Thanks for replying. Your debug instructions produced the attached log<br>
&gt; &gt; file. I hope you can make something of it.<br>
&gt; &gt;<br>
&gt; &gt; Regards,<br>
&gt; &gt;<br>
&gt; &gt; Rogier Eggers<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt; On Tue, 2009-11-24 at 08:15 +0100, Nicolas Martin wrote:<br>
&gt; &gt; &gt; Hi Rogier,<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; We would need first a log trace to see what&#39;s going on here, don&#39;t know<br>
&gt; &gt; &gt; what could have changed with Karmic. Could you run the scanimage batch<br>
&gt; &gt; &gt; command like this:<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; $ export SANE_DEBUG_PIXMA=11<br>
&gt; &gt; &gt; $ scanimage --batch --source=&quot;Automatic Document Feeder&quot; -v -d<br>
&gt; &gt; &gt; &quot;pixma:04A91728_1163AA&quot; -v 1&gt; test.tiff  2&gt; scanimage.log<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; and send me back the scanimage.log file you&#39;ll get.<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; Nicolas<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; Le lundi 23 novembre 2009 à 23:40 +0100, Rogier Eggers a écrit :<br>
&gt; &gt; &gt; &gt; Hello,<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; My scanner has trouble scanning multiple pages with the ADF. The<br>
&gt; &gt; &gt; &gt; second consecutive page with scanimage always gives me the following<br>
&gt; &gt; &gt; &gt; error:<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; scanimage: sane_read: Device busy<br>
&gt; &gt; &gt; &gt; Scanned page 2. (scanner status = 3)<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; This happens with all sane interfaces/programs that I have installed<br>
&gt; &gt; &gt; &gt; (xsane, scanimage from command line and gscn2pdf with all included<br>
&gt; &gt; &gt; &gt; frontends). Interestingly, there is no problem with scanning one page<br>
&gt; &gt; &gt; &gt; at a time (or scanning with the Flatbed). Documents do not get stuck<br>
&gt; &gt; &gt; &gt; in the scanner as I can issue the exact same command again and the<br>
&gt; &gt; &gt; &gt; next page (first page of that batch) will scan properly again.<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; It used to work several months ago. Help very much appreciated!<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; Earlier, I had a conversation on the gscan2pdf-help mailing list as I<br>
&gt; &gt; &gt; &gt; first experienced the problem with that program, but understandably I<br>
&gt; &gt; &gt; &gt; was referred to this list. See thread here:<br>
&gt; &gt; &gt; &gt; <a href="http://sourceforge.net/mailarchive/forum.php?thread_name=20091030150312.GB4933%40eeepc&amp;forum_name=gscan2pdf-help" target="_blank">http://sourceforge.net/mailarchive/forum.php?thread_name=20091030150312.GB4933%40eeepc&amp;forum_name=gscan2pdf-help</a><br>

&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; Detail information:<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; Canon PIXMA MX310 (usb connected multi-functional device)<br>
&gt; &gt; &gt; &gt; Ubuntu 9.10 Karmic<br>
&gt; &gt; &gt; &gt; libsane 1.0.20-4ubuntu3<br>
&gt; &gt; &gt; &gt; sane 1.0.14-7<br>
&gt; &gt; &gt; &gt; sane-utils 1.0.20-4ubuntu3<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; Command and full output:<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; rogier@rogier-desktop:~$ scanimage --batch --source=&quot;Automatic<br>
&gt; &gt; &gt; &gt; Document Feeder&quot; -v -d &quot;pixma:04A91728_1163AA&quot; -v &gt; test.tiff<br>
&gt; &gt; &gt; &gt; Scanning -1 pages, incrementing by 1, numbering from 1<br>
&gt; &gt; &gt; &gt; Scanning page 1<br>
&gt; &gt; &gt; &gt; scanimage: scanning image of size 640x877 pixels at 24 bits/pixel<br>
&gt; &gt; &gt; &gt; scanimage: acquiring RGB frame<br>
&gt; &gt; &gt; &gt; scanimage: min/max graylevel value = 22/255<br>
&gt; &gt; &gt; &gt; scanimage: read 1683840 bytes in total<br>
&gt; &gt; &gt; &gt; Scanned page 1. (scanner status = 5)<br>
&gt; &gt; &gt; &gt; Scanning page 2<br>
&gt; &gt; &gt; &gt; scanimage: scanning image of size 640x877 pixels at 24 bits/pixel<br>
&gt; &gt; &gt; &gt; scanimage: acquiring RGB frame<br>
&gt; &gt; &gt; &gt; scanimage: min/max graylevel value = 255/0<br>
&gt; &gt; &gt; &gt; scanimage: sane_read: Device busy<br>
&gt; &gt; &gt; &gt; Scanned page 2. (scanner status = 3)<br>
&gt; &gt; &gt; &gt; Closing device<br>
&gt; &gt; &gt; &gt; Calling sane_exit<br>
&gt; &gt; &gt; &gt; scanimage: finished<br>
&gt; &gt; &gt; &gt; rogier@rogier-desktop:~$<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; Thanks &amp; Regards,<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; Rogier Eggers<br>
&gt; &gt; &gt; &gt; --<br>
&gt; &gt; &gt; &gt; sane-devel mailing list: <a href="mailto:sane-devel@lists.alioth.debian.org">sane-devel@lists.alioth.debian.org</a><br>
&gt; &gt; &gt; &gt; <a href="http://lists.alioth.debian.org/mailman/listinfo/sane-devel" target="_blank">http://lists.alioth.debian.org/mailman/listinfo/sane-devel</a><br>
&gt; &gt; &gt; &gt; Unsubscribe: Send mail with subject &quot;unsubscribe your_password&quot;<br>
&gt; &gt; &gt; &gt;              to <a href="mailto:sane-devel-request@lists.alioth.debian.org">sane-devel-request@lists.alioth.debian.org</a><br>
&gt; &gt; &gt;<br>
&gt; &gt;<br>
<br>
</div></div></blockquote></div><br>