[sane-devel] sane-backends (eposn2) segfaults pretty much all the time

2013-10-07 Thread Chris Bagwell
On Thu, Oct 3, 2013 at 4:32 AM, Johannes Bauer dfnsonfsduifb at gmx.de wrote:
 Hi list,

 I have two scanners, one that uses the epson2 backend and a nex ScanSnap
 ix500 which uses the fujitsu. For the newer ix500 I needed a fairly
 recent version, so I'm currently using git head of sane-backends. This
 report concerns 472daf78.

 First note: the epson2 backend doesn't compile, because the pedantic
 setup forces C90 and mixed declarations and code are C99. Change
 concerns backend/epson2-ops.c line 234 where I simply created a new
 scope before the declaration/initialization of int last until line
 256. Then it compiles.

 However, it continuously blows up in my face with segfaults:

 $ scanimage --resolution 150 --mode Gray
 scanimage: output is not a file, exiting
 Segmentation fault

 $ scanimage --help
 Usage: scanimage [OPTION]...

 Start image acquisition on a scanner device and write image data to
 standard output.
 [...]
 Options specific to device `epson2:libusb:001:008':
   Scan Mode:
 --mode Lineart|Gray|Color [Lineart]
 [...]

 Type ``scanimage --help -d DEVICE'' to get list of all options for DEVICE.

 List of available devices:
 Segmentation fault

 This here starts scanning a complete document, actually creates a file,
 then outputs some broken debug output (control character is outputted)
 and then hangs (never exits):
 $ scanimage --resolution 150 --mode Gray x
  [Some weird CTRL char]libusb: 0.00 warning [libusb_close] internal
 signalling read failed, closing anyway
 libusb: 0.19 error [do_close] Device handle closed while transfer
 was still being processed, but the device is still connected as far as
 we know
 libusb: 0.26 error [do_close] A cancellation hasn't even been
 scheduled on the transfer for which the device is closing

 After I abort the hang with Ctrl-C, the scanner isn't recognized anymore
 and I need to plug it out and into USB again.

 Tracing the segfault for this command:
 $ /usr/local/bin/scanimage --resolution 150 --mode Gray

 yields:

 #0  0x74bd48c3 in libusb_submit_transfer () from
 /usr/lib64/libusb-1.0.so.0
 #1  0x74bd600f in do_sync_bulk_transfer () from
 /usr/lib64/libusb-1.0.so.0
 #2  0x74bd6384 in libusb_bulk_transfer () from
 /usr/lib64/libusb-1.0.so.0
 #3  0x767fbf66 in usb_bulk_io.isra.1 () from
 /usr/lib64/libusb-0.1.so.4
 #4  0x77bb93ae in sanei_usb_write_bulk (dn=0,
 buffer=0x7fffb760 \033Fz\365\377\177, size=0x7fffb708) at
 sanei_usb.c:2433
 #5  0x742a3f3e in e2_send (s=0x627580, buf=0x7fffb760,
 buf_size=2, reply_len=4, status=0x7fffb75c) at epson2-io.c:99
 #6  0x742a522d in esci_request_status (handle=0x627580,
 scanner_status=0x0) at epson2-commands.c:394
 #7  0x7429ffc2 in close_scanner (s=0x627580) at epson2.c:365
 #8  0x742a2214 in sane_epson2_close (handle=0x627580) at
 epson2.c:1545
 #9  0x77bcb234 in sane_dll_close (handle=0x618710) at dll.c:1223
 #10 0x00405d6d in scanimage_exit () at scanimage.c:1654
 #11 0x75445721 in __run_exit_handlers (status=1,
 listp=0x757ad5a8 __exit_funcs, run_list_atexit=true) at exit.c:78
 #12 0x754457a5 in __GI_exit (status=optimized out) at exit.c:100
 #13 0x00402ad3 in main (argc=optimized out,
 argv=0x7fffd9f8) at scanimage.c:2040

 The backtrace with the appropriate code:

 (gdb) up
 #1  0x74bd600f in do_sync_bulk_transfer () from
 /usr/lib64/libusb-1.0.so.0
 (gdb) up
 #2  0x74bd6384 in libusb_bulk_transfer () from
 /usr/lib64/libusb-1.0.so.0
 (gdb) up
 #3  0x767fbf66 in usb_bulk_io.isra.1 () from
 /usr/lib64/libusb-0.1.so.4
 (gdb) up
 #4  0x77bb93ae in sanei_usb_write_bulk (dn=0,
 buffer=0x7fffb820 \033Fz\365\377\177, size=0x7fffb7c8) at
 sanei_usb.c:2433
 2433  write_size = usb_bulk_write (devices[dn].libusb_handle,
 (gdb) up
 #5  0x742a3f3e in e2_send (s=0x627580, buf=0x7fffb820,
 buf_size=2, reply_len=4, status=0x7fffb81c) at epson2-io.c:99
 99  *status = sanei_usb_write_bulk(s-fd, buf, n);
 (gdb) up
 #6  0x742a522d in esci_request_status (handle=0x627580,
 scanner_status=0x0) at epson2-commands.c:394
 394 e2_send(s, params, 2, 4, status);
 (gdb) up
 #7  0x7429ffc2 in close_scanner (s=0x627580) at epson2.c:365
 365 esci_request_status(s, NULL);
 (gdb) up
 #8  0x742a2214 in sane_epson2_close (handle=0x627580) at
 epson2.c:1545
 1545close_scanner(s);
 (gdb) up
 #9  0x77bcb234 in sane_dll_close (handle=0x618710) at dll.c:1223
 1223  (*(op_close_t)s-be-op[OP_CLOSE]) (s-handle);
 (gdb) up
 #10 0x00405d6d in scanimage_exit () at scanimage.c:1654
 1654  sane_close (device);
 (gdb) up
 #11 0x75445721 in __run_exit_handlers (status=1,
 listp=0x757ad5a8 __exit_funcs, run_list_atexit=true) at exit.c:78
 78cxafct (f-func.cxa.arg, status);
 (gdb) 

[sane-devel] sane-backends (eposn2) segfaults pretty much all the time

2013-10-07 Thread Chris Bagwell
On Thu, Oct 3, 2013 at 1:34 PM, Johannes Bauer dfnsonfsduifb at gmx.de wrote:
 On 03.10.2013 13:12, m. allan noah wrote:
 I would recommend that you use git bisect (or a manual equivalent) to
 find the commit that breaks epson2. Then we can investigate a fix.

 This is really messed up:

 206e6ed094c080be903b154ea3d016cc226feb89 is the first bad commit
 commit 206e6ed094c080be903b154ea3d016cc226feb89
 Author: m. allan noah kitno-guest at alioth.debian.org
 Date:   Sat Jun 30 21:28:14 2012 -0400

 Adding new kodakaio backend


 The commit 206e6e is REALLY the first bad one (the one where it starts
 segfaulting). Curiously there are no changes in epson2 in there.

 I confirmed that the predecessor,
 df6a8ef89dbd061fb383722ddd6272e07fc468b3, is working (somewhat). At
 least it is NOT segfaulting, but displaying in the end:

 [...]
 Type ``scanimage --help -d DEVICE'' to get list of all options for DEVICE.

 List of available devices:
 libusb: 0.00 error [do_close] Device handle closed while transfer
 was still being processed, but the device is still connected as far as
 we know
 libusb: 0.43 error [do_close] A cancellation hasn't even been
 scheduled on the transfer for which the device is closing

 (then it hangs indefinitely, as described before)

 No idea what the hell is going on here.

 Best regards,
 Johannes


That info isn't to help on its own.  If its really calling
scanimage.c:2040 thats a simple function thats unlikely to fail.  I
suspect one of scanner drivers is corrupting memory while
auto-detecting scanners and epson2 is the victim... and if removing
the kodakaio driver improves things then maybe its that driver.

Can you try editing your /etc/sane.d/dll.conf and commenting out all
backends except epson2 and see if things work different?  If the
bisect is pointing towards kodakaio driver then you can also try only
commenting out that driver to try to narrow down to it.

Chris



[sane-devel] Fwd: Schedule for release of sane-backends 1.0.24

2013-09-26 Thread Chris Bagwell
I've completed a successful test run (make distcheck) on Fedora 20, OS X
10.5, and Windows/mingw32 (only epson2 backend enabled on mingw32).

Chris

On Mon, Sep 23, 2013 at 4:21 PM, m. allan noah kitno455 at gmail.com wrote:

 I'll probably have to slip the release back one day anyway.

 allan

 On Mon, Sep 23, 2013 at 4:40 PM, Chris Bagwell chris at cnpbagwell.com
 wrote:
  Kinda snuck up on me.  I probably won't be able to do another test
 compile
  on OSX, Windows, and Fedora until towards end of week.
 
  Chances are high that they are still compiling since last month's test
 run
  though.
 
  Chris
 
  On Mon, Sep 23, 2013 at 3:25 PM, m. allan noah kitno455 at gmail.com
 wrote:
 
  Yes. But, I'm not fanatical about it. If you have something simple
  that you are sure won't break anything else, go ahead and commit it.
 
  allan
 
  On Mon, Sep 23, 2013 at 4:09 PM, Rolf Bensch rolf at bensch-online.de
  wrote:
   Are we in code freeze now?
  
   Rolf
  
    Original-Nachricht 
   Betreff:  [sane-devel] Schedule for release of sane-backends
 1.0.24
   Datum:Sat, 24 Aug 2013 13:16:08 -0400
   Von:  m. allan noah kitno455 at gmail.com
   An:   sane-devel sane-devel at lists.alioth.debian.org
  
  
  
   It has been 1 year since our last release, so here we go again:
  
   Timetable:
   Sept 15, 2013: Feature freeze (only bugs, translation and doc
 updates)
   Sept 22, 2013: Code freeze (only horrible bugs, translation and doc
   updates)
   Sept 29, 2013: Release
  
   Note, it is highly likely that there are patches from end users which
   we failed to apply. If you know of such a case, please speak up, so
 we
   can start a dialog about including them in the release.
  
   During the period leading up to the release, it would be helpful if
 we
   could get some builds on various platforms, and tests done with
   various scanners. The sooner we discover problems, the better.
  
   allan
 
 



 --
 The truth is an offense, but not a sin

-- next part --
An HTML attachment was scrubbed...
URL: 
http://lists.alioth.debian.org/pipermail/sane-devel/attachments/20130926/a3aaeb64/attachment.html


[sane-devel] Fwd: Schedule for release of sane-backends 1.0.24

2013-09-23 Thread Chris Bagwell
Kinda snuck up on me.  I probably won't be able to do another test compile
on OSX, Windows, and Fedora until towards end of week.

Chances are high that they are still compiling since last month's test run
though.

Chris

On Mon, Sep 23, 2013 at 3:25 PM, m. allan noah kitno455 at gmail.com wrote:

 Yes. But, I'm not fanatical about it. If you have something simple
 that you are sure won't break anything else, go ahead and commit it.

 allan

 On Mon, Sep 23, 2013 at 4:09 PM, Rolf Bensch rolf at bensch-online.de
 wrote:
  Are we in code freeze now?
 
  Rolf
 
   Original-Nachricht 
  Betreff:  [sane-devel] Schedule for release of sane-backends 1.0.24
  Datum:Sat, 24 Aug 2013 13:16:08 -0400
  Von:  m. allan noah kitno455 at gmail.com
  An:   sane-devel sane-devel at lists.alioth.debian.org
 
 
 
  It has been 1 year since our last release, so here we go again:
 
  Timetable:
  Sept 15, 2013: Feature freeze (only bugs, translation and doc updates)
  Sept 22, 2013: Code freeze (only horrible bugs, translation and doc
 updates)
  Sept 29, 2013: Release
 
  Note, it is highly likely that there are patches from end users which
  we failed to apply. If you know of such a case, please speak up, so we
  can start a dialog about including them in the release.
 
  During the period leading up to the release, it would be helpful if we
  could get some builds on various platforms, and tests done with
  various scanners. The sooner we discover problems, the better.
 
  allan


-- next part --
An HTML attachment was scrubbed...
URL: 
http://lists.alioth.debian.org/pipermail/sane-devel/attachments/20130923/8f2d086a/attachment.html


[sane-devel] sanei_usb_open() and permission denied

2013-08-26 Thread Chris Bagwell
Ok, I pushed a patch that lets USB test pass on all my boxes.

I'd appreciate if someone could test this (run make check) on a box with
a USB scanner plugged in. All my scanners are network scanners so I can't
test that case.

Chris

On Sun, Aug 25, 2013 at 12:58 PM, m. allan noah kitno455 at gmail.com wrote:

 Your suggested changes sound fine to me.

 allan

 On Sun, Aug 25, 2013 at 1:09 PM, Chris Bagwell chris at cnpbagwell.com
 wrote:
  Hi all,
 
  This is probably directly more towards St?phane based on recent USB work
 but
  of interest to all.
 
  The sanie_usb_test.c test is failing on one of my Linux boxes in the
  test_open_all() test... I'd like to get some input on best way to fix
 this
  failure or if we should fix it at all.
 
  The reason it is failing for me is because this box has a USB wifi module
  that has a report with Vendor Specific Class/Subclass/Protocol and so
 sane
  adds it to the list as possible scanner.  The open itself fails when ran
 by
  normal user because its accessable only by root (EACCES).  The open fails
  when ran as root because its already opened by networking stuff (EBUSY).
 
  Because these two cases are kinda soft failures, I was thinking about
  changing the test to simply skip over these opens instead of failing the
  whole test case.  What do you think about this change?
 
  If you agree with that change, the second issue I'll have is that
  sanei_usb_open() seems to treat EPERM as permission denied
  (SANE_STATUS_ACCESS_DENIED) but not EACCES.  Do you see any issues with
 me
  changing it so both EPERM and EACCES map to SANE_STATUS_ACCESS_DENIED?
 
  If I don't make that change then the EACCES error code is mapped to
 generic
  SANE_STATUS_INVAL and I can't tell difference between real failures and
  permission failures.
 
  Chris
 
  --
  sane-devel mailing list: sane-devel at lists.alioth.debian.org
  http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
  Unsubscribe: Send mail with subject unsubscribe your_password
   to sane-devel-request at lists.alioth.debian.org



 --
 The truth is an offense, but not a sin

-- next part --
An HTML attachment was scrubbed...
URL: 
http://lists.alioth.debian.org/pipermail/sane-devel/attachments/20130826/5e9333ff/attachment.html


[sane-devel] epson2 backend URL fixes (was: Re: Epson GT-7300U)

2013-08-25 Thread Chris Bagwell
Applied this patch and your other model patch to git.

Someone else will have to do the HTML part.

Chris


On Sun, Aug 18, 2013 at 10:41 PM, Olaf Meeuwissen olaf.meeuwissen at avasys.jp
 wrote:

 Just pinging the list about the status of the patch I sent mid June.
 Anyone willing to commit?

 Olaf Meeuwissen writes:

  Julian H. Stacey writes:
 
  To whoever maintains page:
   http://www.sane-project.org/sane-backends.html
  At line found by
   GT-7300U
  The URL behind is
   http://avasys.jp/product/linux_driver/index.php
  which needs changing as
   - Its Japanese (with an English button) to http://avasys.jp/eng/
   the their:
   2013/01/21Notice of termination of the Linux Driver Download
 Service
  So now please point to
   http://download.ebz.epson.net/dsc/search/01/search/searchModule
 
  Looks like Julian is talking about the information from the epson2
  backend.  Please find a patch attached that fixes all the URLs.  If
  someone with commit privileges could push this (and update the HTML
  pages) I'd appreciate it.
 
  The patch can be applied with `git am`.

 Hope this helps,
 --
 Olaf Meeuwissen, LPIC-2   FLOSS Engineer -- AVASYS CORPORATION
 FSF Associate Member #1962   Help support software freedom
  http://www.fsf.org/jf?referrer=1962

 --
 sane-devel mailing list: sane-devel at lists.alioth.debian.org
 http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
 Unsubscribe: Send mail with subject unsubscribe your_password
  to sane-devel-request at lists.alioth.debian.org

-- next part --
An HTML attachment was scrubbed...
URL: 
http://lists.alioth.debian.org/pipermail/sane-devel/attachments/20130825/a7067494/attachment.html


[sane-devel] sanei_usb_open() and permission denied

2013-08-25 Thread Chris Bagwell
Hi all,

This is probably directly more towards St?phane based on recent USB work
but of interest to all.

The sanie_usb_test.c test is failing on one of my Linux boxes in the
test_open_all() test... I'd like to get some input on best way to fix this
failure or if we should fix it at all.

The reason it is failing for me is because this box has a USB wifi module
that has a report with Vendor Specific Class/Subclass/Protocol and so sane
adds it to the list as possible scanner.  The open itself fails when ran by
normal user because its accessable only by root (EACCES).  The open fails
when ran as root because its already opened by networking stuff (EBUSY).

Because these two cases are kinda soft failures, I was thinking about
changing the test to simply skip over these opens instead of failing the
whole test case.  What do you think about this change?

If you agree with that change, the second issue I'll have is that
sanei_usb_open() seems to treat EPERM as permission denied
(SANE_STATUS_ACCESS_DENIED) but not EACCES.  Do you see any issues with me
changing it so both EPERM and EACCES map to SANE_STATUS_ACCESS_DENIED?

If I don't make that change then the EACCES error code is mapped to generic
SANE_STATUS_INVAL and I can't tell difference between real failures and
permission failures.

Chris
-- next part --
An HTML attachment was scrubbed...
URL: 
http://lists.alioth.debian.org/pipermail/sane-devel/attachments/20130825/0d958d4d/attachment.html


[sane-devel] Compiling question (autoreconf)

2013-08-23 Thread Chris Bagwell
On Fri, Aug 23, 2013 at 10:46 AM, ?l ??gn?r sane-ml at corr.eu.org wrote:

 I compiled sane from git as mentioned below. Can I ignore the messages
 with autoreconf?


$ cd /install/linuxins/sane-git/src/

 $ git clone git://git.debian.org/sane/sane-backends.git

 $ cd /install/linuxins/sane-git/src/sane-backends/


Because all the autofoo files are committed to git, after the clone you
should be able to skip all the next steps and jump straight to the
./configure step.  You only need to do these steps with warnings if you
mess with configure.in or Makefile.am's.



 $ autoconf
 aclocal.m4:17: warning: this file was generated for autoconf 2.69.
 You have another version of autoconf.  It may work, but is not
 guaranteed to. If you have problems, you may need to regenerate the
 build system entirely. To do so, use the procedure documented by the
 package, typically 'autoreconf'.


autoreconf is same as running both autoconf and automake so you shouldn't
be doing all three commands.



 $ autoreconf
 libtoolize: Consider adding `-I m4' to ACLOCAL_AMFLAGS in Makefile.am.
 backend/Makefile.am:52: `%'-style pattern rules are a GNU make extension
 po/Makefile.am:17: shell if test -r $(srcdir: non-POSIX variable name
 po/Makefile.am:17: (probably a GNU make extension)
 po/Makefile.am:18: shell if test -r $(srcdir: non-POSIX variable name
 po/Makefile.am:18: (probably a GNU make extension)
 po/Makefile.am:20: shell LINGUAS=$(PO_LINGUAS: non-POSIX variable name
 po/Makefile.am:20: (probably a GNU make extension)
 po/Makefile.am:21: shell LINGUAS=$(PO_LINGUAS: non-POSIX variable name
 po/Makefile.am:21: (probably a GNU make extension)
 tools/Makefile.am:62: wildcard ${top_srcdir}/doc/descriptions/*.desc:
 non-POSIX variable name tools/Makefile.am:62: (probably a GNU make
 extension) tools/Makefile.am:62: wildcard
 ${top_srcdir}/doc/descriptions-external/*.desc: non-POSIX variable name
 tools/Makefile.am:62: (probably a GNU make extension)
 tools/Makefile.am:66: wildcard ${top_srcdir}/doc/descriptions/*.desc:
 non-POSIX variable name tools/Makefile.am:66: (probably a GNU make
 extension) tools/Makefile.am:66: wildcard
 ${top_srcdir}/doc/descriptions-external/*.desc: non-POSIX variable name
 tools/Makefile.am:66: (probably a GNU make extension)
 tools/Makefile.am:70: wildcard ${top_srcdir}/doc/descriptions/*.desc:
 non-POSIX variable name tools/Makefile.am:70: (probably a GNU make
 extension) tools/Makefile.am:70: wildcard
 ${top_srcdir}/doc/descriptions-external/*.desc: non-POSIX variable name
 tools/Makefile.am:70: (probably a GNU make extension)
 tools/Makefile.am:74: wildcard ${top_srcdir}/doc/descriptions/*.desc:
 non-POSIX variable name tools/Makefile.am:74: (probably a GNU make
 extension) tools/Makefile.am:74: wildcard
 ${top_srcdir}/doc/descriptions-external/*.desc: non-POSIX variable name
 tools/Makefile.am:74: (probably a GNU make extension)


Yes, all these warnings are currently expected upon a successful run of
autoreconf command.  So it looked like this works for you if you do need to
modify autofoo related files.

Chris



 $ autoconf

 $ automake


 # Test
 # $BACKENDS=pixma ./configure
 # - The following backends will be built:
 # pixma

 $ ./configure

 $ make

 su -

 cd /install/linuxins/sane-git/src/sane-backend

 make install

 --
 ?l


 --
 sane-devel mailing list: sane-devel at lists.alioth.debian.org
 http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
 Unsubscribe: Send mail with subject unsubscribe your_password
  to sane-devel-request at lists.alioth.debian.org
-- next part --
An HTML attachment was scrubbed...
URL: 
http://lists.alioth.debian.org/pipermail/sane-devel/attachments/20130823/6b538548/attachment.html


[sane-devel] Time to set up SANE's release plan ?

2013-08-15 Thread Chris Bagwell
On Sun, Aug 11, 2013 at 3:31 PM, Stef stef.dev at free.fr wrote:

 Hello,

 it's about one year that SANE 1.0.23 has been released. I think we
 should set a release plan to get 1.0.24 ready this year.

 Regards,
 Stef


For what its worth, I've finally submitted the one patch I wanted to get in
before another release (a pthreads patch to work with mingw64) so I'm ready.

Also, I'd like to get make distcheck working before next release if
possible.  Some of the new testsuite work is failing when distcheck runs
the check target.  I may be able to help debug that deeper at later
date.  For now, here is what I found.

sanei_config_test is failing because its looking for a config file relative
to current directory but that doesn't work when you build and run from a
directory different from source.  We somehow need to pass $srcdir during
compiling and have it prepend that to config filename instead of looking in
./data.

Also, sanei_usb_test is  failing for me when ran from _build as well.  I'm
not sure the reason it works differently but I see that test_store_device()
is calling store_device() and there is a for() loop that checks each value
for devices[i].  A call to strcpy(devices[i].devname, device.devname) is
crashing because devices[i].devname is a NULL pointer (whole structure
except for devices[i].method are null vaules as matter of fact).

Chris
-- next part --
An HTML attachment was scrubbed...
URL: 
http://lists.alioth.debian.org/pipermail/sane-devel/attachments/20130815/fdba617b/attachment.html


[sane-devel] sane under windows XP / 7

2012-09-05 Thread Chris Bagwell
On Wed, Sep 5, 2012 at 5:12 AM, Matteo Gasparin email.diversa at gmail.com 
wrote:
 I'm using the 1.0.22 tarball downloaded from
 https://alioth.debian.org/frs/?group_id=30186

You'll want to download the just released 1.0.23 or grab from git.  It
has several mingw32 bugfixes.

 For the environment variables, do I just need to set them and they will be
 picked by the dll?

yes.  See 'man sane-usb' and 'man sane-avision' for examples.

 Is the use of libdwi the only way to see the usb devices from Windows? Seems
 kind of a complicated and hackish way to get it work...

What is libdwi?  libusb-win32 is needed and I hear windows support has
been integrated into libusb-1.x library directory but requires minor
header file fixes in sane to use them.

Chris



[sane-devel] sane under windows XP / 7

2012-09-04 Thread Chris Bagwell
On Tue, Sep 4, 2012 at 10:33 AM, Matteo Gasparin
email.diversa at gmail.com wrote:
 I'm trying to write a multi platform scanning utility using SANE but, while
 everything with linux is fine, opening the device and all, I find issues
 with windows, both xp 32 and 7 64 bit. I downloaded the source and compiled
 it using cygwin and the libusb-win32 library and everything went fine; some
 of the backends didn't build:

 *** canon_pp backend requires libieee1284 library - disabling
 *** gphoto2 backend requires gphoto2 and JPEG libraries - disabling
 *** hpsj5s backend requires libieee1284 library - disabling
 *** mustek_pp backend requires libieee1284 and paraport-directio libraries -
 disabling
 *** mustek_usb2 backend requires pthread library - disabling
 *** pint backend requires sys/scanio.h - disabling
 *** qcam backend requires ioperm and portaccess functions - disabling
 *** v4l backend requires v4l libraries - disabling
 *** pnm backend not manually selected - disabling

 which is ok for me, since the scanner I'm trying to reach is a HP Scanjet
 5300C, which should use the avisio backend. I thought it could be a USB
 driver issue so I used libwdi's zadig program to switch the normal xp driver
 with the libusb-win32 one. After that sane-find-scanner could correctly
 recognize the scanner but no luck using scanimage.

 Did I do something wrong? Did I miss something?

Hopefully, others with mingw32 experience will jump in as well.  But
to start, what version of sane-backends are you testing with?

I occasionally test cross compiling sane-backends on Fedora using
ming32 cross compiler and then I test the executable using wine with a
networked Epson scanner.  I compile with configure BACKENDS=epson2
so I don't get much visibility into other backends.  I have no
experience testing USB support under mingw32 though.

I believe avision is the only other backend that has much mingw32
testing by other users.  I thought there has been successful USB
access using libusb-win32 though.

Your probably going to have to start debugging to get much further.
You can try the SANE_DEBUG_SANEI_USB and SANEI_DEBUG_AVISION
environment variables and see if you can spot were things are going
wrong between Linux and Windows.

 On top of that I'm using Java and JNA to interface with SANE; again
 everything using linux is fine, while with windows it correctly loads the
 library and then hangs at the first call of sane_init(null, null) . Someone
 got an idea about that?

Hmm, not sure. I recall having some odd issues with finding config
files on windows.  I think you may have to change into scanimage
install directory before running your app or set the SANE_CONFIG_DIR
environment variable.

That type of failures shouldn't cause hang ups but you never know.

Chris



[sane-devel] sane-backends from git 2012-08-16

2012-08-17 Thread Chris Bagwell
Thanks for the report and sorry about that.  Second time I messed up
with this change.  I just submitted a fix for it.

Its really odd how the different compiler versions and
--disable-shared are all catching different symbol issues.  My Fedora
17 wasn't finding this issue.

This time, I ran configure BACKEND=kvsXXX for each of the 3 kvs
backends I modified.  Hopefully, that will have cought any remaining
missing symbols.

FYI: The Epjitsu and Snapscan backends both have a duplicate scan()
symbol and what my compiler was using to not fail since I was linking.
 Its probably best to add prefixes to those backends at some point as
well to prevent any issues in the off chance both backends are used on
1 system.

Chris

On Fri, Aug 17, 2012 at 1:39 PM, m. allan noah kitno455 at gmail.com wrote:
 There was a recent patch to kvs backends to allow them to build
 statically, by renaming some functions. It appears that one was
 missed. Try changing the call to kvs40xx_scan instead, and see if that
 builds.

 allan

 On Fri, Aug 17, 2012 at 2:24 PM, Sergei LITVINENKO
 sergei.litvinenko at gmail.com wrote:
 Hello everybody,

 I try to build rpm for F16 (spec from src.rpm package). In spec sane-backend
 is configured as:

 %configure \
 --with-gphoto2=%{_prefix} \
 --with-docdir=%{_docdir}/%{name}-%{version} \
 --disable-locking --disable-rpath \
 --enable-pthread


 Try to use like the same

 ./configure --with-gphoto2 --disable-locking --disable-rpath
 --enable-pthread

 and have:

 /bin/sh ../libtool --silent --tag=CC   --mode=link gcc  -g -O2 -W -Wall
 -Wcast-align -Wcast-qual -Wmissing-declarations -Wmissing-prototypes
 -Wpointer-arith -Wreturn-type -Wstrict-prototypes -pedantic -ansi
 -Wl,-z,defs  -o libkvs40xx.la  libkvs40xx_la-kvs40xx.lo
 libkvs40xx_la-kvs40xx_cmd.lo libkvs40xx_la-kvs40xx_opt.lo
 /bin/sh ../libtool --silent --tag=CC   --mode=link gcc  -g -O2 -W -Wall
 -Wcast-align -Wcast-qual -Wmissing-declarations -Wmissing-prototypes
 -Wpointer-arith -Wreturn-type -Wstrict-prototypes -pedantic -ansi
 -Wl,-z,defs -rpath '/usr/local/lib/sane' -version-number 1:0:23 -module  -o
 libsane-kvs40xx.la  libsane_kvs40xx_la-kvs40xx-s.lo ../lib/liblib.la
 libkvs40xx.la ../sanei/sanei_init_debug.lo ../sanei/sanei_constrain_value.lo
 ../sanei/sanei_config.lo sane_strstatus.lo ../sanei/sanei_usb.lo
 ../sanei/sanei_scsi.lo  -lusb  -lpthread
 ./.libs/libkvs40xx.a(libkvs40xx_la-kvs40xx.o): In function
 `sane_kvs40xx_start':
 /home/sergeil/desk/src/BUILD/sane-backends-20120816/backend/kvs40xx.c:595:
 undefined reference to `scan'
 collect2: ld returned 1 exit status
 make[2]: *** [libsane-kvs40xx.la] ?? 1
 make[2]: ? ?? 
 `/home/sergeil/desk/src/BUILD/sane-backends-20120816/backend'
 make[1]: *** [all] ?? 2
 make[1]: ? ?? 
 `/home/sergeil/desk/src/BUILD/sane-backends-20120816/backend'
 make: *** [all-recursive] ?? 1

 Do you know where function scan() is defined?

 /home/sergeil/desk/src/BUILD/sane-backends-20120816/backend/kvs40xx.c
 ...
   if (duplex)
 {
   st = kvs40xx_set_window (s, SIDE_BACK);
   if (st)
 return st;
 }

   st = scan (s);
   if (st)
 return st;
 ...


 PS: In case of simple configuration `./configure`, make can finish OK.

 --
 Best regards,
 Sergei LITVINENKO

 There is a great difference between
 be involved and be committed.
 Usually we are committed...


 --
 sane-devel mailing list: sane-devel at lists.alioth.debian.org
 http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
 Unsubscribe: Send mail with subject unsubscribe your_password
  to sane-devel-request at lists.alioth.debian.org



 --
 The truth is an offense, but not a sin

 --
 sane-devel mailing list: sane-devel at lists.alioth.debian.org
 http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
 Unsubscribe: Send mail with subject unsubscribe your_password
  to sane-devel-request at lists.alioth.debian.org



[sane-devel] error building using --enable-static

2012-08-09 Thread Chris Bagwell
Could you submit the changes then?

With that combo below, it should make it so only frontends/Makefile.am
and frontsends/Makefile.in need to be submitted that have minor
changes.  With my installed tools, its closer to 10 or more files with
large changes.

Chris

On Wed, Aug 8, 2012 at 2:45 PM, Stef stef.dev at free.fr wrote:
 Hello,

 on my test system (Slackware 13.37):
 - i cloned current git tree
 - did a static build that failed linking
 - applied the library order patch
 - done 'autoreconf'
 - rebuilt successfully and got a ~9.5 MB scanimage and saned 

 The 'auto' packages used were:
 autoconf 2.68
 automake 1.11.1

 So I believe it would be fine to apply it to the git tree.

 Regards,
 Stef



[sane-devel] error building using --enable-static

2012-08-09 Thread Chris Bagwell
Thank you much, Allan.

Although its compiling for me on OS X now, Stef identified an
additional patch needed for Linux.  Can you commit it as well?

diff --git a/frontend/Makefile.am b/frontend/Makefile.am
index 4ceae3b..74e7425 100644
--- a/frontend/Makefile.am
+++ b/frontend/Makefile.am
@@ -17,7 +17,8 @@ endif
 AM_CPPFLAGS = -I. -I$(srcdir) -I$(top_builddir)/include -I$(top_srcdir)/include

 scanimage_SOURCES = scanimage.c stiff.c stiff.h
-scanimage_LDADD = ../backend/libsane.la ../lib/liblib.la ../lib/libfelib.la
+scanimage_LDADD = ../backend/libsane.la ../sanei/libsanei.la ../lib/liblib.la \
+ ../lib/libfelib.la

 saned_SOURCES = saned.c
 saned_LDADD = ../backend/libsane.la ../sanei/libsanei.la ../lib/liblib.la \

Chris

On Thu, Aug 9, 2012 at 8:04 PM, m. allan noah kitno455 at gmail.com wrote:
 I have committed these changes.

 allan

 On Thu, Aug 9, 2012 at 12:52 PM, Chris Bagwell chris at cnpbagwell.com 
 wrote:
 Could you submit the changes then?

 With that combo below, it should make it so only frontends/Makefile.am
 and frontsends/Makefile.in need to be submitted that have minor
 changes.  With my installed tools, its closer to 10 or more files with
 large changes.

 Chris

 On Wed, Aug 8, 2012 at 2:45 PM, Stef stef.dev at free.fr wrote:
 Hello,

 on my test system (Slackware 13.37):
 - i cloned current git tree
 - did a static build that failed linking
 - applied the library order patch
 - done 'autoreconf'
 - rebuilt successfully and got a ~9.5 MB scanimage and saned 

 The 'auto' packages used were:
 autoconf 2.68
 automake 1.11.1

 So I believe it would be fine to apply it to the git tree.

 Regards,
 Stef

 --
 sane-devel mailing list: sane-devel at lists.alioth.debian.org
 http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
 Unsubscribe: Send mail with subject unsubscribe your_password
  to sane-devel-request at lists.alioth.debian.org



 --
 The truth is an offense, but not a sin



[sane-devel] error building using --enable-static

2012-08-08 Thread Chris Bagwell
On Wed, Aug 8, 2012 at 12:49 AM, Stef stef.dev at free.fr wrote:
 Hello,

 thanks for the patches. They work great here.
 For the linking problem, what should be the version number for old
 autoconf tools? The Makefile.in in git have a automake 1.11.1 tag, is it old
 enough? I may have a suitable test platform.

Yes, 1.11.1 is ideal.  I believe the current configure/Makefile.in's
were generated based on versions in Fedora 16 if that helps as well.
I have automake 1.11.3 from Fedora 17 and the changes are quite large
for a minor release.


 To get scanimage compiling, I also had to specify libsanei in
 scanimage_LDADD:

Oh yes, I remember that now.  The info got lost because I was hand
editing Makefile originally.

Thanks,
Chris



[sane-devel] error building using --enable-static

2012-08-07 Thread Chris Bagwell
I fixed the kvs backend symbol issues and committed them.

Also, I believe I have a fix for jpeg symbols.  I think its just a
linking ordering issue.  At least I got it working by hand editing the
frontend/Makefile and moving the libraries with missing symbols to
later in line of saned_LDADD and scanimage_LDADD.

I do not have the older versions of autofoo packages installed and
I'll reluctant to submit large configure and Makefile.in file updates
at this stage.

If someone has older autofoo installed and can check in just
frontend/Makefile.am and frontend/Makefile.in change, here is
suggested patch (I notice that liblib.la is in two different orders.
May need to move one of those to later as well):

--- a/frontend/Makefile.am
+++ b/frontend/Makefile.am
@@ -17,11 +17,11 @@ endif
 AM_CPPFLAGS = -I. -I$(srcdir) -I$(top_builddir)/include -I$(top_srcdir)/include

 scanimage_SOURCES = scanimage.c stiff.c stiff.h
-scanimage_LDADD = ../lib/liblib.la ../lib/libfelib.la ../backend/libsane.la
+scanimage_LDADD = ../backend/libsane.la ../lib/liblib.la ../lib/libfelib.la

 saned_SOURCES = saned.c
-saned_LDADD = ../sanei/libsanei.la ../lib/liblib.la ../lib/libfelib.la \
-  ../backend/libsane.la @SYSLOG_LIBS@
+saned_LDADD = ../backend/libsane.la ../sanei/libsanei.la ../lib/liblib.la \
+ ../lib/libfelib.la @SYSLOG_LIBS@

 test_SOURCES = test.c
 test_LDADD = ../lib/liblib.la ../lib/libfelib.la ../backend/libsane.la

Chris

On Sat, Aug 4, 2012 at 2:13 AM, stef stef.dev at free.fr wrote:
 Hello,

 while debugging saned/genesys backend I noted that a static build :
 ./configure 'CFLAGS=-ggdb' '--prefix=/usr' '--sysconfdir=/etc'
 '--enable-pnm-backend' '--enable-parport-directio' '--enable-locking'
 --enable-static --disable-shared

 fails with:

 /usr/lib/gcc/i486-slackware-linux/4.7.1/../../../../i486-slackware-linux/bin/ld:
 Warning: alignment 16 of symbol `scan' in
 ../backend/.libs/libsane.a(libkvs20xx_la-kvs20xx_cmd.o) is smaller than 32
 in ../backend/.libs/libsane.a(libhp3900_la-hp3900.o)
 /usr/lib/gcc/i486-slackware-linux/4.7.1/../../../../i486-slackware-linux/bin/ld:
 Warning: size of symbol `scan' changed from 72 in
 ../backend/.libs/libsane.a(libhp3900_la-hp3900.o) to 86 in
 ../backend/.libs/libsane.a(libkvs20xx_la-kvs20xx_cmd.o)
 /usr/lib/gcc/i486-slackware-linux/4.7.1/../../../../i486-slackware-linux/bin/ld:
 Warning: type of symbol `scan' changed from 1 to 2 in
 ../backend/.libs/libsane.a(libkvs20xx_la-kvs20xx_cmd.o)
 ../backend/.libs/libsane.a(libgphoto2_i_la-gphoto2.o): In function
 `converter_init':
 /stefdev/git/sane-backends/backend/gphoto2.c:1982: undefined reference to
 `sanei_jpeg_jinit_write_ppm'
 ../backend/.libs/libsane.a(libdc210_la-dc210.o): In function
 `sane_dc210_start':
 /stefdev/git/sane-backends/backend/dc210.c:1264: undefined reference to
 `sanei_jpeg_jinit_write_ppm'
 ../backend/.libs/libsane.a(libdc240_la-dc240.o): In function
 `sane_dc240_start':
 /stefdev/git/sane-backends/backend/dc240.c:1477: undefined reference to
 `sanei_jpeg_jinit_write_ppm'
 collect2: error: ld returned 1 exit status
 make[1]: *** [scanimage] Erreur 1
 make: *** [all-recursive] Erreur 1

 All the ksv20xx_cmd.c functions should be renamed like explained in
 backend-writing.txt , so to avoid clashes like the one on the 'scan'
 function with the hp3900 (which maybe is lacking a 'static' somewhere).
 'make libchek' lists all the symbols that may clash, and there is quite a
 number of them.

  And it seems some library is missing at link time for scanimage.

 I currently haven't the time to dig into it. So if anyone has time 

 Regards,
 Stef




 --
 sane-devel mailing list: sane-devel at lists.alioth.debian.org
 http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
 Unsubscribe: Send mail with subject unsubscribe your_password
 to sane-devel-request at lists.alioth.debian.org



[sane-devel] Schedule for release of sane-backends 1.0.23

2012-07-29 Thread Chris Bagwell
On Sun, Jul 29, 2012 at 7:26 PM, m. allan noah kitno455 at gmail.com wrote:
 Sane-backends is now in feature freeze. Bugs and documentation may
 still be fixed, but major improvements should be avoided. If you have
 access to a scanner or a platform that is even slightly uncommon,
 please try to test a current sane-backends git snapshot.

FYI: Fedora 17, OS X 10.8 (Mountain Lion), Mingw32, and Mingw64 are
still in good shape as of today's rebase.

I'll do one more test close to Aug. 5th date.

Chris



[sane-devel] Schedule for release of sane-backends 1.0.23

2012-07-19 Thread Chris Bagwell
On Wed, Jul 18, 2012 at 6:44 PM, m. allan noah kitno455 at gmail.com wrote:
 Timetable:
 Jul 29, 2012: Feature freeze (only bugs + documentation updates)
 Aug 5, 2012: Code freeze (only horrible bugs + documentation updates)
 Aug 12, 2012: Release

 Speak up now if this timetable needs to change.


In last month, I've done test compiles on Fedora 17, mingw32 (epson2
compiled only), mingw64 (epson2 only), and OS X 10.6 and we are good
to go on those platforms.

If I see new code submissions, I'll do another test compile around Aug
1 and fix any issues.

Chris



[sane-devel] Windows pthread issue

2012-03-01 Thread Chris Bagwell
On Wed, Feb 29, 2012 at 1:00 PM, Michael Cronenworth mike at cchtml.com wrote:
 Hi All/Chris,

 Fedora (17) is moving away from mingw.org to the w64 MinGW environment.

 The w64 folks have a new pthreads implementation called winpthreads and I
 have encountered an issue with it when compiling sane-backends.

 For the Windows build you try to expand the pthread_t pointer. Under
 winpthreads a pthread_t is not defined as a struct. Could you read the
 following support thread on the w64 sourceforge page and make any comments
 or corrections?

 https://sourceforge.net/tracker/index.php?func=detailaid=3495128group_id=202880atid=983355

Can you test a possible fix since you have access?  They appear to be
using an unsigned pointer so traditional -1 can't be used.  In
sanei_thread.c, modify these three blocks:

#ifdef WIN32
pid-p = 0;

[...]

#ifdef WIN32
if (pid.p == 0)
rc = SANE_TRUE;

[...]

#ifdef WIN32
rc = pid.p;

to become:

#ifdef WIN32
#ifdef WINTHREADS_API
pid-p = 0;
#else
pid-p = NULL;
#endif

[...]

#ifdef WIN32
#ifdef WINTHREADS_API
if (pid == NULL)
#else
if (pid.p == 0)
#endif
rc = SANE_TRUE;

[...]

#ifdef WIN32
#ifdef WINTHREADS_API
rc = (long)pid;
#else
rc = pid.p;
#endif

Chris


 Thanks,
 Michael



[sane-devel] [PATCH v2 03/14] bldchn, use our new macro SANE_CHECK_NETDB_FUNC

2012-01-26 Thread Chris Bagwell
On Tue, Jan 24, 2012 at 1:49 PM, Ruediger Meier sweet_f_a at gmx.de wrote:
 On Tuesday 24 January 2012, Chris Bagwell wrote:
 On Mon, Jan 23, 2012 at 5:05 PM, Ruediger Meier sweet_f_a at gmx.de
 wrote:
  From: Ruediger Meier ruediger.meier at ga-group.nl
 
  Now we will find getaddrinfo and getnameinfo on win32 systems.
  Note it should be even safe to use that macro for all systems
  instead of trying AC_CHECK_FUNCS first. For now I don't want to do
  such risky things things and leave it as is.

 I would prefer if we went ahead and did your suggestion of doing
 check with new macro on all systems instead of this. ?I will be glad
 to test on a sampling of Unix systems to make sure there are no
 issues.

 So I'm saying I'd prefer this patch to change to delete old check for
 get* functions and do macro unconditionally.

 Ok, then I will polish SANE_CHECK_NETDB_FUNC a little for this:
 1. maybe allowing multiple args
 2. respecting cached results


 One thing I notice must be a bug. ?Right before the old call to
 AC_CHECK_FUNCS(), there is a check for BeOS and forces the variables
 to be no. ?Those need to be after the AC_CHECK_FUNCS to be
 meaningful.

 On first view I've also wondered about this but note that all ac_cv_*
 vars are cached variables and having them set to no before doing
 the check will result it this:

 checking for getaddrinfo... (cached) no
 checking for getnameinfo... (cached) no



Oh yeah.  Thanks for that info.  I not so sure if the logic was
written to work that way but its nice to know we were working.

Chris



[sane-devel] [PATCH v2 03/14] bldchn, use our new macro SANE_CHECK_NETDB_FUNC

2012-01-24 Thread Chris Bagwell
On Mon, Jan 23, 2012 at 5:05 PM, Ruediger Meier sweet_f_a at gmx.de wrote:
 From: Ruediger Meier ruediger.meier at ga-group.nl

 Now we will find getaddrinfo and getnameinfo on win32 systems.
 Note it should be even safe to use that macro for all systems instead of
 trying AC_CHECK_FUNCS first. For now I don't want to do such risky things
 things and leave it as is.

I would prefer if we went ahead and did your suggestion of doing check
with new macro on all systems instead of this.  I will be glad to test
on a sampling of Unix systems to make sure there are no issues.

So I'm saying I'd prefer this patch to change to delete old check for
get* functions and do macro unconditionally.

One thing I notice must be a bug.  Right before the old call to
AC_CHECK_FUNCS(), there is a check for BeOS and forces the variables
to be no.  Those need to be after the AC_CHECK_FUNCS to be
meaningful.  I'm pretty sure BeOS support is broke in other ways.

Anyways, I'll probably submit a patch to fix BeOS bug along with your patches.

Chris

 ---
 ?configure ? ? ? ? ? ? ? ?| ?169 
 ++
 ?configure.in ? ? ? ? ? ? | ? ?8 ++
 ?include/sane/config.h.in | ? ?3 +
 ?3 files changed, 180 insertions(+), 0 deletions(-)

 diff --git a/configure b/configure
 index 4c9dfcd..5da8db8 100755
 --- a/configure
 +++ b/configure
 @@ -9508,6 +9508,175 @@ fi



 +if test $ac_cv_func_getaddrinfo != yes \
 + ?|| test $ac_cv_func_getnameinfo != yes; then
 +
 +
 + ?sane_netdb_includes=$ac_includes_default
 + ?#ifdef HAVE_SYS_SOCKET_H
 + ?# include sys/socket.h
 + ?#endif
 + ?#ifdef HAVE_NETDB_H
 + ?# include netdb.h
 + ?#endif
 + ?#ifdef HAVE_WINSOCK2_H
 + ?# include winsock2.h
 + ?#endif
 + ?#ifdef HAVE_WS2TCPIP_H
 + ?# include ws2tcpip.h
 + ?#endif
 +
 + ?ac_cv_func_getaddrinfo=no
 + ?need_winver_xp=no
 +
 + ?{ $as_echo $as_me:${as_lineno-$LINENO}: checking for win32 getaddrinfo 
 5
 +$as_echo_n checking for win32 getaddrinfo...  6; }
 + ?cat confdefs.h - _ACEOF conftest.$ac_ext
 +/* end confdefs.h. ?*/
 +$sane_netdb_includes
 +int
 +main ()
 +{
 +int testme(){ getaddrinfo; }
 + ?;
 + ?return 0;
 +}
 +_ACEOF
 +if ac_fn_c_try_compile $LINENO; then :
 + ?{ $as_echo $as_me:${as_lineno-$LINENO}: result: yes 5
 +$as_echo yes 6; }
 + ? ?ac_cv_func_getaddrinfo=yes
 +else
 + ?{ $as_echo $as_me:${as_lineno-$LINENO}: result: no 5
 +$as_echo no 6; }
 +fi
 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 +
 + ? ?if test $ac_cv_func_getaddrinfo != yes; then
 + ? ?{ $as_echo $as_me:${as_lineno-$LINENO}: checking for win32 getaddrinfo 
 if WINVER is 0x0501 5
 +$as_echo_n checking for win32 getaddrinfo if WINVER is 0x0501...  6; }
 + ? ?cat confdefs.h - _ACEOF conftest.$ac_ext
 +/* end confdefs.h. ?*/
 +#define WINVER 0x0501
 + ? ? ?$sane_netdb_includes
 +int
 +main ()
 +{
 +int testme(){ getaddrinfo; }
 + ?;
 + ?return 0;
 +}
 +_ACEOF
 +if ac_fn_c_try_compile $LINENO; then :
 + ?{ $as_echo $as_me:${as_lineno-$LINENO}: result: yes 5
 +$as_echo yes 6; }
 + ? ? ?ac_cv_func_getaddrinfo=yes
 + ? ? ?need_winver_xp=yes
 +else
 + ?{ $as_echo $as_me:${as_lineno-$LINENO}: result: no 5
 +$as_echo no 6; }
 +fi
 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 + ?fi
 +
 + ?if test $ac_cv_func_getaddrinfo = yes; then
 +
 +$as_echo #define HAVE_GETADDRINFO 1 confdefs.h
 +
 +
 + ? ?if test $need_winver_xp = yes; then
 +
 +$as_echo #define NEED_WINVER_XP 1 confdefs.h
 +
 + ? ?fi
 + ?fi
 +
 + ?unset sane_netdb_includes
 +
 +
 + ?sane_netdb_includes=$ac_includes_default
 + ?#ifdef HAVE_SYS_SOCKET_H
 + ?# include sys/socket.h
 + ?#endif
 + ?#ifdef HAVE_NETDB_H
 + ?# include netdb.h
 + ?#endif
 + ?#ifdef HAVE_WINSOCK2_H
 + ?# include winsock2.h
 + ?#endif
 + ?#ifdef HAVE_WS2TCPIP_H
 + ?# include ws2tcpip.h
 + ?#endif
 +
 + ?ac_cv_func_getnameinfo=no
 + ?need_winver_xp=no
 +
 + ?{ $as_echo $as_me:${as_lineno-$LINENO}: checking for win32 getnameinfo 
 5
 +$as_echo_n checking for win32 getnameinfo...  6; }
 + ?cat confdefs.h - _ACEOF conftest.$ac_ext
 +/* end confdefs.h. ?*/
 +$sane_netdb_includes
 +int
 +main ()
 +{
 +int testme(){ getnameinfo; }
 + ?;
 + ?return 0;
 +}
 +_ACEOF
 +if ac_fn_c_try_compile $LINENO; then :
 + ?{ $as_echo $as_me:${as_lineno-$LINENO}: result: yes 5
 +$as_echo yes 6; }
 + ? ?ac_cv_func_getnameinfo=yes
 +else
 + ?{ $as_echo $as_me:${as_lineno-$LINENO}: result: no 5
 +$as_echo no 6; }
 +fi
 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 +
 + ? ?if test $ac_cv_func_getnameinfo != yes; then
 + ? ?{ $as_echo $as_me:${as_lineno-$LINENO}: checking for win32 getnameinfo 
 if WINVER is 0x0501 5
 +$as_echo_n checking for win32 getnameinfo if WINVER is 0x0501...  6; }
 + ? ?cat confdefs.h - _ACEOF conftest.$ac_ext
 +/* end confdefs.h. ?*/
 +#define WINVER 0x0501
 + ? ? ?$sane_netdb_includes
 +int
 +main ()
 +{
 +int testme(){ getnameinfo; }
 + ?;
 + ?return 0;
 +}
 +_ACEOF
 +if ac_fn_c_try_compile $LINENO; then :
 + ?{ $as_echo $as_me:${as_lineno-$LINENO}: result: yes 5
 +$as_echo 

[sane-devel] [PATCH v2 04/14] bldchn, checking for socklen_t more safe

2012-01-24 Thread Chris Bagwell
On Mon, Jan 23, 2012 at 5:05 PM, Ruediger Meier sweet_f_a at gmx.de wrote:
 From: Ruediger Meier ruediger.meier at ga-group.nl

 Here I just want to fix conflicts for win32 systems. Generally I'd say
 that we should never #define socklen_t int within config.h. But this
 may decide somebody else.

 Note this patch may break the build on systems where socklen_t is
 available now but the right headers are not included yet. For example
 for win32 you need to add
 ?#ifdef HAVE_WS2TCPIP_H
 ?#include ws2tcpip.h
 ?#endif
 wherever socklen_t is used.
 ---
 ?configure ? ?| ? 14 +++---
 ?configure.in | ? 12 ++--
 ?2 files changed, 21 insertions(+), 5 deletions(-)

 diff --git a/configure b/configure
 index 5da8db8..ba1df33 100755
 --- a/configure
 +++ b/configure
 @@ -8257,12 +8257,20 @@ rm -f core conftest.err conftest.$ac_objext 
 conftest.$ac_ext
 ?{ $as_echo $as_me:${as_lineno-$LINENO}: result: $have_long_long 5
 ?$as_echo $have_long_long 6; }

 -{ $as_echo $as_me:${as_lineno-$LINENO}: checking for socklen_t in 
 sys/socket.h 5
 -$as_echo_n checking for socklen_t in sys/socket.h...  6; }
 +{ $as_echo $as_me:${as_lineno-$LINENO}: checking for socklen_t 5
 +$as_echo_n checking for socklen_t...  6; }
 ?cat confdefs.h - _ACEOF conftest.$ac_ext
 ?/* end confdefs.h. ?*/

 -#include sys/socket.h
 +#ifdef HAVE_SYS_SOCKET_H
 +# include sys/socket.h
 +#endif
 +#ifdef HAVE_WINSOCK2_H
 +# include winsock2.h
 +#endif
 +#ifdef HAVE_WS2TCPIP_H
 +# include ws2tcpip.h
 +#endif

 ?int
 ?main ()
 diff --git a/configure.in b/configure.in
 index 060b8b6..b30dd92 100644
 --- a/configure.in
 +++ b/configure.in
 @@ -232,9 +232,17 @@ have_long_long=no
 ?AC_TRY_COMPILE([], [long long x; x = (long long)0;], 
 AC_DEFINE(HAVE_LONG_LONG, 1, [Define if the long long type is available.]) 
 have_long_long=yes)
 ?AC_MSG_RESULT($have_long_long)

 -AC_MSG_CHECKING([for socklen_t in sys/socket.h])
 +AC_MSG_CHECKING([for socklen_t])
 ?AC_TRY_COMPILE([
 -#include sys/socket.h
 +#ifdef HAVE_SYS_SOCKET_H
 +# include sys/socket.h
 +#endif
 +#ifdef HAVE_WINSOCK2_H
 +# include winsock2.h
 +#endif
 +#ifdef HAVE_WS2TCPIP_H
 +# include ws2tcpip.h
 +#endif
 ?],[socklen_t len],AC_MSG_RESULT(yes),
 ?[AC_MSG_RESULT(no); AC_DEFINE(socklen_t,int,
 ?[Define socklen_t as \'int\' if necessary.])])

Since we are changing this, maybe we should change to more proper
AC_CHECK_TYPES as well?  That would require adding an #ifndef
HAVE_SOCKELEN_T towards bottom of acinclude.m4 to match it.

 --
 1.7.6.1


 --
 sane-devel mailing list: sane-devel at lists.alioth.debian.org
 http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
 Unsubscribe: Send mail with subject unsubscribe your_password
 ? ? ? ? ? ? to sane-devel-request at lists.alioth.debian.org



[sane-devel] [PATCH v2 10/14] net, implement O_NONBLOCK stuff for win32

2012-01-24 Thread Chris Bagwell
On Mon, Jan 23, 2012 at 5:05 PM, Ruediger Meier sweet_f_a at gmx.de wrote:
 From: Ruediger Meier ruediger.meier at ga-group.nl

 ---
 ?backend/net.c | ? ?5 +
 ?1 files changed, 5 insertions(+), 0 deletions(-)

 diff --git a/backend/net.c b/backend/net.c
 index 5946a1b..03133d3 100644
 --- a/backend/net.c
 +++ b/backend/net.c
 @@ -2363,7 +2363,12 @@ sane_set_io_mode (SANE_Handle handle, SANE_Bool 
 non_blocking)
 ? ? ? return SANE_STATUS_INVAL;
 ? ? }

 +#if ! defined _WIN32
 ? if (fcntl (s-data, F_SETFL, non_blocking ? O_NONBLOCK : 0)  0)
 +#else
 + ?u_long iMode = non_blocking;
 + ?if (ioctlsocket(s-data, FIONBIO, iMode) != NO_ERROR)
 +#endif

Is this UDP or TCP?  If UDP, can you switch to
sanei_udp_set_nonblock() that I recently added for epson2 network
support?

If TCP, can you add mirror function to sanie_tcp or maybe create a
sanei_net.c for functions common to both UDP and TCP?

Chris

 ? ? {
 ? ? ? DBG (1, sane_set_io_mode: fcntl failed (%s)\n, strerror (errno));
 ? ? ? return SANE_STATUS_IO_ERROR;
 --
 1.7.6.1


 --
 sane-devel mailing list: sane-devel at lists.alioth.debian.org
 http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
 Unsubscribe: Send mail with subject unsubscribe your_password
 ? ? ? ? ? ? to sane-devel-request at lists.alioth.debian.org



[sane-devel] [PATCH v2 12/14] net, call WSAStartup on win32

2012-01-24 Thread Chris Bagwell
On Mon, Jan 23, 2012 at 5:05 PM, Ruediger Meier sweet_f_a at gmx.de wrote:
 From: Ruediger Meier ruediger.meier at ga-group.nl

 We have to do this on win32 before doing winsock2 stuff. It affects the
 whole application so don't know wheather it's right to startup and clean
 it here within the net backend.

Hmm, I wonder if the net.c backend can make more use of functions
defined sanei_tcp.c?  I've added the same logic there to open and
close for use by TCP sockets in epson2 backend.  Maybe the patch with
net_read() and net_write() could make use of something there as well?

Chris

 ---
 ?backend/net.c | ? 15 +++
 ?1 files changed, 15 insertions(+), 0 deletions(-)

 diff --git a/backend/net.c b/backend/net.c
 index 0cd7f51..228bd59 100644
 --- a/backend/net.c
 +++ b/backend/net.c
 @@ -1016,6 +1016,18 @@ sane_init (SANE_Int * version_code, SANE_Auth_Callback 
 authorize)
 ? ? ? DBG (3, sane_init: Client has little endian byte order\n);
 ? ? }

 +#ifdef _WIN32
 + ? ?{
 + ? ? ?/* no much fun on win32 without WSAStartup but is this the right 
 place? */
 + ? ? ?WSADATA data;
 + ? ? ?int wsa_err = WSAStartup( MAKEWORD(2, 2), data) != 0;
 + ? ? ?if ( wsa_err != 0 )
 + ? ? ? {
 + ? ? ? ? DBG (1, sane_init: WSAStartup failed with error %d\n, wsa_err );
 + ? ? ? }
 + ? ?}
 +#endif
 +
 ?#ifndef NET_USES_AF_INDEP
 ? DBG (2, sane_init: determining sane service port\n);
 ? serv = getservbyname (sane-port, tcp);
 @@ -1196,6 +1208,9 @@ sane_exit (void)
 ? ? ? ?}
 ? ? ? free (devlist);
 ? ? }
 +#ifdef _WIN32
 + ?WSACleanup();
 +#endif
 ? DBG (3, sane_exit: finished.\n);
 ?}

 --
 1.7.6.1


 --
 sane-devel mailing list: sane-devel at lists.alioth.debian.org
 http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
 Unsubscribe: Send mail with subject unsubscribe your_password
 ? ? ? ? ? ? to sane-devel-request at lists.alioth.debian.org



[sane-devel] [PATCH v2 01/14] bldchn, provide macro SANE_CHECK_NETDB_FUNC

2012-01-24 Thread Chris Bagwell
On Mon, Jan 23, 2012 at 5:05 PM, Ruediger Meier sweet_f_a at gmx.de wrote:
 From: Ruediger Meier ruediger.meier at ga-group.nl

 We want to use it later to do checks for getaddrinfo and getnameinfo
 more portable.
 ---
 ?acinclude.m4 | ? 57 +
 ?1 files changed, 57 insertions(+), 0 deletions(-)

 diff --git a/acinclude.m4 b/acinclude.m4
 index d91c733..38d1819 100644
 --- a/acinclude.m4
 +++ b/acinclude.m4
 @@ -486,6 +486,63 @@ AC_DEFUN([SANE_CHECK_GPHOTO2],
 ?])

 ?#
 +# Checks for functions which comming usually from netdb.h or ws2tcpip.h (e.g.
 +# getaddrinfo). Header checks have to be done before as well as adding the 
 right

... which usually come from ...

Chris

 +# libs
 +AC_DEFUN([SANE_CHECK_NETDB_FUNC],
 +[
 + ?sane_netdb_includes=$ac_includes_default
 + ?#ifdef HAVE_SYS_SOCKET_H
 + ?# include sys/socket.h
 + ?#endif
 + ?#ifdef HAVE_NETDB_H
 + ?# include netdb.h
 + ?#endif
 + ?#ifdef HAVE_WINSOCK2_H
 + ?# include winsock2.h
 + ?#endif
 + ?#ifdef HAVE_WS2TCPIP_H
 + ?# include ws2tcpip.h
 + ?#endif
 +
 + ?ac_cv_func_$1=no
 + ?need_winver_xp=no
 +
 + ?AC_MSG_CHECKING([for win32 ]$1)
 + ?AC_TRY_COMPILE(
 + ? ?[$sane_netdb_includes],
 + ? ?[int testme(){ ]$1[; }],
 + ? ?[AC_MSG_RESULT(yes)
 + ? ?ac_cv_func_$1=yes],
 + ? ?[AC_MSG_RESULT(no)])
 +
 + ?dnl Under mingw, we may need to set WINVER to 0x0501 to expose the 
 function.
 + ?if test $ac_cv_func_$1 != yes; then
 + ? ?AC_MSG_CHECKING([for win32 ]$1[ if WINVER is 0x0501])
 + ? ?AC_TRY_COMPILE(
 + ? ? ?[#define WINVER 0x0501
 + ? ? ?$sane_netdb_includes],
 + ? ? ?[int testme(){ ]$1[; }],
 + ? ? ?[AC_MSG_RESULT(yes)
 + ? ? ?ac_cv_func_$1=yes
 + ? ? ?need_winver_xp=yes],
 + ? ? ?[AC_MSG_RESULT(no)])
 + ?fi
 +
 + ?if test $ac_cv_func_$1 = yes; then
 + ? ?AC_DEFINE([HAVE_]translit($1, [a-z], [A-Z]), [1],
 + ? ? ?[Define to 1 if you have the `]$1[' function.])
 +
 + ? ?if test $need_winver_xp = yes; then
 + ? ? ?AC_DEFINE([NEED_WINVER_XP], [1],
 + ? ? ? ?[Define to 1 if some win32 functions needs WINVER set.])
 + ? ?fi
 + ?fi
 +
 + ?unset sane_netdb_includes
 +])
 +
 +#
 ?# Check for AF_INET6, determines whether or not to enable IPv6 support
 ?# Check for ss_family member in struct sockaddr_storage
 ?AC_DEFUN([SANE_CHECK_IPV6],
 --
 1.7.6.1


 --
 sane-devel mailing list: sane-devel at lists.alioth.debian.org
 http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
 Unsubscribe: Send mail with subject unsubscribe your_password
 ? ? ? ? ? ? to sane-devel-request at lists.alioth.debian.org



[sane-devel] [PATCH 00/13] win32 portable net backend

2012-01-23 Thread Chris Bagwell
Ruediger, I'm try to find time and comment on this soon.  Should I
comment on github or should you post the patches to the list so I can
reply?  I had at least 3 comments from quick glance.

Also, you might should request write access to git so you can commit
these patches yourself if you think you'll be cleaning up for a while;
although I have no problems doing that on your behalf.

Even if you commit yourself, I think your current process is good
though since your touching framework and other people's backends.  If
its more than a trivial #ifdef HAVE_HEADER_FILE addition, I also post
framwork/other's backend patches to list before committing.

Chris

On Sun, Jan 22, 2012 at 1:35 AM, Ruediger Meier sweet_f_a at gmx.de wrote:
 Hi,

 I've spend some time making the net backend win32 portable. Maybe we
 could build a useful native (non-cygwin) xsane (saned client) on
 Windows now.

 Please pull from my private clone
 git://github.com/rudimeier/sane-backends.git
 branch win32/net

 Hope this doesn't break something.
 If wanted I would post these patches on this list too.


 Ruediger Meier (13):
 ?bldchn, provide macro SANE_CHECK_NETDB_FUNC
 ?bldchn, add checks for netdb.h and ws2tcpip.h
 ?bldchn, use our new macro SANE_CHECK_NETDB_FUNC
 ?bldchn, checking for socklen_t more safe
 ?fix sanei_udp, socklen_t was not defined on win32
 ?bldchn, don't always disable net backend on win32
 ?net, move some includes from net.h to net.c
 ?net, add missing includes for win32
 ?net, re-use sane_set_io_mode
 ?net, implement O_NONBLOCK stuff for win32
 ?net, use recv/send instead of read/write
 ?net, call WSAStartup on win32
 ?bldchn, SANE_CHECK_IPV6 more portable

 ?acinclude.m4 ? ? ? ? ? ? | ? 76 +++---
 ?backend/net.c ? ? ? ? ? ?| ? 54 +++-
 ?backend/net.h ? ? ? ? ? ?| ? ?3 -
 ?configure ? ? ? ? ? ? ? ?| ?201
 ++
 ?configure.in ? ? ? ? ? ? | ? 22 +-
 ?include/sane/config.h.in | ? ?9 ++
 ?sanei/sanei_udp.c ? ? ? ?| ? ?3 +
 ?7 files changed, 329 insertions(+), 39 deletions(-)

 --
 1.7.6.1

 --
 sane-devel mailing list: sane-devel at lists.alioth.debian.org
 http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
 Unsubscribe: Send mail with subject unsubscribe your_password
 ? ? ? ? ? ? to sane-devel-request at lists.alioth.debian.org



[sane-devel] Subject: [PATCH 0/4] fix and cleanup portable PATH_SEP and DIR_PATH defines

2012-01-21 Thread Chris Bagwell
On Tue, Jan 17, 2012 at 6:13 PM, Ruediger Meier sweet_f_a at gmx.de wrote:
 On Wednesday 18 January 2012, Chris Bagwell wrote:
 On Tue, Jan 17, 2012 at 3:01 PM, Ruediger Meier wrote:

  Thx, I just see I've messed up that patch series a little while
  playing around with my MUA. Could you cleanly apply it? If not then
  I would reroll it.

 I haven't tried yet. ?Can you resend directly to me to save time?
 You can send as attachements to me until you get MUA worked out.

 Please pull from my private clone
 git://github.com/rudimeier/sane-backends.git

 branches
 win32/path
 win32/scsi


Thanks.  That was easiest way.

I've just pushed your changes.  I added a change log entry to your
second patch series.

I appreciate the scsi fix.  I was struggle with how to fix that since
it was reported not compiling with mingw64.

Chris



[sane-devel] Subject: [PATCH 0/4] fix and cleanup portable PATH_SEP and DIR_PATH defines

2012-01-17 Thread Chris Bagwell
This patch series makes minor portability fixes to following backends.
 I've not seen any objections from various maintainers... so if I do
not hear back by weekend, I'll commit this patch series.

canon_dr
cardscan
epjitsu
fujitsu
kodak
gt68xx
microtek2
dll

Thanks for this and other windows patches, Ruediger.

Chris

On Sun, Jan 15, 2012 at 8:31 AM, Ruediger Meier sweet_f_a at gmx.de wrote:
 From: Ruediger Meier ruediger.meier at ga-group.nl

 This patch-set is to fix and unify PATH_SEP and DIR_PATH defines in the
 context of seeing them conflicting on cygwin.

 Ruediger Meier (4):
 ?fix, PATH_SEP and DIR_SEP were inconsistently defined on cygwin since
 ? ? ? ?5168206e (also see a28bd843)
 ?cleanup, remove all unused PATH_SEP defines
 ?cleanup, always use the same portable PATH_SEP define (note _WIN32
 ? ? is not defined on cygwin)
 ?update ChangeLog for previous commits

 ?ChangeLog ? ? ? ? ? ?| ? ?6 ++
 ?backend/canon_dr.h ? | ? ?8 
 ?backend/cardscan.h ? | ? ?8 
 ?backend/dll.c ? ? ? ?| ? ?6 +-
 ?backend/epjitsu.h ? ?| ? ?8 
 ?backend/fujitsu.h ? ?| ? ?8 
 ?backend/gt68xx.c ? ? | ? ?2 +-
 ?backend/kodak.h ? ? ?| ? ?8 
 ?backend/microtek2.h ?| ? ?2 +-
 ?sanei/sanei_access.c | ? ?2 +-
 ?sanei/sanei_config.c | ? ?5 +
 ?11 files changed, 11 insertions(+), 52 deletions(-)

 --
 1.7.6.1

 --
 sane-devel mailing list: sane-devel at lists.alioth.debian.org
 http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
 Unsubscribe: Send mail with subject unsubscribe your_password
 ? ? ? ? ? ? to sane-devel-request at lists.alioth.debian.org



[sane-devel] Subject: [PATCH 0/4] fix and cleanup portable PATH_SEP and DIR_PATH defines

2012-01-17 Thread Chris Bagwell
On Tue, Jan 17, 2012 at 3:01 PM, Ruediger Meier sweet_f_a at gmx.de wrote:
 On Tuesday 17 January 2012, Chris Bagwell wrote:
 This patch series makes minor portability fixes to following
 backends. I've not seen any objections from various maintainers... so
 if I do not hear back by weekend, I'll commit this patch series.

 Thx, I just see I've messed up that patch series a little while playing
 around with my MUA. Could you cleanly apply it? If not then I would
 reroll it.


I haven't tried yet.  Can you resend directly to me to save time?  You
can send as attachements to me until you get MUA worked out.

 BTW is this list the right one to send patches at all?

Yes.  Although most active developers have write access and commit
themselves.  So you don't always see a lot of patches to this list.

Chris



[sane-devel] MinGW w64 build results

2011-12-27 Thread Chris Bagwell
On Tue, Dec 20, 2011 at 1:53 PM, Michael Cronenworth mike at cchtml.com wrote:
 Chris Bagwell on 12/18/2011 09:56 PM wrote:

 Not really. ?I'm sure upstream libusb is the best place to discuss.

 As long as libusb project has a suggested work around/file location
 for dealing with w64, we can accommodate it as well as standard usb.h
 easy enough.


 After thinking about it, I'm not sure libusb is interested in Windows.

 libusb-win32[1] though, is, and it is the project I use for libusb support.
 They renamed their include file usb.h to lusb0_usb.h in their latest
 release. Unfortunately they are not using MinGW (and state they have no
 plans for it) to build from source.

 Since the original libusb project will never compile/run on Windows I think
 a define should be added to use the libusb-win32 include file name. Even if
 you can't compile everything using MinGW.

 [1] https://sourceforge.net/projects/libusb-win32/

I had some time to come up to speed with this and added support for
libusb-win32 to sane-backends.  I was able to compile and link the
epson2 backend under mingw32 and using the libusb.a and lusb0_usb.h
that libusb-win32 distributes.

Chris



[sane-devel] [iscan] New release available

2011-12-18 Thread Chris Bagwell
Pushed your patch.

Chris

On Thu, Dec 8, 2011 at 5:58 PM, Olaf Meeuwissen
olaf.meeuwissen at avasys.jp wrote:
 Dear all,

 A new release of Image Scan! for Linux has been made available at our
 website[1]. ?This release updates both the core and data packages. ?For
 information on which versions of what packages you need, please see the
 FAQ[2] on that topic.

 ?[1] http://avasys.jp/eng/linux_driver/
 ?[2] http://avasys.jp/eng/linux_driver/faq/id000651.php

 Changes to the epkowa.desc file against the latest version in the git
 repository have been attached. ?If someone could yet again commit these
 to sane-backends that would be appreciated.

 Below is a summary of the changes since the last announcement on this
 mailing list.

 ?--
 ?iscan-2.28.1 ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?(2011-11-18)
 ?--
 ?* the quick-format option has been deprecated and will be removed in
 ? ?a future release. ?Use the scan-area option instead.
 ?* fixes hangs when scanning from the GIMP
 ?* fixes shifting of the selected scan area when scanning with the ADF
 ? ?unit on some models
 ?* fixes handling of some predefined scan area sizes
 ?* fixes an issue when used in combination with saned

 Noteworthy changes to the data package:

 ?--
 ?iscan-data-1.13.0 ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? (2011-11-15)
 ?--
 ?* adds support for the following devices:
 ? ?- Epson ME OFFICE 535
 ? ?- Epson ME OFFICE 940FW Series
 ? ?- Epson Stylus NX635
 ? ?- Epson Stylus Office BX535WD
 ? ?- Epson Stylus Office BX630FW Series
 ? ?- Epson Stylus Office BX935FWD
 ? ?- Epson Stylus SX535WD
 ? ?- K300 Series
 ? ?- PX-1700F
 ? ?- WP-4511
 ? ?- WP-4521
 ? ?- WorkForce 645
 ? ?- WorkForce 845
 ? ?- WorkForce K301

 Hope this helps,
 --
 Olaf Meeuwissen, LPIC-2 ? ? ? ? ? FLOSS Engineer -- AVASYS CORPORATION
 FSF Associate Member #1962 ? ? ? ? ? ? ? Help support software freedom
 ? ? ? ? ? ? ? ? http://www.fsf.org/jf?referrer=1962

 --
 sane-devel mailing list: sane-devel at lists.alioth.debian.org
 http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
 Unsubscribe: Send mail with subject unsubscribe your_password
 ? ? ? ? ? ? to sane-devel-request at lists.alioth.debian.org



[sane-devel] MinGW w64 build results

2011-12-18 Thread Chris Bagwell
On Fri, Dec 16, 2011 at 2:22 PM, Michael Cronenworth mike at cchtml.com wrote:
 MinGW thread time again.

 The MinGW world has been split into two trees. The original mingw.org tree
 and the new w64 tree. Fedora, and other distros, are migrating from
 mingw.org to w64. Sane-backends will compile and run under the w64
 environment with a few caveats.

 1. The DDK includes are not supposed to be directly used.
 ? sanei/sanei_scsi.c and tools/sane-find-scanner.c needed the attached
 patches.

I looked at this change but as it is, it breaks compiles on Fedora 16.
 It looks like including the DDK files is the only option there.  Is
there a standard way to check when your on a w64 platform?  I guess we
could move some header file checks to configure to detect were to get
SCSI symbols.

 2. w64 includes additional Windows API headers, which now include usb.h
 and this conflicts with the libusb header of the same name. This prevents
 sane from including USB support as sane looks for libusb and not the Windows
 API. For now I renamed the w64 header and used the libusb header and the
 resulting libsane.dll works with my USB scanner in Windows. I have not
 contacted libusb yet, but I feel they need to move their header into a
 libusb/ sub-dir, but this will of course break lots of apps. Any
 suggestions?

Not really.  I'm sure upstream libusb is the best place to discuss.

As long as libusb project has a suggested work around/file location
for dealing with w64, we can accommodate it as well as standard usb.h
easy enough.

Chris


 Thanks,
 Michael

 --
 sane-devel mailing list: sane-devel at lists.alioth.debian.org
 http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
 Unsubscribe: Send mail with subject unsubscribe your_password
 ? ? ? ? ? ? to sane-devel-request at lists.alioth.debian.org



[sane-devel] TPU functionality in epson2-backend.

2011-12-01 Thread Chris Bagwell
I just saw this commit so looks like its in now.

The following commit has been merged in the master branch:
commit 56cac490f968008084cb88604ec633659bd36dae
Author: Alessandro Zummo a.zummo at towertech.it
Date:   Fri Dec 2 00:27:28 2011 +0100

   epson2: support TPU2 on GT-X800/V700

On Thu, Dec 1, 2011 at 5:41 AM, Martin Zackrisson
martin.zackrisson at cmb.gu.se wrote:


 Just for reference, I now have the programming guide for the scanner and
 it seems that the capability that I'm looking to implement in fact is
 structured as a second TPU-mode and not a setting in the current TPU mode.
 So I'll get back to scratch and see if I can push it into TPU 2 instead.

 Solved!

 The following changes is ALL that is required for the V700 (or GT-X900 as it
 also is called) to implement the full TPU area.
 Is there a possibility of getting that into the official epson2 backend?

 epson2-ops.c:
 673c673
  ? ? ? ? if (e2_model(s, GT-X800) || e2_model(s, GT-X900)) {
 ---
 ? ? ? ? if (e2_model(s, GT-X800)) {
 1223c1223
  ? ? if (s-lcount  3  (e2_model(s, GT-X800) || e2_model(s,
 GT-X900))) {
 ---
 ? ? if (s-lcount  3  e2_model(s, GT-X800)) {

 /Martin

 --
 Martin Zackrisson
 G?teborgs Universitet / Cell ?Molekyl?rbiologi
 Medecinaregatan 9e
 SE-413 90 G?teborg
 Sweden

 Phone +46 (0)31 786 3753


 --
 sane-devel mailing list: sane-devel at lists.alioth.debian.org
 http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
 Unsubscribe: Send mail with subject unsubscribe your_password
 ? ? ? ? ? ?to sane-devel-request at lists.alioth.debian.org




[sane-devel] [iscan] New release available

2011-11-14 Thread Chris Bagwell
On Thu, Nov 10, 2011 at 10:02 PM, Olaf Meeuwissen
olaf.meeuwissen at avasys.jp wrote:
 Olaf Meeuwissen olaf.meeuwissen at avasys.jp writes:

 Dear all,

 A new release of Image Scan! for Linux has been made available at our
 website[1]. ?This release updates both the core and data packages. ?For
 information on which versions of what packages you need, please see the
 FAQ[2] on that topic.

 ?[1] http://avasys.jp/eng/linux_driver/
 ?[2] http://avasys.jp/eng/linux_driver/faq/id000651.php

 Changes to the epkowa.desc file against the latest version in the git
 repository have been attached. ?If someone could yet again commit these
 to sane-backends that would be appreciated.


OK.  Finally had a minute to upload this.

Chris



[sane-devel] Fwd: [sane-commit] [SCM] SANE backends - scanner drivers branch, master, updated. RELEASE_1_0_22-179-g1e4595c

2011-11-10 Thread Chris Bagwell
Yiks.  How did I get a u as only a 1000 in my head.  The test scans
worked so maybe the original values were a little high.

Anyways, this means I also messed up a patch for umax-pp.

I'll go the opposite direction since it proved to be confusing at
least once to me.  I'll create a posix compatible sleep() using usleep
for platforms that do not have it and then people can more comfortably
think in seconds when needed.

Then I'll revert all my sleep-usleep changes.

Thanks much!

Chris


On Wed, Nov 9, 2011 at 10:47 PM, Stef stef.dev at free.fr wrote:
 ? ? ? ?Hello,

 ? ? ? ?since usleep() time value is expressed in microseconds, I think
 ? ? ? ?sleep(5) should be replaced by usleep(500UL). usleep(5000) is too
 short.

 Regards,
 ? ? ? ?Stef

 -- Forwarded message --
 From:?Chris Bagwell chris at cnpbagwell.com
 To:?sane-commit at lists.alioth.debian.org
 Date:?Thu, 10 Nov 2011 04:00:08 +
 Subject:?[sane-commit] [SCM] SANE backends - scanner drivers branch, master, 
 updated. RELEASE_1_0_22-179-g1e4595c
 The following commit has been merged in the master branch:
 commit 50475719ef40038b4c73e13dc164d72b9995527e
 Author: Chris Bagwell chris at cnpbagwell.com
 Date: ? Wed Nov 9 21:50:18 2011 -0600

 ? ?portabilty mods to epson2 backend

 ? ?No behavior changes. ?Wrap some optional headers with #ifdef's and
 ? ?use usleep() instead of sleep() since it exist everywhere.

 diff --git a/backend/epson2-ops.c b/backend/epson2-ops.c
 index 575340c..e53f33c 100644
 --- a/backend/epson2-ops.c
 +++ b/backend/epson2-ops.c
 @@ -20,9 +20,9 @@
 ?#include sane/config.h

 ?#include unistd.h ? ? ? ? ? ?/* sleep */
 -
 +#ifdef HAVE_SYS_SELECT_H
 ?#include sys/select.h
 -
 +#endif

 ?#include byteorder.h

 @@ -1439,7 +1439,7 @@ e2_wait_button(Epson_Scanner * s)
 ? ? ? ? ? ? ? ? ? ? ? ?if (button_status)
 ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?s-hw-wait_for_button = SANE_FALSE;
 ? ? ? ? ? ? ? ? ? ? ? ?else
 - ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? sleep(1);
 + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? usleep(1000);
 ? ? ? ? ? ? ? ?} else {
 ? ? ? ? ? ? ? ? ? ? ? ?/* we run into an error condition, just continue */
 ? ? ? ? ? ? ? ? ? ? ? ?s-hw-wait_for_button = SANE_FALSE;
 @@ -1533,7 +1533,7 @@ e2_wait_warm_up(Epson_Scanner * s)
 ? ? ? ? ? ? ? ? ? ? ? ? ? ?s-retry_count);
 ? ? ? ? ? ? ? ? ? ? ? ?return SANE_STATUS_DEVICE_BUSY;
 ? ? ? ? ? ? ? ?}
 - ? ? ? ? ? ? ? sleep(5);
 + ? ? ? ? ? ? ? usleep(5000);
 ? ? ? ?}

 ? ? ? ?return SANE_STATUS_GOOD;
 @@ -1816,7 +1816,7 @@ read_info_block(Epson_Scanner * s, EpsonDataRec * 
 result)
 ? ? ? ? ? ? ? ?if (ext_status[0]  EXT_STATUS_WU) {
 ? ? ? ? ? ? ? ? ? ? ? ?free(ext_status);

 - ? ? ? ? ? ? ? ? ? ? ? sleep(5); ? ? ? /* for the next attempt */
 + ? ? ? ? ? ? ? ? ? ? ? usleep(5000); ? /* for the next attempt */

 ? ? ? ? ? ? ? ? ? ? ? ?DBG(1, retrying ESC G - %d\n, ++(s-retry_count));

 diff --git a/backend/epson2.c b/backend/epson2.c
 index bdd9c27..a07510f 100644
 --- a/backend/epson2.c
 +++ b/backend/epson2.c
 @@ -389,8 +389,6 @@ e2_network_discovery(void)

 ? ? ? ?struct timeval to;

 - ? ? ? long save_flags, flags;
 -
 ? ? ? ?status = sanei_udp_open_broadcast(fd);
 ? ? ? ?if (status != SANE_STATUS_GOOD)
 ? ? ? ? ? ? ? ?return;
 @@ -405,9 +403,7 @@ e2_network_discovery(void)
 ? ? ? ?FD_ZERO(rfds);
 ? ? ? ?FD_SET(fd, rfds);

 - ? ? ? save_flags = flags = fcntl(fd, F_GETFL, 0L);
 - ? ? ? flags |= O_NONBLOCK;
 - ? ? ? fcntl(fd, F_SETFL, flags);
 + ? ? ? sanei_udp_set_nonblock(fd, SANE_TRUE);
 ? ? ? ?if (select(fd + 1, rfds, NULL, NULL, to)  0) {
 ? ? ? ? ? ? ? ?while ((len = sanei_udp_recvfrom(fd, buf, 76, ip)) == 76) {
 ? ? ? ? ? ? ? ? ? ? ? ?DBG(5,  response from %s\n, ip);
 @@ -417,7 +413,6 @@ e2_network_discovery(void)
 ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?attach_one_net(ip);
 ? ? ? ? ? ? ? ?}
 ? ? ? ?}
 - ? ? ? fcntl(fd, F_SETFL, save_flags);

 ? ? ? ?DBG(5, %s, end\n, __func__);

 @@ -650,7 +645,7 @@ device_detect(const char *name, int type, SANE_Status 
 *status)
 ? ? ? ? ? ? ? ? ? ? ? ? * sleep a bit.
 ? ? ? ? ? ? ? ? ? ? ? ? */
 ? ? ? ? ? ? ? ? ? ? ? ?if (dev-connection == SANE_EPSON_NET)
 - ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? sleep(1);
 + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? usleep(1000);

 ? ? ? ? ? ? ? ? ? ? ? ?return scanner_create(dev, status);
 ? ? ? ? ? ? ? ?}
 diff --git a/backend/epson2.h b/backend/epson2.h
 index b448784..807251a 100644
 --- a/backend/epson2.h
 +++ b/backend/epson2.h
 @@ -22,7 +22,9 @@
 ?#define BACKEND_NAME epson2
 ?#define DEBUG_NOT_STATIC

 +#ifdef HAVE_SYS_IOCTL_H
 ?#include sys/ioctl.h
 +#endif

 ?#ifdef HAVE_STDDEF_H
 ?#include stddef.h

 --
 SANE backends - scanner drivers

 ___
 sane-commit mailing list
 sane-commit at lists.alioth.debian.org
 http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-commit

 --
 sane-devel mailing list: sane-devel at lists.alioth.debian.org
 http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
 Unsubscribe: Send mail with subject unsubscribe your_password

[sane-devel] MinGW status

2011-11-10 Thread Chris Bagwell
Hi all,

I have 1 last patch to submit (the pthreads I posted to list) and all
of Sane's framework will compile under MinGW.  At least USB and
Network parts of framework have been verified to work.

I know that the Epson2 and Fujitsu backends compile and work under
windows with resulting executable.  Most other backends will not
compile and must be disabled using configure BACKENDS=epson2
fujitsu.  The compile failures mostly look like minor issues to fix
but I'll leave that for another time.

I don't want to chance the epson2 usleep type issue again on
backends I can't test.

I will fix a specific backend on request (just send me an email).  I
can either submit the fix or send you the diff for you to review and
submit.

Chris



[sane-devel] Fwd: [sane-commit] [SCM] SANE backends - scanner drivers branch, master, updated. RELEASE_1_0_22-173-gc64249f

2011-11-09 Thread Chris Bagwell
Your right. I'll fix it.

When I noticed I had killed Linux compiles in git, I rushed to fast to
get the fix in and restored to much logic from the original code it
was based on in espon2.c backend.

Thank you much for reviewing the diff!

Chris

On Wed, Nov 9, 2011 at 8:31 AM, Stef stef.dev at free.fr wrote:
 ? ? ? ?Hello,

 ? ? ? ?I don't get what save_flags var is for:

 ? ? ? ?save_flags = flags = fcntl(fd, F_GETFL, 0L);

 ? ? ? ?it is not used anywhere in sanei_udp_set_nonblock().

 Regards,
 ? ? ? ?Stef

 -- Forwarded message --
 From:?Chris Bagwell chris at cnpbagwell.com
 To:?sane-commit at lists.alioth.debian.org
 Date:?Wed, 09 Nov 2011 03:23:34 +
 Subject:?[sane-commit] [SCM] SANE backends - scanner drivers branch, master, 
 updated. RELEASE_1_0_22-173-gc64249f
 The following commit has been merged in the master branch:
 commit c64249fc318aaef44f8be89f3f4480553904c7eb
 Author: Chris Bagwell chris at cnpbagwell.com
 Date: ? Tue Nov 8 21:22:42 2011 -0600

 ? ?fix compile failure on non-windows platform.

 diff --git a/sanei/sanei_udp.c b/sanei/sanei_udp.c
 index 3e84761..795b2de 100644
 --- a/sanei/sanei_udp.c
 +++ b/sanei/sanei_udp.c
 @@ -45,6 +45,7 @@
 ?#include unistd.h
 ?#include stdlib.h
 ?#include string.h
 +#include fcntl.h

 ?#ifdef HAVE_WINSOCK2_H
 ?#include winsock2.h
 @@ -194,7 +195,7 @@ sanei_udp_set_nonblock(int fd, SANE_Bool nonblock)

 ? ? ? ?ioctlsocket(fd, FIONBIO, mode);
 ?#else
 - ? ? ? long flags;
 + ? ? ? long save_flags, flags;

 ? ? ? ?save_flags = flags = fcntl(fd, F_GETFL, 0L);
 ? ? ? ?if (nonblock)

 --
 SANE backends - scanner drivers

 ___
 sane-commit mailing list
 sane-commit at lists.alioth.debian.org
 http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-commit

 --
 sane-devel mailing list: sane-devel at lists.alioth.debian.org
 http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
 Unsubscribe: Send mail with subject unsubscribe your_password
 ? ? ? ? ? ? to sane-devel-request at lists.alioth.debian.org




[sane-devel] 64-bit compile (was:Thread code review and testers)

2011-11-07 Thread Chris Bagwell
On Mon, Nov 7, 2011 at 11:27 AM, Michael Cronenworth mike at cchtml.com wrote:
 Michael Cronenworth wrote:
 The 64-bit compile against the latest git code doesn't complete. The backend
 make doesn't include sanei_magic.lo so the fujitsu object has some
 undefined function calls. It seems this is a byproduct of using
 PRELOADABLE_BACKENDS. I've attached a patch for it.


Thanks for patch.  I'll commit it soon.



[sane-devel] Thread code review and testers

2011-11-07 Thread Chris Bagwell
On Mon, Nov 7, 2011 at 10:55 AM, Michael Cronenworth mike at cchtml.com wrote:
 Michael Cronenworth wrote:

 I'll try the latest git checkout plus this patch and see if it works any
 better for me.

 The latest git + only your patch now compiles on the first try. However, the
 resulting DLL doesn't find the scanner. sane-find-scanner.exe finds the USB
 device, but scanimage.exe and my program that uses libsane.dll do not find
 the scanner.

 I had a feeling it is looking for the config file to reference the USB
 vendor ID and product ID, but it cannot find it. I moved the *.conf files
 into the same directory as the runtime DLL and EXE files and now the scanner
 is found. Scanning works, too.

Glad to hear its working!  Your doing better then me so far... but I'm
almost there.

So far, I can't get the preloaded backends to kick in from
libsane-1.dll.  Did you do anything special to get it working?

I just committed a fix to libtool that lets us now correctly build
each individual backend as its own DLL.  I'm not sure I'll get the
urge to fix this soon but it wouldn't be hard to get the dll backend
to load these DLL's now that we are correctly building them.

After that DLL build fix, I can copy libsane-epson2-1.dll to same
directory as scanimage.exe but name it libsane-1.dll and now the
epson2 backend is working with scanimage.exe.

It correctly detects my network epson scanner but then fails to open
the socket correctly.  Hopefully, it will be a simple fix.


 I would guess that between .21 and .22 that the config file handling
 changed? It would be nice to have the Windows binaries look for the config
 files in a few sub-directories besides the current directory. (./etc, ../etc
 ./)

The logic was modified but don't see exactly any difference in
behaviour.  The best solution right now is to set SANE_CONFIG_DIR to
where ever you store them.  Maybe in future we can modify to use
standard Windows DLL search logic and look inside same directory as
.exe.  I've never done that before but I guess it wouldn't be hard.


 Unfortunately this trick doesn't make the 64-bit DLL work. Something else is
 wrong.

I'm glad to hear in your other post that 64-bit is now working for you as well!

I'm sure there are tons of people that would like to run a native
Windows executable (non-cygwin) from command line/background task to
do some scanning.

Chris



[sane-devel] Thread code review and testers

2011-11-07 Thread Chris Bagwell
On Mon, Nov 7, 2011 at 7:44 PM, Chris Bagwell chris at cnpbagwell.com wrote:
 After that DLL build fix, I can copy libsane-epson2-1.dll to same
 directory as scanimage.exe but name it libsane-1.dll and now the
 epson2 backend is working with scanimage.exe.

 It correctly detects my network epson scanner but then fails to open
 the socket correctly. ?Hopefully, it will be a simple fix.

I got it working.  It was minor changes to enable winsock2 correctly
and how to set up non-blocking.

Now I can do network scans from my epson scanner using the epson2
backend.  On top of that, I'm able to compile the scanimage.exe from
my Fedora box and I'm running the scanimage.exe using wine from same
box.  Now thats the way to develop windows applications. :-)

Chris



[sane-devel] Thread code review and testers

2011-11-06 Thread Chris Bagwell
Hi all,

I'm looking for a reviewer of attached patch and I'm also hoping
someone has a scanner who's driver uses threads can test this patch to
verify no regressions occurred (be sure and use --enable-pthread on
configure).

Current code assumes/requires that SANE_Pid is represented as an
integer on all platforms because we do pid == -1 checks everywhere.

Pthreads says that it can not be assumed pthread_t is an integer and
on windows platform it in fact is not an integer.  Attached is my
solution to abstract out checks for valid PID's so that it will work
with windows and any other pthread implementation that is similar.

For each backend that gets ported to mingw and uses threads, it will
need to switch to use sanei_thread_is_invalid(pid) instead of (pid ==
-1).  That was not done as a part of this test patch.

Chris
-- next part --
A non-text attachment was scrubbed...
Name: pthread.diff
Type: text/x-patch
Size: 4374 bytes
Desc: not available
URL: 
http://lists.alioth.debian.org/pipermail/sane-devel/attachments/2006/e7b07e80/attachment.bin


[sane-devel] Windows scanner issue

2011-11-04 Thread Chris Bagwell
On Fri, Nov 4, 2011 at 12:38 PM, Michael Cronenworth mike at cchtml.com wrote:
 Hello,

 In the past I posted about building for Windows. I had SANE 1.0.21 working
 fine. Today I have tried to build 1.0.22 and test it. The build works fine,
 but when I use the resulting DLL the scanner cannot be seen. Switching back
 to the 1.0.21 DLL makes the scanner visible again.

 Is there anything that changed between 21 and 22 that could affect this?

I can't comment much on this part. Lots of changes occurred.


 Thanks,
 Michael

 P.S. It seems my Win32 patches have collected dust and are still not in
 SANE. Would anyone be willing to work with me to have them added?


I've had your patches sitting in my inbox since 2009.  Never got
around to it.  Sorry.

Since that time, I finally installed the mingw32 cross compiler that
Fedora has so now its easier for me to do this type stuff.

I'll start peeling off some of the fixes and submit them.  The main
thing preventing me from doing it earlier is about 1/2 are generic
issues to be solved and so I'm working on ways not to use the #ifdef
WIN32 check.

Lets hope I don't get distracted again. :-)

Chris



[sane-devel] How to change the Makefile.in and Makefile.am

2011-09-15 Thread Chris Bagwell
I'll also add you should be sure and look at doc/backend-writing.txt
for tips on what to add to Makefile.am.

If there is info that would have helped you further, patches to that
file would be ideal to submit for the next developers benefit.  For
example, the tip about only needing to sending patches for Makefile.am
and configure.in might be good to add.

Chris

On Thu, Sep 15, 2011 at 7:44 AM, m. allan noah kitno455 at gmail.com wrote:
 You must add the backend name to configure.in, and various backend
 file names in several places in backend/Makefile.am. Look for an
 existing backend name to see all the places. Do the same for your
 manpages and description files in doc/. Then run automake (rebuilds
 all the Makefile.in files) and then run autoconf to rebuild configure.

 There are probably other steps I forgot ;)

 If you send a patch to the list, only send the configure.in and
 Makefile.am changes, I'll re-run automake and autoconf here.

 allan

 On Thu, Sep 15, 2011 at 2:20 AM, ?kingjian_tao at avision.com.cn wrote:
 Dear,

 ? ?I write a new backend,I success add it to sane-backends-1.0.18,But ?now
 I want to add this backend to sane-backends-1.0.22.
 Could you tell me which change should I do.and How to change the
 Makefile.in and Makefile.am,Thanks.


 Best Regards





 --
 sane-devel mailing list: sane-devel at lists.alioth.debian.org
 http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
 Unsubscribe: Send mail with subject unsubscribe your_password
 ? ? ? ? ? ? to sane-devel-request at lists.alioth.debian.org




 --
 The truth is an offense, but not a sin

 --
 sane-devel mailing list: sane-devel at lists.alioth.debian.org
 http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
 Unsubscribe: Send mail with subject unsubscribe your_password
 ? ? ? ? ? ? to sane-devel-request at lists.alioth.debian.org




[sane-devel] autoconf/configure and debug

2011-06-14 Thread Chris Bagwell
On Tue, Jun 14, 2011 at 2:49 PM, stef stef.dev at free.fr wrote:
 ? ? ? ?Hello,

 ? ? ? ?in order to debug more efficiently, I have to re-edit Makefiles to 
 remove
 the two -O2 options in CFLAGS and change the -g to the -ggdb option. Is there
 an easy way to get CFLAGS=-ggdb  when configuring SANE ?


I've not tried this with sane-backends but its supposed to be as simple as:

./configure CFLAGS=-ggdb

configure will not default to CFLAGS=-g -O2 if you specify your own
value.  But if your getting two -O2 then something else may be adding
it as well.

Chris



[sane-devel] sane backend build system - help

2011-04-25 Thread Chris Bagwell
Have you looked at doc/backend-writing.txt?

I suggest taking notes as you work threw this process and provide
patches to that file to improve it for next author.

On Mon, Apr 25, 2011 at 9:05 AM, Paul Newall p.newalls at ntlworld.com wrote:
 Progress:
 I managed to copy an existing backend, and add it to the build system. So
 now I can start the actual backend writing process.
 That was quite hard work. I'm not sure if that was just me, or whether it
 might encourage other people to have a go at writing a backend if there was
 an easier way to get started.

 Maybe some experienced backend writer could provide one of the following?

 A build and install system for a single backend. I think that would be the
 easiest to understand. And the install process would be faster during
 developement if you were only installing one backend. It would need to be
 easy to change the backend name, perhaps by changing one variable with the
 name in?

 Or, provide one empty backend as part of the sane-backends, that you can
 experiment with without having to copy and rename an existing backend.

 Also it would be nice to have empty backend files: emptybackend.c
 emptybackend.h emptybackend.conf
 with lots of comments in about what you should add in various places.


 - Original Message - From: Paul Newall p.newalls at ntlworld.com
 To: sane-devel at lists.alioth.debian.org
 Sent: Sunday, April 24, 2011 8:26 PM
 Subject: Re: [sane-devel] sane backend build system - help


 autoreconf -i -f
 seems to have enabled me to make the backends.
 So now I am trying the approach of adding a new backend (copy of an
 existing one) to the backends to see if I can install that.

 Paul

 - Original Message - From: Chris Bagwell chris at cnpbagwell.com
 To: Paul Newall p.newalls at ntlworld.com
 Cc: sane-devel at lists.alioth.debian.org
 Sent: Sunday, April 24, 2011 7:15 PM
 Subject: Re: [sane-devel] sane backend build system - help


 Its common to have a newer version of autofoo tools on your system and
 you'll need to update the pre-existing files committed in git.

 Try running with install option to get newer versions of files: autoreconf
 -i

 If that doesn't work then use the force option: ?autoreconf -i -f

 Chris

 On Sun, Apr 24, 2011 at 10:17 AM, Paul Newall p.newalls at ntlworld.com
 wrote:

 I want to write a new backend.
 Currently the main obstacle is that I find the backend build system very
 intimidating.
 I have no experience of autoconf, automake, or libtool.
 On my system (ubuntu 10.10) I can run autoreconf and ./configure
 apparently
 OK, but when I run make I get these errors:

 libtool: Version mismatch error. This is libtool 2.2.10, but the
 libtool: definition of this LT_INIT comes from libtool 2.2.6b.
 libtool: You should recreate aclocal.m4 with macros from libtool 2.2.10
 libtool: and run autoconf again.
 make[2]: *** [libsane_la-dll-s.lo] Error 63

 How would I recreate aclocal.m4 with macros from libtool 2.2.10 ? I don't
 have much idea what that means.

 Is it best to start by adding an empty new backend to the build system?
 (in
 which case I will need to get the build system to work first)
 Or would it be better to make and install the new backend independently
 during development? (this might be easier? and it might give me a faster
 modify, build, test cycle during development? But are there difficulties
 that I have not discovered yet?)


 --
 sane-devel mailing list: sane-devel at lists.alioth.debian.org
 http://lists.alioth.debian.org/mailman/listinfo/sane-devel
 Unsubscribe: Send mail with subject unsubscribe your_password
 to sane-devel-request at lists.alioth.debian.org



 --
 sane-devel mailing list: sane-devel at lists.alioth.debian.org
 http://lists.alioth.debian.org/mailman/listinfo/sane-devel
 Unsubscribe: Send mail with subject unsubscribe your_password
 ? ? ? ? ? ?to sane-devel-request at lists.alioth.debian.org


 --
 sane-devel mailing list: sane-devel at lists.alioth.debian.org
 http://lists.alioth.debian.org/mailman/listinfo/sane-devel
 Unsubscribe: Send mail with subject unsubscribe your_password
 ? ? ? ? ? ?to sane-devel-request at lists.alioth.debian.org




[sane-devel] sane backend build system - help

2011-04-24 Thread Chris Bagwell
Its common to have a newer version of autofoo tools on your system and
you'll need to update the pre-existing files committed in git.

Try running with install option to get newer versions of files: autoreconf -i

If that doesn't work then use the force option:  autoreconf -i -f

Chris

On Sun, Apr 24, 2011 at 10:17 AM, Paul Newall p.newalls at ntlworld.com wrote:
 I want to write a new backend.
 Currently the main obstacle is that I find the backend build system very
 intimidating.
 I have no experience of autoconf, automake, or libtool.
 On my system (ubuntu 10.10) I can run autoreconf and ./configure apparently
 OK, but when I run make I get these errors:

 libtool: Version mismatch error.? This is libtool 2.2.10, but the
 libtool: definition of this LT_INIT comes from libtool 2.2.6b.
 libtool: You should recreate aclocal.m4 with macros from libtool 2.2.10
 libtool: and run autoconf again.
 make[2]: *** [libsane_la-dll-s.lo] Error 63

 How would I recreate aclocal.m4 with macros from libtool 2.2.10 ? I don't
 have much idea what that means.

 Is it best to start by adding an empty new backend to the build system? (in
 which case I will need to get the build system to work first)
 Or would it be better to?make and install ?the new backend independently
 during development? (this might be easier? and it might give me a faster
 modify, build, test cycle during development? But are there difficulties
 that I have not discovered yet?)


 --
 sane-devel mailing list: sane-devel at lists.alioth.debian.org
 http://lists.alioth.debian.org/mailman/listinfo/sane-devel
 Unsubscribe: Send mail with subject unsubscribe your_password
 ? ? ? ? ? ? to sane-devel-request at lists.alioth.debian.org




[sane-devel] message in ./configure chatter

2011-03-20 Thread Chris Bagwell
Thanks for taking time to report.  This warning message can be ignored
in this case.  At least its not the source of issue your seeing.

Chris

On Sat, Mar 19, 2011 at 11:44 PM, Edward Hartouni
ed_hartouni at comcast.net wrote:
 on my iMac running OSX 10.5.8 with the sane-backends-1.0.22 ./configure
 script found the message below.
 the binaries are not working for my Nikon Coolscan 4000 backend coolscan3
 (no scan takes place, though it is possible to control some of the functions
 on the scanner)...

 checking IOKit/scsi/SCSITaskLib.h usability... no
 checking IOKit/scsi/SCSITaskLib.h presence... yes
 configure: WARNING: IOKit/scsi/SCSITaskLib.h: present but cannot be compiled
 configure: WARNING: IOKit/scsi/SCSITaskLib.h: ? ? check for missing
 prerequisite headers?
 configure: WARNING: IOKit/scsi/SCSITaskLib.h: see the Autoconf documentation
 configure: WARNING: IOKit/scsi/SCSITaskLib.h: ? ? section Present But
 Cannot Be Compiled
 configure: WARNING: IOKit/scsi/SCSITaskLib.h: proceeding with the compiler's
 result
 configure: WARNING: ? ? ## -
 ##
 configure: WARNING: ? ? ## Report this
 to?sane-devel at lists.alioth.debian.org?##
 configure: WARNING: ? ? ## -
 ##
 checking for IOKit/scsi/SCSITaskLib.h... no
 checking IOKit/cdb/IOSCSILib.h usability... no
 checking IOKit/cdb/IOSCSILib.h presence... no
 checking for IOKit/cdb/IOSCSILib.h... no
 checking IOKit/scsi/SCSICommandOperationCodes.h usability... yes
 checking IOKit/scsi/SCSICommandOperationCodes.h presence... yes
 checking for IOKit/scsi/SCSICommandOperationCodes.h... yes
 checking IOKit/scsi-commands/SCSICommandOperationCodes.h usability... yes
 checking IOKit/scsi-commands/SCSICommandOperationCodes.h presence... yes
 checking for IOKit/scsi-commands/SCSICommandOperationCodes.h... yes
 checking scsi.h usability... no
 checking scsi.h presence... no
 checking for scsi.h... no
 checking sys/scsi.h usability... no
 checking sys/scsi.h presence... no
 checking for sys/scsi.h... no
 checking sys/scsicmd.h usability... no
 checking sys/scsicmd.h presence... no
 checking for sys/scsicmd.h... no
 checking sys/scsiio.h usability... no
 checking sys/scsiio.h presence... no
 checking for sys/scsiio.h... no

 --
 sane-devel mailing list: sane-devel at lists.alioth.debian.org
 http://lists.alioth.debian.org/mailman/listinfo/sane-devel
 Unsubscribe: Send mail with subject unsubscribe your_password
 ? ? ? ? ? ? to sane-devel-request at lists.alioth.debian.org




[sane-devel] New magicolor backend for inclusion in git

2011-01-06 Thread Chris Bagwell
I can commit on patches 0004 and 0005.

* 0004 looks OK to submit at any time.
* 0005 - I just updated the files in this area this week based on
Fedora 14's version of autofoo tools.  Compared to that update, you
have a newer version of autoconf then I do but a quite older version
of libtool.  On top of that, your update overwrote our hand patched
ltmain.sh file.

If you want to keep it simple, I suggest once you've submitted patch
0003 I can just regenerate all the Makefiles on your behalf.

Chris

On Thu, Jan 6, 2011 at 11:30 AM, Reinhold Kainhofer
reinhold at kainhofer.com wrote:
 As you know, I have been developing a magicolor backend for KONICA MINOLTA
 magicolor 1690MF devices (possibly also for other devices, but I don't have
 access to any other KONICA MINOLTA device that uses the same protocol -- The
 bizhub devices use a different protocol).

 In my view, it is now in a state so that it can be included in sane-backends
 (I'm using it regularly with xsane). The git patches can be found at:
 http://www.fam.tuwien.ac.at/~reinhold/sane/magicolor_backend_patches/

 -) The first two (0001 and 0002) are for the sanei_usb functionality already
 send yesterday,
 -) 0003 is the actual backend,
 -) 0004 fixes some compiler warnings in byteorder.h, and
 -) 0005 includes only the changes from running autoreconf (i.e. no manual code
 changes!)


 The backend uses libsnmp (configure check added!) to optionally auto-detect a
 LAN-connected magicolor device. I have set the timeout to a very low value (a
 little more than 1 second!), so all systems without a magicolor scanning in
 the network are not held up by the SNMP auto-detection of the magicolor
 devices.
 On the other hand, if the network is really slow, this might mean that we miss
 an SNMP response that takes longer than 1 second!

 What do you think of this backend?

 Cheers,
 Reinhold
 --
 --
 Reinhold Kainhofer, reinhold at kainhofer.com, http://reinhold.kainhofer.com/
 ?* Financial  Actuarial Math., Vienna Univ. of Technology, Austria
 ?* http://www.fam.tuwien.ac.at/, DVR: 0005886
 ?* LilyPond, Music typesetting, http://www.lilypond.org

 --
 sane-devel mailing list: sane-devel at lists.alioth.debian.org
 http://lists.alioth.debian.org/mailman/listinfo/sane-devel
 Unsubscribe: Send mail with subject unsubscribe your_password
 ? ? ? ? ? ? to sane-devel-request at lists.alioth.debian.org




[sane-devel] pros and cons regarding --enable-pthread for Linux

2010-08-27 Thread Chris Bagwell
On Fri, Aug 27, 2010 at 5:45 AM, Johannes Meixner jsmeix at suse.de wrote:

 Hello,

 On Aug 26 20:41 m. allan noah wrote:

 Pthread is the default on other platforms because they generally don't
 let open usb device handles pass across a fork(). Since this works on
 Linux, and threads were so flaky all those years ago, non-threaded
 became the default for Linux. Honestly, I think it could be changed,
 but I don't think pthread is as well tested, since most user's use
 whatever their distro compiles :)

 Then a question to the Linux distribution people on this list is
 whether or not there is perhaps already a Linux distribution
 which compiles sane-backends with the non-default configure
 setting --enable-pthread.

 Or was this perhaps done in the past but because of
 whatever issues it was changed back to the default?


I know Fedora does not enable pthreads... but I do not know if its
intentional.  I think a lot of distributions assume disabled features
are that way for a reason and don't bother with enabling them to much
unless issues like this come up.

Chris



[sane-devel] Testing on Canon MF6580PL

2010-06-28 Thread Chris Bagwell
On Wed, Jun 23, 2010 at 4:15 AM, twain43 at hotmail.com wrote:

  Whooopssorry: my fault.
 Here they are: redone today.

 Twain28

  Subject: Re: [sane-devel] Testing on Canon MF6580PL
  From: nicolas0martin at gmail.com
  To: twain43 at hotmail.com
  CC: chris at cnpbagwell.com; sane-devel at lists.alioth.debian.org
  Date: Tue, 22 Jun 2010 19:22:23 +0200
 
  I think you omitted to send the zipped logs with your previous message ?
 
  Nicolas
 
  Le mardi 22 juin 2010 ? 11:14 +, twain43 at hotmail.com a ?crit :
   Took longer than usual, but I did as you recommended.
   1. Built the libusb version linked and installed it;
   2. Exported only PIXMA and scanimaged. Log in the attached zip file;
   3. Exported LIBUSB and SANEI USB debug. Log in the attached zip file;
  
   No news, I'm a fraid.
  
   Twain28
  
  
 


I've been fading in and out of this thread so I do not have total history of
your logs.

Loooking at only this log, it seems to show scanner working correctly while
in test mode.  Can you do same debug logs but while doing an actual scan?
Does that work now with the patched libusb from twain-sane (does it generate
a good pnm file)?

Chris
-- next part --
An HTML attachment was scrubbed...
URL: 
http://lists.alioth.debian.org/pipermail/sane-devel/attachments/20100628/e5be85f9/attachment.htm


[sane-devel] Testing on Canon MF6580PL

2010-06-28 Thread Chris Bagwell
Oh, OK.  So one part of the problem is that pixma debug messages aren't
showing up.

Can the tester verify as a separate task if scanning is working with
twain-sane version of libusb though?  It seems it may be working now?

On debug output part, I see pixma is using some custom stuff to disable when
NDEBUG is present.  Seems pretty easy that externally included header
defines NDEBUG that pixma is including but not sanei_debug.h.

A quick test of that theory is to modify the file backends/pixma_common.h
around line 57 and change #ifdef NDEBUG to #ifdef NDEBUGBL.  Also,
similar change needed at backends/pixma.c line 70.

Can

On Mon, Jun 28, 2010 at 11:46 AM, Nicolas Martin
nicolas0martin at gmail.comwrote:

 Point is, for whatever reason, Pixma debug logs do not show up even when
 setting SANE_DEBUG_PIXMA to a correct level, only SANE_DEBUG and
 SANE_DEBUG_SANEI_USB produce logs, as showed up in the logs twain43 is
 providing.

 Just trying to figure out why this happens when compiled in this
 environment.

 Nicolas

 2010/6/28 Chris Bagwell chris at cnpbagwell.com


 I've been fading in and out of this thread so I do not have total history
 of your logs.

 Loooking at only this log, it seems to show scanner working correctly
 while in test mode.  Can you do same debug logs but while doing an actual
 scan?  Does that work now with the patched libusb from twain-sane (does it
 generate a good pnm file)?

 Chris



-- next part --
An HTML attachment was scrubbed...
URL: 
http://lists.alioth.debian.org/pipermail/sane-devel/attachments/20100628/faf328b4/attachment.htm


[sane-devel] Testing on Canon MF6580PL

2010-06-18 Thread Chris Bagwell
Here is a suggestion.  Since twain-sane binary seems to work better for you,
perhaps it has a patched version of libusb that works around some OSX bug.
Try comping and installing its version of libusb such that your git
sane-backends links to it:

http://www.ellert.se/PKGS/libusb-2009-09-10/src/libusb-2009-09-10-svn-macosx.tar.gz

If you compile and install with --prefix=/usr/local then be sure and add
LDFLAGS=-L/usr/local/lib CPPFLAGS=-I/usr/local/include to your sane
configure command line.

After that, if its still failing then turn on USB debug options.

export LIBUSB_DEBUG 255
export SANE_DEBUG_SANEI_USB 255

Chris

On Fri, Jun 18, 2010 at 8:14 AM, twain43 at hotmail.com wrote:

  I'm a bit lost too
 If you find somethign else we have not yet tried, just let me know, and
 I'll see what I can do: for the moment, the only thing I can think of is
 trying to clean every bit of SANE on my sys and try recompiling and
 installing with the latest development snapshotsbut I guess they're of
 no use, if the Pixma module has not changed

 Twain28

  Subject: RE: [sane-devel] Testing on Canon MF6580PL
  From: nicolas0martin at gmail.com
  To: twain43 at hotmail.com
  CC: sane-devel at lists.alioth.debian.org
  Date: Thu, 17 Jun 2010 22:16:45 +0200
 
  Running a bit out of ideas why it behaves like this and why logs do not
  come out from the backend.
  Probably something runs differently on MacOS, but I cannot figure out
  what exactly.
 
  Nicolas
 
  Le jeudi 17 juin 2010 ? 16:47 +, twain43 at hotmail.com a ?crit :
   Already tried.
   100% same log (see cut-paste below). :(
  
 
 
 

 --
 nome.cognome @... Verifica la disponibilit? sui NUOVI 
 dominihttps://signup.live.com/signup.aspx?mkt=it-itrollrs=12lic=1

 --
 sane-devel mailing list: sane-devel at lists.alioth.debian.org
 http://lists.alioth.debian.org/mailman/listinfo/sane-devel
 Unsubscribe: Send mail with subject unsubscribe your_password
 to sane-devel-request at lists.alioth.debian.org

-- next part --
An HTML attachment was scrubbed...
URL: 
http://lists.alioth.debian.org/pipermail/sane-devel/attachments/20100618/4faeb569/attachment.htm


[sane-devel] Testing on Canon MF6580PL

2010-06-16 Thread Chris Bagwell
Probably binary blob from twain-sane links to a static version of libusb (or
distributes its own dyn library) and is compiled different then when
self-compiling from git.

I believe we've seen several reports of sane on OSX having some USB issues
when self compiled.

I'm not sure if twain-sane web site gives compile instructions for libusb
and sane that its using?

Chris

On Wed, Jun 16, 2010 at 9:49 AM, Nicolas Martin nicolas0martin at 
gmail.comwrote:

 Another strangeness here. I can read this from this log:

 libusb/darwin.c usb_bulk_transfer: USB pipe is an interrupt pipe. Timeouts
 will not be used.
 meaning that Darwin libusb still does not handle interrupt timeouts.

 So I don't yet understand how the previous scanimage -T could work !

 2010/6/16 Nicolas Martin nicolas0martin at gmail.com

  Failing at the very beginning of the scan here.

 At this point, do you have the

 scanimage  -T

 command running correctly ? i.e., with the PASS statements ?


 --
 sane-devel mailing list: sane-devel at lists.alioth.debian.org
 http://lists.alioth.debian.org/mailman/listinfo/sane-devel
 Unsubscribe: Send mail with subject unsubscribe your_password
 to sane-devel-request at lists.alioth.debian.org

-- next part --
An HTML attachment was scrubbed...
URL: 
http://lists.alioth.debian.org/pipermail/sane-devel/attachments/20100616/b98e6fa1/attachment.htm


[sane-devel] Canoscan N1240U and Mac OS X 10.6

2010-05-27 Thread Chris Bagwell
On Thu, May 27, 2010 at 9:31 AM, Gernot Hassenpflug aikishugyo at 
gmail.comwrote:

 On Thu, May 27, 2010 at 9:05 AM, Darren Goossens
 goossens at rsc.anu.edu.au wrote:
  Hi
 
  Has anyone got this combination to work?  Canoscan N1240U and Mac OS X
 10.6. Can you tell me how?
 
  I have tried the software at
 
  www.ellert.se/twain-sane
 
  and it gives me sane-find-scanner and that works:
  found USB scanner (vendor=0x04a9 [Canon], product=0x220e [CanoScan],
 chip=LM983x?) at libusb:001:003-04a9-220e-ff-00
   # Your USB scanner was (probably) detected. It may or may not be
 supported by
   # SANE. Try scanimage -L and read the backend's manpage.
  Now, this is a supported scanner (plustek), but scanimage -L gives me
 nothing.  Says it cannot find a scanner.
  I think scanner access now impossible!
  I have tried installing xsane from MacPorts (completely broken as fas as
 I can tell)
  any advice welcome

 Good news is the scanner is perfectly supported (I have one) but the
 plustek backend, even in older versions of sane (like 1.0.19).
 Probably you have an issue with library paths, but someone familiar
 with MacOSX and macports would need to give you advice on SANE with a
 mac, sorry.

 Gernot


I'm not real sure how USB devices work under OSX but is probably the source
of issue.   One of the help pages on above twain-sane site (which I
recommend reading) says that it installs its packages under /usr/local
tree.  So you probably want to edit the file
/usr/local/etc/sane.d/plustek.conf file.  Look at the comments about giving
a USB device vendor/product ID's and using auto for device name instead of
/dev/usbcanner.

Macports should have same file if you prefer it but under /opt instead of
/usr/local.

Chris
-- next part --
An HTML attachment was scrubbed...
URL: 
http://lists.alioth.debian.org/pipermail/sane-devel/attachments/20100527/97d74056/attachment.htm


[sane-devel] Heads up: various issues with epson2 in 1.0.21

2010-05-20 Thread Chris Bagwell
I've been doing some limited testing using Artisan 800 and epson2 over
network connection only.  Mostly, just loading up various GUI's and doing
previews.

1.0.21 snuck into Fedora 13 at last minute so thats how I was trying it out
with things like simple-scan and xsane.

I looked at Fedora's bugzilla and only 2 new sane+epson reports.  One is
related to parsing options so could be related.  Not sure why I'm not seeing
it.

Chris

On Thu, May 20, 2010 at 11:17 AM, Julien BLACHE jb at jblache.org wrote:

 Hi,

 I've started getting reports of regressions in epson2 in 1.0.21,
 affecting a number of scanners.

 Has anyone else been getting similar reports?

 So far I've had reports about the Stylus 3200 and the Perfection 640
 being totally broken and a divide-by-zero bug in the options handling
 code. It's all I've got so far but I'm afraid there's more to
 come... two reports in a couple days is meaningful in my experience
 maintaining SANE :/

 JB.

 --
 Julien BLACHE   http://www.jblache.org
 jb at jblache.org  GPG KeyID 0xF5D65169

 --
 sane-devel mailing list: sane-devel at lists.alioth.debian.org
 http://lists.alioth.debian.org/mailman/listinfo/sane-devel
 Unsubscribe: Send mail with subject unsubscribe your_password
 to sane-devel-request at lists.alioth.debian.org

-- next part --
An HTML attachment was scrubbed...
URL: 
http://lists.alioth.debian.org/pipermail/sane-devel/attachments/20100520/2e1407a2/attachment.htm


[sane-devel] scanimage works, xsane does not

2010-05-17 Thread Chris Bagwell
Just a guess since you didn't mention working around following.

Macports is installed under /opt's and only looks for its libraries under
/opts.  I think those twain-sane packages are self-contained packages.

So probably when you compiled xsane from Macports it pulled in the older
sane-backends-1.0.20 from Macports as well.

Can't offer the exact fix for getting Macports to use external libraries but
recommend pinging the Macport maintainer of sane-backends to update to
1.0.21.  That would be simplest.

Chris

On Mon, May 17, 2010 at 1:22 AM, Darren Goossens goossens at 
rsc.anu.edu.auwrote:

 Hi,  Sorry if I am not very knowledgeable;

 I installed scanimage and sane on a Mac running 10.6 and it works from
 command line. (http://www.ellert.se/twain-sane/)

 But xsane, which I installed from MacPorts, which took many hours of
 compiling things, does not find any devices, even though I can scan and view
 images using the command line.  ImageCapture on the mac works as well (ie it
 finds the scanner).  So I am pretty sure the problem must be with xsane.

 Here is some output

 edr:~ goossens$ sane-find-scanner

  # sane-find-scanner will now attempt to detect your scanner. If the
  # result is different from what you expected, first make sure your
  # scanner is powered up and properly connected to your computer.

  # No SCSI scanners found. If you expected something different, make sure
 that
  # you have loaded a kernel SCSI driver for your SCSI adapter.

 found USB scanner (vendor=0x04a9 [Canon], product=0x220e [CanoScan],
 chip=LM9832/3) at libusb:003:004-04a9-220e-ff-00
  # 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.
 edr:~ goossens$ scanimage -L
 device `plustek:libusb:003:004-04a9-220e-ff-00' is a Canon CanoScan
 N1240U/LiDE30 flatbed scanner




 --
 sane-devel mailing list: sane-devel at lists.alioth.debian.org
 http://lists.alioth.debian.org/mailman/listinfo/sane-devel
 Unsubscribe: Send mail with subject unsubscribe your_password
 to sane-devel-request at lists.alioth.debian.org

-- next part --
An HTML attachment was scrubbed...
URL: 
http://lists.alioth.debian.org/pipermail/sane-devel/attachments/20100517/1348f090/attachment-0001.htm


[sane-devel] Epson Stylus SX410 is not recognized although it is listed as supported

2010-05-16 Thread Chris Bagwell
I think you nailed it.  I looked at the link for the PPA and its a snapshot
of sane-backends from February and the git commit Olaf found is dated April.

So, kltrg, you'll need to get a newer version of sane-backends.  Hopefully,
you can get the officially released 1.0.21 by now.

Chris

On Sun, May 16, 2010 at 7:19 PM, Olaf Meeuwissen
olaf.meeuwissen at avasys.jpwrote:

 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1

 m. allan noah :
  That seems more complete, but now we have to wait for someone with
  more experience with epson protocol

 I guess I qualify ;-)

 As Chris mentioned, the call to esci_set_color_correction_coefficients
 is definitely not right.  The odd thing is that it gets called at all.

 Looking at the code for 1.0.21 (and git master), there is no way that
 this command should get called.  Digging a bit further, this has been
 fixed in



 http://git.debian.org/?p=sane/sane-backends.git;a=commitdiff;h=e75d6e5e0cb223beb47b6756c56c4798082fe9d1


 which is in 1.0.21.  Looks like the other person is using a snapshot
 from before that.

 Hope this helps,
 - --
 Olaf Meeuwissen, LPIC-2   FLOSS Engineer -- AVASYS CORPORATION
 FSF Associate Member #1962   Help support software freedom
 http://www.fsf.org/jf?referrer=1962
 -BEGIN PGP SIGNATURE-
 Version: GnuPG v1.4.9 (GNU/Linux)
 Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

 iEYEARECAAYFAkvwi5EACgkQt5qrxaZLMnJhiwCgtwBsX6t2ndHf28Yda5pPU2Z+
 EYoAnjwgnmNBNb36r7zNyCAu6xNndWIZ
 =adin
 -END PGP SIGNATURE-

 --
 sane-devel mailing list: sane-devel at lists.alioth.debian.org
 http://lists.alioth.debian.org/mailman/listinfo/sane-devel
 Unsubscribe: Send mail with subject unsubscribe your_password
 to sane-devel-request at lists.alioth.debian.org

-- next part --
An HTML attachment was scrubbed...
URL: 
http://lists.alioth.debian.org/pipermail/sane-devel/attachments/20100516/e9a03245/attachment.htm


[sane-devel] Epson Stylus SX410 is not recognized although it is listed as supported

2010-05-14 Thread Chris Bagwell
I don't know the answer but probably the failure is related to this
part of the log file:

[epson2] using built in CCT profile
[epson2] esci_set_color_correction_coefficients
[epson2] esci_set_color_correction_coefficients: not supported

What version of sane-backends are you running?  Looking at current
git, that code path is protected by an if(hw_supports).  Not sure how
your getting it unless its old software.

Chris

On Fri, May 14, 2010 at 12:37 PM, m. allan noah kitno455 at gmail.com wrote:
 That seems more complete, but now we have to wait for someone with
 more experience with epson protocol

 allan

 On Fri, May 14, 2010 at 1:35 PM, kltrg m.kltrg at googlemail.com wrote:
 I started from scratch again, started xsane via the commandline redirecting 
 the output to that file, hit preview scan, git the error message, closes 
 that notification window and closed xsane. The logfile is attached. I hope 
 it worked that time.

 kltrg

 Am 14.05.2010 18:52, schrieb m. allan noah:
 I dont see any problems in this file. Are you sure it was not truncated?

 allan

 On Fri, May 14, 2010 at 12:46 PM, kltrg m.kltrg at googlemail.com wrote:
 I attached the logfile to the mail.

 Thanks for all you efforts! kltrg

 Am 14.05.2010 18:01, schrieb m. allan noah:
 well, that looks good, do the same when trying to scan:

 SANE_DEBUG_EPSON2=255 xsane 2xsane.log

 go until it gives you an error, and send the log here (compress it if 
 large)

 allan

 On Fri, May 14, 2010 at 11:41 AM, kltrg m.kltrg at googlemail.com wrote:
 I get this: http://pastebin.com/uG81XyKn

 Am 14.05.2010 14:40, schrieb m. allan noah:
 Try it with the DEBUG flag I gave before...

 allan

 On Fri, May 14, 2010 at 8:07 AM, kltrg m.kltrg at googlemail.com 
 wrote:
 I added the line and now I get:
 :~$ scanimage -L
 device `epson2:libusb:002:008' is a Epson PID 0851 flatbed scanner

 This sounds good and xsane and gscan2pdf recognize the scanner but I 
 still can't scan. I always get an error message: 'Failed to start 
 scanner: Operation not supported'.
















 --
 The truth is an offense, but not a sin

 --
 sane-devel mailing list: sane-devel at lists.alioth.debian.org
 http://lists.alioth.debian.org/mailman/listinfo/sane-devel
 Unsubscribe: Send mail with subject unsubscribe your_password
 ? ? ? ? ? ? to sane-devel-request at lists.alioth.debian.org




[sane-devel] SANE source compilation problems

2010-04-26 Thread Chris Bagwell
On Mon, Apr 26, 2010 at 5:28 AM, Julien BLACHE jb at jblache.org wrote:
 Chris Bagwell chris at cnpbagwell.com wrote:

 Hi,

 Others have replied about the remaining issues once @RESMGR@ typo is

 Speaking of resmgr, I think we can safely remove any code using it. I
 doubt it's still in use in SuSE... I'd be very surprised if it was.


If no one else objects, I'll happily remove it from Makefiles and
source code.  That is unless someone else prefers doing it.

Chris



[sane-devel] SANE source compilation problems

2010-04-26 Thread Chris Bagwell
http://gitorious.org/opensuse/resmgr says resmgr was removed in 11.0.

distrowatch.com says openSUSE 11.0 was released 2008-06-19.

We are couple months shy of 2 years.  By time next sane release it
will be well over 2 years. :)

Opinions?  I'll put it on my slw track for now.

Chris

On Mon, Apr 26, 2010 at 3:04 PM, m. allan noah kitno455 at gmail.com wrote:
 When was the last version of suse that used it replaced? If more than
 two years, kill it.

 allan

 On Mon, Apr 26, 2010 at 3:52 PM, Chris Bagwell chris at cnpbagwell.com 
 wrote:
 On Mon, Apr 26, 2010 at 5:28 AM, Julien BLACHE jb at jblache.org wrote:
 Chris Bagwell chris at cnpbagwell.com wrote:

 Hi,

 Others have replied about the remaining issues once @RESMGR@ typo is

 Speaking of resmgr, I think we can safely remove any code using it. I
 doubt it's still in use in SuSE... I'd be very surprised if it was.


 If no one else objects, I'll happily remove it from Makefiles and
 source code. ?That is unless someone else prefers doing it.

 Chris

 --
 sane-devel mailing list: sane-devel at lists.alioth.debian.org
 http://lists.alioth.debian.org/mailman/listinfo/sane-devel
 Unsubscribe: Send mail with subject unsubscribe your_password
 ? ? ? ? ? ? to sane-devel-request at lists.alioth.debian.org




 --
 The truth is an offense, but not a sin




[sane-devel] SANE source compilation problems

2010-04-25 Thread Chris Bagwell
On Sun, Apr 25, 2010 at 3:25 PM, Ilm?rs Poik?ns ilmars at delibero.lv wrote:
 Hi,

 I downloaded source from git repositories (sane-backends and sane-frontends)
 and tired to compile them.

 I have Ubuntu 9.10, needed dev library packages were there.

 sane-backends configure, make, make install was fine.
 sane-frontends configure failed.

 I traced problem down to /user/local/bin/sane-config having line:
 LIBS= -ldl -lv4l1?? -lm -ltiff -ljpeg? -lgphoto2 -lgphoto2_port -lexif -lm
 -lusb?? -lusb? @REGMGR_LIBS@

 When I deleted @REGMGR_LIBS@ from that line, then sane-frontends configure
 run successfully. I didn't care about graphical frontends, so configure
 disabled GUI. Previously gcc tried to find that file and failed to compile
 some tests.

This part was my fault.  I recently fixed oen sane-config bug and
introduced another.  I've just submitted a fix so if you re-pulled
sane-backends from git and reinstall, this part of the problem should
go away.

Others have replied about the remaining issues once @RESMGR@ typo is
fixed.  sane-frontend in current git contains some next generation
API's that sane-backends has disabled.  The released sane-frontends
package is the one to use with released and git versions of
sane-backends.

Chris



[sane-devel] sane-backends release 1.0.21

2010-04-20 Thread Chris Bagwell
Thanks very much.  Can I assume this patch will be included in your
future releases of epkowa backend?

Allan, are *.desc updates acceptable at this point of freeze?

Thanks,
Chris

On Mon, Apr 19, 2010 at 6:30 PM, Olaf Meeuwissen
olaf.meeuwissen at avasys.jp wrote:
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1

 m. allan noah wrote:
 [...]
 Please check your .desc files, and make sure they are up to date with
 all the scanners your backends support, and make sure none of your
 supported scanners are listed in unsupported.desc.

 Here's a diff for epkowa.desc based on the thread[1] started by Chris
 Bagwell regarding some SCSI models that needed some extra info.

 ?[1]
 http://lists.alioth.debian.org/pipermail/sane-devel/2010-March/026209.html

 Hope this helps,
 - --
 Olaf Meeuwissen, LPIC-2 ? ? ? ? ? FLOSS Engineer -- AVASYS CORPORATION
 FSF Associate Member #1962 ? ? ? ? ? ? ? Help support software freedom
 ? ? ? ? ? ? ? ? http://www.fsf.org/jf?referrer=1962
 -BEGIN PGP SIGNATURE-
 Version: GnuPG v1.4.9 (GNU/Linux)
 Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

 iEYEARECAAYFAkvM56MACgkQt5qrxaZLMnLqQQCeJtdQMEErdmbJUtoIXRdVlwJF
 WpIAoIIdASCnZNKMLDxi5nNNpIpAnubh
 =x44g
 -END PGP SIGNATURE-

 --
 sane-devel mailing list: sane-devel at lists.alioth.debian.org
 http://lists.alioth.debian.org/mailman/listinfo/sane-devel
 Unsubscribe: Send mail with subject unsubscribe your_password
 ? ? ? ? ? ? to sane-devel-request at lists.alioth.debian.org




[sane-devel] sane-backends release 1.0.21

2010-04-20 Thread Chris Bagwell
 On Mon, Apr 19, 2010 at 6:30 PM, Olaf Meeuwissen
 olaf.meeuwissen at avasys.jp wrote:
 Here's a diff for epkowa.desc based on the thread[1] started by Chris
 Bagwell regarding some SCSI models that needed some extra info.

 ?[1]
 http://lists.alioth.debian.org/pipermail/sane-devel/2010-March/026209.html



Thanks for the information!  The diff has been commited.

Chris



[sane-devel] Description file, Epson, and wildcards

2010-03-02 Thread Chris Bagwell
On Mon, Mar 1, 2010 at 11:36 PM, Olaf Meeuwissen
olaf.meeuwissen at avasys.jp wrote:
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1

 Chris Bagwell wrote:

 On Fedora, it seems its a common problem that hal or udev gets the
 permissions for scsi Epson scanners wrong and users can only scan as
 root. ?They generically fix permissions for scsi scanner class but
 not processor. ?Their work around is to edit entry for specific
 scanner in the epson2.desc file and a line as follows each time a user
 reports a problem:

 :scsi ESPON Exact Model Name Reported processor

 The 2010-03-01 git snapshot has

 ?$ ?grep :scsi doc/descriptions*/ep*.desc
 ?doc/descriptions/epson.desc::scsi EPSON SCANNER GT-7000 processor
 ?doc/descriptions/epson.desc::scsi EPSON Perfection1200 processor
 ?doc/descriptions/epson.desc::scsi EPSON Perfection636 processor
 ?doc/descriptions/epson.desc::scsi EPSON Perfection1200 processor

 already. ?Are you talking about other models?

Yes, they have a patch for Expression800 in addition.  My assumption
is it would be an issue with any SCSI-only EPSON scanner?  Or is there
a small subset of names all models use?

 Mostly, the epson2.desc values are driven by epkowa developers from
 their epkowa.desc. ?Would it be possible for epkowa developers to
 provide a :scsi line for all SCSI devices?

 Yes. ?No promises on a release time line but we could send a diff to the
 list and ask someone with the necessary privileges to commit.

My understanding is that epson2.desc updates are automated based on
epkowa.desc updates.  So if you could send this updated file to list
when its ready, I can submit it.  That would be great!  Its brute
force fix but it will work nicely.

 A third option is to provide some sort of hard coded/hand written wild
 card rules that is added to libsane.fdi and ?libsane.rules for these
 special cases. ?This is probably the easiest. ?It looks like at east
 Epson and HP could benefit from this.

 Do people think this is worth addressing?

 Anything that makes out of the box scanner device detection and setup so
 you can scan without root privileges is worth addressing.

I'll keep the third option in the back pocket... depending on what
time line becomes for option one we can pull it out.

Chris



[sane-devel] Description file, Epson, and wildcards

2010-03-02 Thread Chris Bagwell
On Tue, Mar 2, 2010 at 5:42 PM, Olaf Meeuwissen
olaf.meeuwissen at avasys.jp wrote:

 Yes, they have a patch for Expression800 in addition. ?My assumption
 is it would be an issue with any SCSI-only EPSON scanner? ?Or is there
 a small subset of names all models use?

 Hadn't heard about that one, I'll add that to epkowa.desc as well then.
 ?Assume it is for the Expression 800 only and not for its Japanese
 cousin the GT-9600.

Sorry for not including that. The report was for Expression 800
entry.  The following is bug report if interested.

https://bugzilla.redhat.com/show_bug.cgi?id=456656

 To be honest, I don't know what the various EPSON scanners with a SCSI
 interface report. ?Apparently, most advertise themselves as a scanner
 device so no special handling should be required. ?Some models however
 think that they are processors and need the :scsi entry. ?What names
 these models report, I don't know, so I will have to rely on whatever
 people report.

 Mostly, the epson2.desc values are driven by epkowa developers from
 their epkowa.desc. ?Would it be possible for epkowa developers to
 provide a :scsi line for all SCSI devices?
 Yes. ?No promises on a release time line but we could send a diff to the
 list and ask someone with the necessary privileges to commit.

 My understanding is that epson2.desc updates are automated based on
 epkowa.desc updates.

 As m. allen noah also pointed out, that's living life dangerously.

If epkowa.desc can include those :scsi that are known, it would be
great.  Since the epkowa.desc is used in sane-backend build process,
fedora would get your :scsi fixes when users install sane-backends
and these reports would reduce some... maybe helping isane out in the
process.

The epson2.desc entries may need further discussion but it sounds like
my initial wish of removing a downstream patch can be addressed
sometime in near future via a epkowa.desc update.

Chris



[sane-devel] Description file, Epson, and wildcards

2010-03-01 Thread Chris Bagwell
Hi all,

I'm reviewing Fedora patch set and notice an issue that I'm not sure
how to handle within Sane.  Has this been discussed in past?

It looks like all 3 Epson backends can detect SCSI scanners based on
scsi type being processor, vendor ID being EPSON, and the
model/product name having 1 of 5 prefixes.  This is good to know for
next step.

On Fedora, it seems its a common problem that hal or udev gets the
permissions for scsi Epson scanners wrong and users can only scan as
root.  They generically fix permissions for scsi scanner class but
not processor.  Their work around is to edit entry for specific
scanner in the epson2.desc file and a line as follows each time a user
reports a problem:

:scsi ESPON Exact Model Name Reported processor

Once thats done, sane's tools will generate a
libsane.fdi/libsane.rules that will set permissions correct.  Sane is
not providing enough details right now it seems.  First option to help
end users is to start providing that much details.

Mostly, the epson2.desc values are driven by epkowa developers from
their epkowa.desc.  Would it be possible for epkowa developers to
provide a :scsi line for all SCSI devices?

Second option is to provide some kind of wild card support.  For example:

:scsi EPSON Perfection* processor

This would be pretty difficult to convert into hal and udev yntax
though. Its also will cause some confusion when a Perfection 636S rule
matches a Perfection 636.

A third option is to provide some sort of hard coded/hand written wild
card rules that is added to libsane.fdi and  libsane.rules for these
special cases.  This is probably the easiest.  It looks like at east
Epson and HP could benefit from this.

Do people think this is worth addressing?

Chris



[sane-devel] scanimage 1.0.20 hangs on Solaris 10/SPARC (pixma backend)

2010-02-28 Thread Chris Bagwell
The easy thing I can suggest is to try compiling with
--enable-pthread.  I recall a past discussion related to libusb and
that sometimes causing it to work better.

If that doesn't fix things for you then your going to have to debug
this yourself.  I do not think there are any active Solaris developers
on the mailing list.  See man san, man sane-usb, and man
sane-backend (replace backend with real name) for information on
what environment variables you can see to enable debug output.

Chris

On Sun, Feb 28, 2010 at 2:13 AM, Patrick Simmons
linuxrocks123 at netscape.net wrote:
 Hello all,

 I'm trying to get SANE 1.0.20 working with a Canon MP210 USB scanner on
 Solaris/SPARC. ?I'm using the latest Solaris 10 build. ?However, I can't get
 it to scan. ?When I do scanimage -L, my scanner is shown correctly after a
 moderately long delay, but scanimage just hangs forever when I try to use it
 to scan. ?scanimage will also hang forever when run with the --help option,
 after printing out the help text. ?It's as if it's trying to print the
 scanner name but ran into trouble.

 I've followed README.Solaris to the letter, except that I also changed an
 include path in the Makefile from -I/usr/local/include to -I/usr/include
 because the md5.h in /usr/local/include won't compile on my machine for some
 reason. ?I experience the same behavior with the latest GIT snapshot. ?The
 same behavior happens whether I am root or a user. ?I have verified that the
 scanimage works with SANE 1.0.20 on Linux/AMD64; in addition, I until
 recently ran Linux/SPARC on the Solaris 10 machine. ?scanimage worked there
 with a development snapshot of SANE calling itself SANE 1.1.0.

 Does anyone know what could be wrong?

 Thanks,
 --Patrick



[sane-devel] why hasn't there been a release in a long time ?

2010-02-08 Thread Chris Bagwell
I was going to wait a little closer to 1 year anniversary of last
release before bringing it up but thats starting to creep up on us.  I
was also hoping we can get one out in time for Fedora 13 but their
freeze is coming up pretty quick.

I'll offer to help out as much as possible with the release.  I can do
my set of platform checks (cygwin, osx, solaris, pulling any Fedora
patches that make sense, etc).  Basically, I can make sure the steps
in release.txt are pain free up to the Announcing Release step.

I do not recall seeing any 1.1 API stuff being re-enabled although
there was talk of it.  Is there any work to be done in that area?

Chris

On Mon, Feb 8, 2010 at 8:16 AM, m. allan noah kitno455 at gmail.com wrote:
 I personally will take the great measure of responsibility for this
 problem. My time has become very limited since I took over the job of
 making releases. I have also allowed the confusion around a new API
 prevent us from moving forward with maintenance releases, even though
 that is an unrelated issue.

 If someone else wants to step up and schedule/make the release, I'd be
 happy for the help. Otherwise, let me look at a calendar, and come up
 with a plan. Thanks for the kick in the pants :)

 allan

 On Mon, Feb 8, 2010 at 6:39 AM, Julien BLACHE jb at jblache.org wrote:
 db db.pub.mail at gmail.com wrote:

 Hi,

 I know this is not the fault of sane, however this is causing a large
 distance between what sane can do and what sane 'does' as shipped.

 If there's no release, there's nothing new to package. As simple as
 that.

 So, yes, it is SANE's fault.

 I'm not packaging git snapshots because I cannot support them in a
 stable Debian release. I used to package CVS snapshots when I knew a
 release was coming up and would be out  suited for Debian stable at a
 time where I could still push it into stable.

 With the 1.1 API stuff and no release schedule, I can't do that anymore.

 JB.

 --
 Julien BLACHE ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? http://www.jblache.org
 jb at jblache.org ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?GPG KeyID 0xF5D65169

 --
 sane-devel mailing list: sane-devel at lists.alioth.debian.org
 http://lists.alioth.debian.org/mailman/listinfo/sane-devel
 Unsubscribe: Send mail with subject unsubscribe your_password
 ? ? ? ? ? ? to sane-devel-request at lists.alioth.debian.org




 --
 The truth is an offense, but not a sin

 --
 sane-devel mailing list: sane-devel at lists.alioth.debian.org
 http://lists.alioth.debian.org/mailman/listinfo/sane-devel
 Unsubscribe: Send mail with subject unsubscribe your_password
 ? ? ? ? ? ? to sane-devel-request at lists.alioth.debian.org




[sane-devel] Has anyone managed to get Snapscan backend working with FreeBSD 8.0 (which uses libusb)?

2010-01-26 Thread Chris Bagwell
On Tue, Jan 26, 2010 at 3:04 AM, Oliver Schwartz Oliver.Schwartz at 
gmx.dewrote:

 Hi all,

 On 25.01.2010, at 12:26, Torfinn Ingolfsen wrote:

  In the meantime, another FreeBSD user found a way to fix it, it is just a
 one-line patch:
 http://lists.freebsd.org/pipermail/freebsd-usb/2010-January/008172.html

 With Andrew's patch, my scanner now works:
  root at kg-v2# sane-find-scanner -q
 found USB scanner (vendor=0x03f0 [HP], product=0xc202 [Photosmart 8200
 series]) at libusb:/dev/usb:/dev/ugen1.2
 found USB scanner (vendor=0x06bd [AGFA], product=0x2061 [
 Snapscan1212u_2]) at libusb:/dev/usb:/dev/ugen2.2
 root at kg-v2# scanimage -L
 device `snapscan:libusb:/dev/usb:/dev/ugen2.2' is a AGFA SNAPSCAN 1212U_2
 flatbed scanner



 Thanks for the pointer, I'll try to get this fixed in the backend. The code
 in question was added recently to fix another problem with calculating a
 unique identifier.

 Maybe one of the guys who's experienced with autoconf can give me a hint on
 how to do this the best way. Should I just use #ifdef BSD around the code
 in question or is there some autoconf magic that would allow me to do a more
 advanced query?

 I also have to retest this on OS X - the code in question looks very Linux
 specific.

 Kind regards,

 Oliver



I don't think there is any autoconf stuff that can help you... or perhaps
what you need is already there.   A quick look at sanei_usb_init() and I
think its the one generate 2 types of strings depending on if your using
libusb 1.0 or not.

So at least you should be able to reference HAVE_LIBUSB_1.0 but maybe better
to update sanei_usb_init() code to always generate a consistent string?

Chris
-- next part --
An HTML attachment was scrubbed...
URL: 
http://lists.alioth.debian.org/pipermail/sane-devel/attachments/20100126/36a9b0fe/attachment.htm


[sane-devel] Epson Perfection 610 Issue with 150 dpi scan

2010-01-03 Thread Chris Bagwell
On Sun, Jan 3, 2010 at 7:01 AM, Rainer Dorsch rdorsch at web.de wrote:


 For the long options issue:
 I rebuild git sane on another machine (also Debian stable aka Debian 5.0)
 and
 the long options error is still there. Even --help has problems. Which
 library is sane using to process the command line options? Does Debian
 stable
 maybe ship with a different version than your system?


After running configure, can you look at the file include/sane/config.h?
Check if HAVE_GETOPT_H and HAVE_GETOPT_LONG are defined.   On debian, I
would expect them to be defined.  In that case, it uses standard libc
version of getopt.

I do see one suspicious line in lib/getopt.c and lib/getopt1.c.  They do a
#include config.h instead of #include ../include/sane/config.h and so in
certain cases it may be including the wrong config.h file.  In that case, it
would mistakenly compile a conflicting version of getopt_long() (which can
explain the problem your seeing).

Chris
-- next part --
An HTML attachment was scrubbed...
URL: 
http://lists.alioth.debian.org/pipermail/sane-devel/attachments/20100103/55a4b3f3/attachment.htm


[sane-devel] long option format not recognized (Was: Epson Perfection 610 Issue with 150 dpi scan)

2010-01-03 Thread Chris Bagwell
There was a typo in first part of Rainer's email.  Later on it shows its
still not working although its safe fix I should probably submit.

I've now been able to reproduce the issue with --help not working with the
epson2 backend. The problem occurs when we reach driver specific help and so
may be specific to epson2.  The all_options doesn't seem to contain the
--help option and probably anything from basic_options[] array.

Since basic_options[] (which includes --help) is copied to all_options[]
after filling in backend options, I suspect something returned by epson2
backend is causing a NULL to be placed in middle and causing getopt_long()
to stop processing early.  I couldn't find anything obvious like missing
options inits from browsing the code.  I guess it will need to be brute
forced debugged to find where the NULL is coming from.

Chris

On Sun, Jan 3, 2010 at 5:06 PM, m. allan noah kitno455 at gmail.com wrote:

 good call chris- you want to submit a fix?

 allan

 On Sun, Jan 3, 2010 at 4:14 PM, Rainer Dorsch rdorsch at web.de wrote:
  Hi Chris,
 
  Am Sonntag, 3. Januar 2010 schrieb Chris Bagwell:
  On Sun, Jan 3, 2010 at 7:01 AM, Rainer Dorsch rdorsch at web.de wrote:
   For the long options issue:
   I rebuild git sane on another machine (also Debian stable aka Debian
 5.0)
   and
   the long options error is still there. Even --help has problems. Which
   library is sane using to process the command line options? Does Debian
   stable
   maybe ship with a different version than your system?
 
  After running configure, can you look at the file include/sane/config.h?
  Check if HAVE_GETOPT_H and HAVE_GETOPT_LONG are defined.   On debian, I
  would expect them to be defined.  In that case, it uses standard libc
  version of getopt.
 
  As you expected, it is there:
 
  rd at blackbox:~/SW.nobackup/sane-backends$ grep HAVE_GETOPT
  include/sane/config.h
  #define HAVE_GETOPT_H 1
  #define HAVE_GETOPT_LONG 1
  rd at blackbox:~/SW.nobackup/sane-backends$
 
  I do see one suspicious line in lib/getopt.c and lib/getopt1.c.  They do
 a
  #include config.h instead of #include ../include/sane/config.h and
 so
  in certain cases it may be including the wrong config.h file.  In that
  case, it would mistakenly compile a conflicting version of getopt_long()
  (which can explain the problem your seeing).
 
  Hmm...that does solve the problem:
 
  I did this modification
 
  rd at blackbox:~/SW.nobackup/sane-backends$ git diff
  diff --git a/lib/getopt.c b/lib/getopt.c
  index 9dabb82..b8715e3 100644
  --- a/lib/getopt.c
  +++ b/lib/getopt.c
  @@ -20,7 +20,7 @@
 License along with the GNU C Library; if not, write to the Free
 Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
 02111-1307 USA.  */
  -# include config.h
  +# include ../include/sane/config.h
   #if !defined(HAVE_GETOPT_H) || !defined(HAVE_GETOPT_LONG)
   ^L
   /* This tells Alpha OSF/1 not to define a getopt prototype in stdio.h.
  diff --git a/lib/getopt1.c b/lib/getopt1.c
  index 5ace00a..082998c 100644
  --- a/lib/getopt1.c
  +++ b/lib/getopt1.c
  @@ -17,7 +17,7 @@
 License along with the GNU C Library; if not, write to the Free
 Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
 02111-1307 USA.  */
  -#include config.h
  +#include ../include/sane/config.h
   #if !defined(HAVE_GETOPT_H) || !defined(HAVE_GETOPT_LONG)
   ^L
   #ifdef HAVE_CONFIG_H
  rd at blackbox:~/SW.nobackup/sane-backends$
 
  recompiled, set the paths again
 
  rd at blackbox:~/SW.nobackup/sane-backends$ export |grep PATH
  declare -x LD_LIBRARY_PATH=/opt/sane-backends-091230/lib
  declare -x
 
 PATH=/opt/sane-backends-091230/bin:/usr/local/bin:/usr/bin:/bin:/usr/games
  rd at blackbox:~/SW.nobackup/sane-backends$
 
  and --help is still not recognized
 
  rd at blackbox:~/SW.nobackup/sane-backends$ which scanimage
  /opt/sane-backends-091230/bin/scanimage
  rd at blackbox:~/SW.nobackup/sane-backends$
 
  and --help is still not recogniced
 
  rd at blackbox:~/SW.nobackup/sane-backends$ scanimage --help
  Usage: scanimage [OPTION]...
 
  Start image acquisition on a scanner device and write image data to
  standard output.
 
  Parameters are separated by a blank from single-character options (e.g.
  -d epson) and by a = from multi-character options
  (e.g. --device-name=epson).
  -d, --device-name=DEVICE   use a given scanner device (e.g.
 hp:/dev/scanner)
 --format=pnm|tiff  file format of output file
  -i, --icc-profile=PROFILE  include this ICC profile into TIFF file
  -L, --list-devices show available scanner devices
  -f, --formatted-device-list=FORMAT similar to -L, but the FORMAT of the
 output
can be specified: %d (device name), %v
 (vendor),
%m (model), %t (type), %i (index number), and
%n (newline)
  -b, --batch[=FORMAT]   working in batch mode, FORMAT is `out%d.pnm

[sane-devel] Fwd: sane_read: Device busy with Canon PIXMA MX310 and sane 1.0.20-4ubuntu3

2009-12-03 Thread Chris Bagwell
On Thu, Dec 3, 2009 at 3:34 PM, Nicolas Martin nicolas0martin at 
gmail.comwrote:


 
  Nicolas,  I'm curious why you didn't recommend the following instead:
 
  make distclean
  ./configure --enable-pthread
 
 
 
 Yes Chris, you are right, I did not mention that, this adds the correct
 -lpthread option to the link statement, and should solve the problem
 hereunder.

 However, the

 export CFLAGS=-DUSE_PTHREAD

 statement is necessary for me, before running the ./configure ... ,
 otherwise, it will compile with the forked option, as the USE_PTHREAD
 flag stays unset.



So your saying that, for you, running make distclean; ./configure
--enable-pthread; make doesn't correctly have USE_PTHREAD defined?

If so, do you mind emailing me your config.log and include/src/config.h?
I'll see what I can do to get it working.

It works for me... a quick code review shows snapscan-usb.c a little
suspicious because its not including ../include/sane/config.h but is
checking for USE_PTHREAD.  I didn't follow its include chain very closely
though since we are talking about pixma.

Thanks,
Chris
-- next part --
An HTML attachment was scrubbed...
URL: 
http://lists.alioth.debian.org/pipermail/sane-devel/attachments/20091203/4d0c5b9d/attachment.htm


[sane-devel] Fwd: sane_read: Device busy with Canon PIXMA MX310 and sane 1.0.20-4ubuntu3

2009-12-02 Thread Chris Bagwell
Sorry, meant to reply to mailing list.

-- Forwarded message --
From: Chris Bagwell ch...@cnpbagwell.com
Date: Wed, Dec 2, 2009 at 7:00 PM
Subject: Re: [sane-devel] sane_read: Device busy with Canon PIXMA MX310
and sane 1.0.20-4ubuntu3
To: Rogier Eggers rogiereggers at gmail.com




On Wed, Dec 2, 2009 at 5:37 PM, Rogier Eggers rogiereggers at gmail.comwrote:

 Hi Nicolas,

 Ok, so indeed, the git version without pthtread works flawlessy (see
 attached log). However, I so far didn'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?


Sorry, I can't answer name of debian pthread-devel package but I think you
also have some sort of configure error.  I don't see the -lpthread during
the link.  Can you reverify that you did the following line?

export LIBS=-lpthread

If that doesn't work then try adding this after the make distclean step
but before configure step:

export PTHREAD_LIBS=-lpthread

Nicolas,  I'm curious why you didn't recommend the following instead:

make distclean
./configure --enable-pthread

Does that not work correctly under debian with git?  Anything I can do to
help get that working?

Perhaps it was just some past confusion in debian from having to use
--disable-fork to get pthread working and that not being obvious?

Chris



 Regards,

 Rogier


 Error message during build process:

 [snip]

 rm -fr  .libs/libsanei.a .libs/libsanei.la
 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
 ranlib .libs/libsanei.a
 creating libsanei.la
 (cd .libs  rm -f libsanei.la  ln -s ../libsanei.la libsanei.la)
 make[1]: Leaving directory
 `/home/rogier/Software/Src/sane-backends-git20091201/sanei'
 Making all in backend
 make[1]: Entering directory
 `/home/rogier/Software/Src/sane-backends-git20091201/backend'
 make  all-am
 make[2]: Entering directory
 `/home/rogier/Software/Src/sane-backends-git20091201/backend'
 /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=/usr/lib/sane -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 'dll.c' || echo './'`dll.c
 dll.c: In function ?load?:
 dll.c:535: warning: ISO C forbids conversion of object pointer to function
 pointer type
 dll.c:560: warning: ISO C forbids conversion of object pointer to function
 pointer type
 mv -f .deps/libdll_la-dll.Tpo .deps/libdll_la-dll.Plo
 /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 libdll.la  libdll_la-dll.lo
 /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 '/usr/lib' -version-number 1:0:21  -o libsane.la -rpath
 /usr/lib libsane_la-dll-s.lo ../lib/liblib.la  libdll.la 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
 ../sanei/.libs/sanei_thread.o: In function `sanei_thread_kill':
 sanei_thread.c:(.text+0xe5): undefined reference to `pthread_cancel'
 ../sanei/.libs/sanei_thread.o: In function `sanei_thread_begin':
 sanei_thread.c:(.text+0x302): undefined reference to `pthread_create'
 ../sanei/.libs/sanei_thread.o: In function `sanei_thread_sendsig':
 sanei_thread.c:(.text+0x3ac): undefined reference to `pthread_kill

[sane-devel] Fwd: Fw: SANE compile problem on Solaris

2009-09-25 Thread Chris Bagwell
Meant for this to go to the mailing list for future reference.

-- Forwarded message --
From: Chris Bagwell ch...@cnpbagwell.com
Date: Fri, Sep 25, 2009 at 10:04 AM
Subject: Re: Fw: [sane-devel] SANE compile problem on Solaris
To: David Price djprice at mindspring.com




On Fri, Sep 25, 2009 at 9:43 AM, David Price djprice at mindspring.com wrote:

  Chris,



 Thanks for your reponse and suggestions.  I have tried both suggestions,
 both I still cannot get it compiled but with different errors:



 First, I downloaded the latest backend version from git, it made it a lot
 further in the build but then failed with:
 make[2]: Entering directory
 `/export/home/price/download/sane/git/install.git20090925/sane-backends-git20090925/backend'
 /bin/bash ../libtool --silent --tag=CC   --mode=link gcc
 -I/usr/sfw/include -W -Wall -Wcast-align -Wcast-qual -Wmissing-declarations
 -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wstrict-prototypes
 -pedantic -Wl,-z,defs -rpath '/opt/sane/lib/sane' -version-number 1:0:21
 -module -L/usr/sfw/lib -o libsane-epjitsu.la
 libsane_epjitsu_la-epjitsu-s.lo ../lib/liblib.la 
 libepjitsu.la../sanei/sanei_init_debug.lo ../sanei/sanei_constrain_value.lo
 ../sanei/sanei_config.lo  sane_strstatus.lo ../sanei/sanei_usb.lo -lm
 Undefined   first referenced
  symbol in file
 roundf
 ./.libs/libepjitsu.a(libepjitsu_la-epjitsu.o)
 ld: fatal: Symbol referencing errors. No output written to
 .libs/libsane-epjitsu.so.1.0.21
 collect2: ld returned 1 exit status
 make[2]: *** [libsane-epjitsu.la] Error 1
 make[2]: Leaving directory
 `/export/home/price/download/sane/git/install.git20090925/sane-backends-git20090925/backend'
 make[1]: *** [all] Error 2
 make[1]: Leaving directory
 `/export/home/price/download/sane/git/install.git20090925/sane-backends-git20090925/backend'

 make: *** [all-recursive] Error 1




I ran into this myself as well. What I kinda remember was my LD_LIBRARY_PATH
was set to something that was giving priority to libm.so.1; which doesn't
defined roundf(); instead of libm.so.2.

I think I had partially set up my environment to use an older SUNWspro
(Sun's own compiler) and that was causing the issues; even though I was
compiling with GCC.  Try setting up a shell that doesn't have visibility to
/opt/SUNWspro/lib or gives priority to /lib first (using LD_LIBRARY_PATH).

Chris
-- next part --
An HTML attachment was scrubbed...
URL: 
http://lists.alioth.debian.org/pipermail/sane-devel/attachments/20090925/d2a850bc/attachment-0001.htm


[sane-devel] Installing Problems

2009-09-21 Thread Chris Bagwell
On Mon, Sep 21, 2009 at 9:03 AM, carterbueford at gmx.net wrote:

  Hi,



 please take a look at the attached logfile. There you?ll find the complete
 aoutput of the make-command.



 Thanks

 Oliver




OK, based on your log, it can not find the definitions for inb and outb
functions for the qcam backend.

What OS are you compiling on? Also, can you send your config.log directly to
me?  It should be in the directory where you ran ./configure from.

There is some logic in acinclude.m4 to disable qcam backend if ioperm() and
portaccess() are not defined... but it looks slightly buggy how it was
phrased (should have been an || I think). And it doesn't check
specifically for inb and outb; which seems reasonable at least under Linux
but perhaps not on other platforms.
-- next part --
An HTML attachment was scrubbed...
URL: 
http://lists.alioth.debian.org/pipermail/sane-devel/attachments/20090921/df93caf2/attachment.htm


[sane-devel] Installing Problems

2009-09-21 Thread Chris Bagwell
On Mon, Sep 21, 2009 at 9:17 AM, Chris Bagwell chris at cnpbagwell.com wrote:


 There is some logic in acinclude.m4 to disable qcam backend if ioperm() and
 portaccess() are not defined... but it looks slightly buggy how it was
 phrased (should have been an || I think). And it doesn't check
 specifically for inb and outb; which seems reasonable at least under Linux
 but perhaps not on other platforms.


OK, the check in acinclude.m4 is correct (it is an either/or thing).  I
looks like its probably that qcam uses outb and inb but doesn't link in
sanei_pio.  That file appears to have some logic to handle platforms that do
not define those functions.

I'll submit a fix to backends/Makefile.am to start linking this in.

Chris
-- next part --
An HTML attachment was scrubbed...
URL: 
http://lists.alioth.debian.org/pipermail/sane-devel/attachments/20090921/74004fb5/attachment.htm


[sane-devel] Installing Problems

2009-09-20 Thread Chris Bagwell
On 09/20/2009 11:19 AM, carterbueford at gmx.net wrote:

 Hi,

 I get the following error during installation of sane-server on my 
 mashine:

 collect2: ld returned 1 exit status

 make[2]: *** [libsane-qcam.la] Error 1

 make[2]: Leaving directory 
 `/opt/install_dir/sane_install/sane-backends-1.0.20/backend'

 make[1]: *** [all] Error 2

 make[1]: Leaving directory 
 `/opt/install_dir/sane_install/sane-backends-1.0.20/backend'

 make: *** [all-recursive] Error 1

 Any suggestions?

 Thanks.

 Oliver



Probably some sort of unresolved symbols or libraries not found.  What 
does the text before what you included say?  Should mention the 
library/symbols having issues.

Chris

-- next part --
An HTML attachment was scrubbed...
URL: 
http://lists.alioth.debian.org/pipermail/sane-devel/attachments/20090920/509df3b1/attachment.htm


[sane-devel] Sane Error

2009-06-26 Thread Chris Bagwell
On Fri, Jun 26, 2009 at 10:55 AM, Michael Cronenworth mike at cchtml.comwrote:

 David Solomon on 06/26/2009 10:45 AM wrote:
  Is there any way to disable the usage globally for testing?
 


 If you search through the mailing list archives you should find my MinGW
 patches (still don't seem to be accepted by the maintainers?) and
 compile a native libsane.dll unless you require saned.


Michael,

I was going to attempt to submit at least non-issue chunks of your patches
(for example, anything under  lib/ which is to support multiple platforms
anyways).  Last email I saw from you, you mentioned going to re-update your
patches so I held off.  Mind resending the latest?

I've also now installed mingw cross compiler on Fedora 11 box so can help
verify things.

Chris
-- next part --
An HTML attachment was scrubbed...
URL: 
http://lists.alioth.debian.org/pipermail/sane-devel/attachments/20090626/5005df91/attachment.htm


[sane-devel] Sane Error

2009-06-26 Thread Chris Bagwell
On Fri, Jun 26, 2009 at 10:45 AM, David Solomon dsolomon at rx30.com wrote:

 Is there any way to disable the usage globally for testing?

 David


You can try to change to pthreads instead of fork as an easy test by using a
configure option.  Not sure if it will make a difference.

Are you using 1.0.20 or git?

For 1.0.20:

configure --disable-fork-process

For git:

--enable-pthreads

Chris
-- next part --
An HTML attachment was scrubbed...
URL: 
http://lists.alioth.debian.org/pipermail/sane-devel/attachments/20090626/31017af2/attachment.htm


[sane-devel] epson2 updated again

2009-06-02 Thread Chris Bagwell
OK, I'm not exactly sure what is different from my last test but now 
latest update of git and I can network scan great with my Artisan 800.

I just tried a hand full of resolutions and both flatbed and ADF.  All 
looked visually fine.

Thanks for your work on this!

Now, I guess I should go off and figure out what I did to 
sanei_tcp_read() in return.

Chris

On 06/02/2009 06:28 PM, Alessandro Zummo wrote:
Updated:

   - added more devices
   - updated description file
   - rescan devices on sane_get_devices

Still in the pipeline:

   - color correction profiles
   - infrared support
   - support for warmup condition






[sane-devel] byteorder.h

2009-06-01 Thread Chris Bagwell
If no one else gives it a go, I'll have a hand at updating the autoconf 
macro.  I've not much experience with cross platform locations of those 
defines.

I see in my Fedora 11 Linux box that alot of those duplicates are 
defined in endian.h (although perhaps hidden by some #ifdef's) and the 
closest the macro looks for them is in machine/endian.h.

I don't know any history between those two locations or when a needed 
__USE_BSD is defined by compilers.

Chris

On 06/01/2009 05:00 PM, Alessandro Zummo wrote:
   it seems the autoconf generated byteorder.h overrides
   functions defined in the usual includes, generating
   messages like this one:

   ../include/byteorder.h:32:1: warning: htobe16 redefined
 In file included from /usr/include/sys/types.h:217,
   from /usr/include/sys/uio.h:24,
   from /usr/include/sys/socket.h:28,
   from /usr/include/netinet/in.h:25,
   from ../include/sane/sanei_tcp.h:23,
   from epson2_net.c:20:


   any suggestion?






[sane-devel] Epson PX700W/Artisan 700 network scanning

2009-05-28 Thread Chris Bagwell
On Thu, May 28, 2009 at 2:46 PM, Dominik Wnek dominalien at netscape.netwrote:

 Alessandro Zummo pisze:

 On Thu, 28 May 2009 08:43:21 +0900
 Alesh Slovak alesh.slovak at avasys.jp wrote:



 iscan limits itself to the epkowa backend, but Xsane was probably using
 the epson2 backend, which supports the necessary network protocol, but it
 seems like it doesn't have support for your particular model. Maybe
 Alessandro (epson2 backend developer) can help you here.



  If it has been detected by epson2 there are chances that we can
  make it work. I'd need a debug log.



 Hello,

 Thank you very much for your answer. I'll be more than happy to assist with
 this. Please tell me what to do.

 Best regards,

 Dominik


Before running your application (xsane, scanimage, etc), run the following
from a bash shell:

export SANE_DEBUG_EPSON2=128
export SANE_DEBUG_EPSON2_NET=128

Then run something like following to capture debug logs:

scanimage 2 scanning.log

Chris
-- next part --
An HTML attachment was scrubbed...
URL: 
http://lists.alioth.debian.org/pipermail/sane-devel/attachments/20090528/59b7f9e3/attachment.htm


[sane-devel] Warning during configuration of backends 1.0.20 on Mac OS X

2009-05-27 Thread Chris Bagwell
I see the issue now but do not know a way to fix it.  BTW, the issue is
harmless but the scary looking message is built into the tools we use and
not able to be disabled.

Anyways, reviewing sane's OS X SCSI code, I see any time they compile
something, there is a #undef VERSION that conflicts with the OS's header
files.

I don't know an easy way to undef before checking for header files.

Chris

On Tue, May 26, 2009 at 2:36 AM, George Katselis katselis at comcast.netwrote:

 Hi, Devs. I'm using Mac OS 10.5.7.9J61 on a Mac Book 2.16 C2D. I'm trying
 to compile the SANE Backends 1.0.20 from debian.org.
 During configure, this warning was displayed, with the message to report it
 to you. Hope it's helpful! If I can provide more info, please let me know.

 configure: WARNING: IOKit/scsi/SCSITaskLib.h: present but cannot be
 compiled
 configure: WARNING: IOKit/scsi/SCSITaskLib.h: check for missing
 prerequisite headers?
 configure: WARNING: IOKit/scsi/SCSITaskLib.h: see the Autoconf
 documentation
 configure: WARNING: IOKit/scsi/SCSITaskLib.h: section Present But
 Cannot Be Compiled
 configure: WARNING: IOKit/scsi/SCSITaskLib.h: proceeding with the
 preprocessor's result
 configure: WARNING: IOKit/scsi/SCSITaskLib.h: in the future, the compiler
 will take precedence
 configure: WARNING: ##
 - ##
 configure: WARNING: ## Report this to
 sane-devel at lists.alioth.debian.org ##
 configure: WARNING: ##
 - ##


 --
 sane-devel mailing list: sane-devel at lists.alioth.debian.org
 http://lists.alioth.debian.org/mailman/listinfo/sane-devel
 Unsubscribe: Send mail with subject unsubscribe your_password
to sane-devel-request at lists.alioth.debian.org

-- next part --
An HTML attachment was scrubbed...
URL: 
http://lists.alioth.debian.org/pipermail/sane-devel/attachments/20090527/bd70ee14/attachment.htm


[sane-devel] [sane-commit] [SCM] SANE backends - scanner drivers branch, master, updated. gitconversion-23-g3ba5515

2009-05-11 Thread Chris Bagwell
On 05/11/2009 12:12 AM, stef wrote:
 Le Sunday 10 May 2009 04:51:56 chris at cnpbagwell.com, vous avez ?crit :

 The following commit has been merged in the master branch:
 commit 3ba551592c3ad71f82f6b0b2e19c248cc8fe40c1
 Author: chris at cnpbagwell.comchris at cnpbagwell.com
 Date:   Sat May 9 21:50:35 2009 -0500

  Adding changelog for recent commit.

 diff --git a/ChangeLog b/ChangeLog
 index 0146403..e68983f 100644
 --- a/ChangeLog
 +++ b/ChangeLog
 @@ -1,3 +1,6 @@
 +2009-05-09 Chris Bagwellcbagwell-guest at users.alioth.debian.org
 +* */*.c: standardize including local sane include files.
 +
   2009-05-09  Nicolas Martinnicols-guest at users.alioth.debian.org
  * backend/pixma_mp150.c, doc/descriptions/pixma.desc:
  Fixed Pixma MP600 and MP600R for 2400 dpi scan, updated their
 descriptions.
  

   Hello,

   I have a couple of problems with commits regarding this entry.
   First I don't find */*.c a useful changelog entry.

Sorry, bit of laziness but hoped it read correctly in that every *.c 
file was touched in some way (at least by a sed script) and so this 
commit should be treated suspect as such.
   Second, I really think that active maintainers should be asked on the 
 sane-
 devel list before changing the code they responsible for. Then go for the
 change if there is no answer in a decent amount of time.

This is going to come up from time to time... There are housekeeping 
items I'd like to do such as these header bugfixes/cleanups (depending 
on file if its a bug), standardizing on stdint.h types when portability 
becomes an issue, etc.

I'd think this particular patch would bore people to death reading it 
but if authors prefer a heads up then not much issue from my side to 
publish diff to mailing list first.


   BTW is there any way to include the diffstat in commit messages ? I 
 think
 this would make them more readable.

I second that... I preferred the diffstat over actual diffs if thats 
possible.

Another would be to have the subject line contain diff summary instead 
of the current subject line its using.

Chris
 Regards,
   Stef


 --
 sane-devel mailing list: sane-devel at lists.alioth.debian.org
 http://lists.alioth.debian.org/mailman/listinfo/sane-devel
 Unsubscribe: Send mail with subject unsubscribe your_password
   to sane-devel-request at lists.alioth.debian.org


-- next part --
An HTML attachment was scrubbed...
URL: 
http://lists.alioth.debian.org/pipermail/sane-devel/attachments/20090511/4991afb8/attachment.htm


[sane-devel] [sane-commit] [SCM] SANE backends - scanner drivers branch, master, updated. gitconversion-23-g3ba5515

2009-05-11 Thread Chris Bagwell
Yes, I would also appreciate if confirmation or clarification when a rebase
can be used.  I probably mis-interrepted Julien's useful email to mean a
rebase only works when remote server has changes that do not affect your
local commits; else a merge is needed.

Chris

On Mon, May 11, 2009 at 8:02 AM, m. allan noah kitno455 at gmail.com wrote:

 and here we have a merge commit like julien warned about, where my
 most recent (large) commit to canon_dr shows up again in this commit.
 IIRC, we should not use git pull, but instead, get fetch and git
 rebase to prevent this?

 not directed at chris particularly, git and i dont seem to get along
 yet, either

 allan

 On Sat, May 9, 2009 at 10:51 PM, chris at cnpbagwell.com
 chris at cnpbagwell.com wrote:
  The following commit has been merged in the master branch:
  commit 07c5723cab9571524db586c3319eb40a93568107
  Merge: 4d9e8138af0f399e72599631854fa266cb18a4da
 64621621c1e3b0163dbd62d3071df028d2cf0b34
  Author: chris at cnpbagwell.com chris at cnpbagwell.com
  Date:   Sat May 9 21:40:55 2009 -0500
 
 Merge branch 'master' of ssh://
 cbagwell-guest at git.debian.org/git/sane/sane-backends
 
  diff --combined backend/canon_dr.c
  index 44cd9f3,b5d5ab3..994ee0e
  --- a/backend/canon_dr.c
  +++ b/backend/canon_dr.c
  @@@ -56,8 -56,9 +56,9 @@@
  Section 2 - sane_init, _get_devices, _open  friends
  Section 3 - sane_*_option functions
  Section 4 - sane_start, _get_param, _read  friends
  -Section 5 - sane_close functions
  -Section 6 - misc functions
  +Section 5 - calibration functions
  +Section 6 - sane_close functions
  +Section 7 - misc functions
 
  Changes:
 v1 2008-10-29, MAN
  @@@ -182,6 -183,19 +183,19 @@@
 v26 2009-04-14, MAN (SANE 1.0.20)
- return cmd status for reads on sensors
- allow rs to adjust read length for all bad status responses
  +   v27 2009-05-08, MAN
  +  - bug fix in read_panel()
  +  - initialize vars in do_usb_cmd()
  +  - set buffermode off by default
  +  - clear page counter during init and sane_start()
  +  - eject previous page during init and sane_start()
  +  - improved SSM_BUFF macros
  +  - moved set_window() to after ssm-*()
  +  - add coarse calibration (AFE offset/gain  per-channel
 exposure)
  +  - add fine calibration (per-cell offset/gain)
  +  - free image and fine cal buffers in sane_close()
  +  - compare page counter of small scanners only in non-buffered
 mode
  +  - add back-side gray mirroring code for DR-2580C


-- next part --
An HTML attachment was scrubbed...
URL: 
http://lists.alioth.debian.org/pipermail/sane-devel/attachments/20090511/b4edefd4/attachment.htm


[sane-devel] [sane-commit] [SCM] SANE backends - scanner drivers branch, master, updated. gitconversion-23-g3ba5515

2009-05-10 Thread Chris Bagwell
On 05/10/2009 01:28 PM, m. allan noah wrote:
 On Sun, May 10, 2009 at 2:22 PM, Julien BLACHEjb at jblache.org  wrote:

 Ilia Sotnikovhostcc at gmail.com  wrote:

 Hi,

  
 Could you please describe in what matter using relative paths to
 header files (eg. #include ../include/sane/sane.h) is better in
 comparision with -I../include command line option? Just to have
 cleaner picture...

 This way you don't pick up installed SANE include files in the
 standard include paths.

  

 see recent thread about freebsd build issues.

 allan


A brief summary: Using #include sane/*.h and -I for header files that 
can also be found in /usr/include is not reliable as some cpp's will 
search -I paths as last option in that case; thus preferring the 
/usr/include version.

So this is a problem with sane/sane.h and sane/saneopts.h but I also 
applied a chosen solution to all internal header files for consistency.

Chris
-- next part --
An HTML attachment was scrubbed...
URL: 
http://lists.alioth.debian.org/pipermail/sane-devel/attachments/20090510/f41c1ccf/attachment.htm


[sane-devel] sane-backends 1.0.20 Released

2009-05-04 Thread Chris Bagwell
On Mon, May 4, 2009 at 9:03 AM, Julien BLACHE jb at jblache.org wrote:

 Chris Bagwell chris at cnpbagwell.com wrote:

 Hi Chris,

  Are you referring to sane-backends?  I can't find a --enable-pthreads
  option.  Also, I tried for the first time the --enable-fork-process
  option but still had no compile issues.

 Yes, that's sane-backends and the option is actually
 --disable-fork-process (which does exactly what --enable-pthreads
 would do if it existed ;))

 It switches sanei_thread from using fork() to using pthreads for
 reader processes.


Ah, thats the part I was missing and can now reproduce.  Some of that double
negative logic in acinclude.m4 was confusing me and I thought my test on
Darwin would have fully tested it.

I can have a fix ASAP although I guess I'll need to hold off on submitting
until git is ready.

BTW, temporary work around  for those that need it: ./configure
--disable-fork-process LDFLAGS=-lpthread

Chris
-- next part --
An HTML attachment was scrubbed...
URL: 
http://lists.alioth.debian.org/pipermail/sane-devel/attachments/20090504/d66c8a8a/attachment.htm


[sane-devel] compile sane snapshot under Freebsd 7.1

2009-05-04 Thread Chris Bagwell
On Mon, May 4, 2009 at 2:22 PM, Louis Lagendijk
louis at lagendijk.xs4all.nlwrote:

 On Sat, 2009-05-02 at 15:59 -0500, Chris Bagwell wrote:

canon_dr.c picks the wrong saneopts.h (from /usr/local/sane).
 possibly
other sources do the same, but I for now simply removed the old sane
includes
   
  
   most backends seem to include the system sane files instead of the src
   ones. perhaps we should change that at some point?
  
  I didn't worry about this because I assumed our -I options should
  always force it to look for internal versions first.
 
  AM_CPPFLAGS = -I. -I$(srcdir) -I$(top_builddir)/include -I
  $(top_srcdir)/include -DLIBDIR=$(libdir)/sane
 
  Somehow your still getting -I/usr/local/include with higher priority.
  How was that specified?  ./configure CPPFLAGS=-I/usr/local/include?
 
  Can you look at what command line options are being used to compile?
  You will need to edit backend/Makefile and remove the --silent from
  $LIBTOOL.

  Generating umax1220u.conf from umax1220u.conf.in
 Generating umax.conf from umax.conf.in
 Generating umax_pp.conf from umax_pp.conf.in
 Generating v4l.conf from v4l.conf.in
 Generating xerox_mfp.conf from xerox_mfp.conf.in
 Generating dll.conf from dll.conf.in
 Generating saned.conf from saned.conf.in
 gmake  all-am
 gmake[1]: Entering directory
 `/usr/ports/graphics/sane-backends/sane-backends/backend'
 rm -f dll-s.c
 ln -s ./stubs.c dll-s.c
 /bin/sh ../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I.
 -I../include/sane -I/usr/local/include -I. -I. -I../include -I../include
 -DLIBDIR=/usr/local/lib/sane -DBACKEND_NAME=dll -D_REENTRANT
 -DPATH_SANE_CONFIG_DIR=/usr/local/etc/sane.d
 -DPATH_SANE_DATA_DIR=/usr/local/share
 -DPATH_SANE_LOCK_DIR=/usr/local/var/lock/sane -DV_MAJOR=1 -DV_MINOR=1
 -g -O2 -W -Wall -Wcast-align -Wcast-qual -Wmissing-declarations
 -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wstrict-prototypes
 -pedantic -ansi -MT libsane_la-dll-s.lo -MD -MP
 -MF .deps/libsane_la-dll-s.Tpo -c -o libsane_la-dll-s.lo `test -f
 'dll-s.c' || echo './'`dll-s.c
 mkdir .libs



The above confirms we are setting up -I options correctly.

I believe I see the issue now... We have 3 versions of including saneopts.h
in various files.

#include sane/getopts.h
#include sane/getopts.h
#include ../include/sane/getopts.h

I had trouble finding an official definition of difference between  and
but I finally found in GNU's cpp manual that  means look in -I places and
then standard system header places as a fall back.

It then says that  looks in current directory but falls back to standard
system header places.  It makes no mention of referencing -I values.  So
that seems the issue.

We need to get rid of all #include sane/getopts.h and also better to align
with just 1 way to do it such as also getting rid of all #include
sane/getopts.h as well.

I can align this soon if someone else doesn't want to take that up
themselves.
-- next part --
An HTML attachment was scrubbed...
URL: 
http://lists.alioth.debian.org/pipermail/sane-devel/attachments/20090504/39b78925/attachment-0001.htm


[sane-devel] Git repositories are up

2009-05-04 Thread Chris Bagwell
On Mon, May 4, 2009 at 12:02 PM, Julien BLACHE jb at jblache.org wrote:

 Hi,

 The git repositories for SANE are up and running on alioth.


Just had to make a submission to have an excuse to try git for the first
time.  So far I'm really liking all those commands you can do without having
to contact the server.

Perhaps an additional set of tips for us first timers trying to simulate cvs
operations.  It may save you a few minutes of searching.

- git pull is like cvs update.
- The two step operation of git commit -a followed by git push is
similar to cvs commit.
- Seems the standard protocol for commit messages is:

[ one line summary of change ]
[ empty line ]
[ multi-line description of change if required. ]

And a few possible issue that I'm sure your aware of Julien.

- I didn't receive a commit email.  Could be mail server not sending to
sender.
- I went to sane-commit archive on web page to see if it was sent.  The
archive is shown as empty.
- Sane webpage still points to cvs on download page.

Chris
-- next part --
An HTML attachment was scrubbed...
URL: 
http://lists.alioth.debian.org/pipermail/sane-devel/attachments/20090504/b279d712/attachment.htm


[sane-devel] sane-backends 1.0.20 Released

2009-05-04 Thread Chris Bagwell
On Mon, May 4, 2009 at 10:06 AM, m. allan noah kitno455 at gmail.com wrote:

 On Mon, May 4, 2009 at 11:03 AM, Julien BLACHE jb at jblache.org wrote:
  Chris Bagwell chris at cnpbagwell.com wrote:
 
  Hi,
 
  It switches sanei_thread from using fork() to using pthreads for
  reader processes.
 
  Ah, thats the part I was missing and can now reproduce.  Some of that
 double
  negative logic in acinclude.m4 was confusing me and I thought my test on
  Darwin would have fully tested it.
 
  Yes, it's a bit convoluted, isn't it? :) If you feel like adding a
  --enable-pthreads instead, feel free ;)

 yes- i was just going to say- lets drop --disable-fork and add
 --enable-pthreads instead.


OK, thats what I did.  Also, I changed things so that if --disable-pthread
is specified that we do not needlessly link in -lpthread or set the CPPFLAGS
to re-entrant.  I would appreciate a quick glance by someone to make sure I
didn't get any logic wrong.

Here's to hoping my first commit with git went well.

Chris
-- next part --
An HTML attachment was scrubbed...
URL: 
http://lists.alioth.debian.org/pipermail/sane-devel/attachments/20090504/458e0321/attachment.htm


[sane-devel] compile sane snapshot under Freebsd 7.1

2009-05-02 Thread Chris Bagwell
I'm very glad to hear someone was able to test under FreeBSD.  Thats the 
main platform I do not have access to.  Really need to set up a qemu 
image some day.

Replies below.

On 05/02/2009 11:14 AM, m. allan noah wrote:
 On Sat, May 2, 2009 at 11:49 AM, Louis Lagendijk
 louis at lagendijk.xs4all.nl  wrote:

 - libgphoto2 is not found, solved it temporarily by adding
 ${GPHOTO2_LDFLAGS} to the end of the GPHOTO2_LIBS line. I know this is
 an ugly hack


 Maybe Chris can chime in on that one?

Agree its an issue.  Got a working patch I'll submit.  Also, need a 
related update to sane-config.in.   I'll test a little more and submit 
tomorrow.

 canon_dr.c picks the wrong saneopts.h (from /usr/local/sane). possibly
 other sources do the same, but I for now simply removed the old sane
 includes
  

 most backends seem to include the system sane files instead of the src
 ones. perhaps we should change that at some point?

I didn't worry about this because I assumed our -I options should always 
force it to look for internal versions first.

AM_CPPFLAGS = -I. -I$(srcdir) -I$(top_builddir)/include 
-I$(top_srcdir)/include -DLIBDIR=$(libdir)/sane

Somehow your still getting -I/usr/local/include with higher priority.  
How was that specified?  ./configure CPPFLAGS=-I/usr/local/include?

Can you look at what command line options are being used to compile?  
You will need to edit backend/Makefile and remove the --silent from 
$LIBTOOL.


 tools/sane-find-scanner: -lcam missing (added a ${SCSI_LIB} to the LD
 line
  

 ok. Chris? :)

Agree its missing.  I'll submit patch by tomorrow.

Chris

 Please let me know if more information is needed

 Louis


 p.s. the pixma stuff works in first very quick test
  

 allan


-- next part --
An HTML attachment was scrubbed...
URL: 
http://lists.alioth.debian.org/pipermail/sane-devel/attachments/20090502/8a99125a/attachment.htm


[sane-devel] sane-backends now in feature freeze

2009-04-19 Thread Chris Bagwell
On Sun, Apr 19, 2009 at 2:49 PM, m. allan noah kitno455 at gmail.com wrote:

 It would also be helpful if folks could attempt to build the current
 sources on any uncommon platforms they have access to, so we can shake
 out any build system or compiler issues.


FYI: I compiled latest CVS successfully with Fedora 11 (beta), Solaris
10+gcc, Cygwin, and Mac OSX (no libusb).   Testing was limited to cd
testsuite; make test.local.

Chris
-- next part --
An HTML attachment was scrubbed...
URL: 
http://lists.alioth.debian.org/pipermail/sane-devel/attachments/20090419/74800347/attachment.htm


[sane-devel] Error during compile

2009-03-24 Thread Chris Bagwell
[scratching my head] Hmmm, how'd that obvious issue not show up on my 
system?

I've just committed to CVS a fix to stop looking at the template files 
when generating the HTML pages.  Can you update and try again?

Chris

carterbueford at gmx.net wrote:
 Hi everybody,

 I get the following error during compiling the cvs-snapshot:

 Generating manpage scanimage.1...
 Generating manpage sane-config.1...
 Generating manpage sane-find-scanner.1...
 Generating manpage gamma4scanimage.1...
 Generating manpage sane.7...
 Generating manpage saned.8...
 make[1]: *** No rule to make target `descriptions/template.desc.', needed by
 `sane-backends.html'.  Stop.
 make[1]: Leaving directory `/opt/saned/sane-backends/doc'
 make: *** [all-recursive] Error 1


 Any idea what is meant by that??

 Thank
 Oliver



   




[sane-devel] Mac OS X: configure script errors

2009-03-24 Thread Chris Bagwell
Yes, I've seen similar issues in all autotools projects.  I've seen it most
on Mac's as well (don't know if its limited to just that platform though)...
The configure scripts don't seem to cope well with spaces in directory
names.

Not much can be done about this short of fixing the autotools.

Chris

On Tue, Mar 24, 2009 at 10:58 AM, Peter Schoenrank peter at 
schoenrank.cawrote:

 I am using Mac OS X 10.5.6 on an Intel iMac. When I do

 $ mkdir ~/Desktop/scanning\ from\ the\ command\ line
 $ cd ~/Desktop/scanning\ from\ the\ command\ line
 $ curl 'http://alioth.debian.org/snapshots.php?group_id=30186'  sane-
 scm-latest.tar.gz
 $ open sane-scm-latest.tar.gz
 $ cd sane-scm-2009-03-24/sane-backends
 $ export BACKENDS=pixma canon
 $ ./configure --build=x86-apple-osx

 I get

 checking for a BSD-compatible install... /usr/bin/install -c
 checking whether build environment is sane... yes
 /bin/sh: /Users/cps/Desktop/scanning: No such file or directory
 configure: WARNING: `missing' script is too old or missing

 It would seem that some part of configure is not coping with
 ~/Desktop/scanning\ from\ the\ command\ line
 having spaces in its name.


 Peter

 -
 Peter Schoenrank
 mailto: peter at schoenrank.ca
 phone: 250-655-6753


 --
 sane-devel mailing list: sane-devel at lists.alioth.debian.org
 http://lists.alioth.debian.org/mailman/listinfo/sane-devel
 Unsubscribe: Send mail with subject unsubscribe your_password
 to sane-devel-request at lists.alioth.debian.org

-- next part --
An HTML attachment was scrubbed...
URL: 
http://lists.alioth.debian.org/pipermail/sane-devel/attachments/20090324/7ced72ed/attachment.htm
 


[sane-devel] Mac OS X: Report this ...

2009-03-24 Thread Chris Bagwell
Based on your config.log from other email, its failing during check with
this error message:

configure:17246: checking IOKit/scsi/SCSITaskLib.h usability
configure:17263: gcc -c -g -O2 -W -Wall -Wcast-align -Wcast-qual
-Wmissing-declarations -Wmissing-prototypes -Wpointer-arith
-Wreturn-type -Wstrict-prototypes -pedantic -ansi  -D_REENTRANT
conftest.c 5
In file included from
/System/Library/Frameworks/IOKit.framework/Headers/scsi/SCSITaskLib.h:29,
 from conftest.c:136:
/System/Library/Frameworks/IOKit.framework/Headers/scsi/SCSICmds_INQUIRY_Definitions.h:70:
error: syntax error before string constant
/System/Library/Frameworks/IOKit.framework/Headers/scsi/SCSICmds_INQUIRY_Definitions.h:80:
error: syntax error before '}' token
/System/Library/Frameworks/IOKit.framework/Headers/scsi/SCSICmds_INQUIRY_Definitions.h:81:
error: syntax error before '*' token
/System/Library/Frameworks/IOKit.framework/Headers/scsi/SCSICmds_INQUIRY_Definitions.h:91:
error: syntax error before string constant
/System/Library/Frameworks/IOKit.framework/Headers/scsi/SCSICmds_INQUIRY_Definitions.h:109:
error: syntax error before '}' token
In file included from conftest.c:136:
/System/Library/Frameworks/IOKit.framework/Headers/scsi/SCSITaskLib.h:594:
error: syntax error before 'SCSICmd_INQUIRY_StandardData'
configure:17270: $? = 1

So it looks like that header file is not self-supporting.  Don't know what
else needs to be included first to get rid of failure.

I have only occasional access to a Mac and developer docs so can't easily
debug.

For the most part, this message can be ignored though since its a warning.

Chris

On Tue, Mar 24, 2009 at 11:07 AM, Peter Schoenrank peter at 
schoenrank.cawrote:

 I am using Mac OS X 10.5.6 on an Intel iMac

 When I run the configure script, I get

 .
 .
 .
 configure: WARNING: IOKit/scsi/SCSITaskLib.h: present but cannot be
 compiled
 configure: WARNING: IOKit/scsi/SCSITaskLib.h: check for missing
 prerequisite headers?
 configure: WARNING: IOKit/scsi/SCSITaskLib.h: see the Autoconf
 documentation
 configure: WARNING: IOKit/scsi/SCSITaskLib.h: section Present But
 Cannot Be Compiled
 configure: WARNING: IOKit/scsi/SCSITaskLib.h: proceeding with the
 preprocessor's result
 configure: WARNING: IOKit/scsi/SCSITaskLib.h: in the future, the
 compiler will take precedence
 configure: WARNING: ##
 - ##
 configure: WARNING: ## Report this to
 sane-devel at lists.alioth.debian.org
  ##
 configure: WARNING: ##
 - ##
 .
 .
 .


 Peter

 -
 Peter Schoenrank
 mailto: peter at schoenrank.ca
 phone: 250-655-6753


 --
 sane-devel mailing list: sane-devel at lists.alioth.debian.org
 http://lists.alioth.debian.org/mailman/listinfo/sane-devel
 Unsubscribe: Send mail with subject unsubscribe your_password
 to sane-devel-request at lists.alioth.debian.org

-- next part --
An HTML attachment was scrubbed...
URL: 
http://lists.alioth.debian.org/pipermail/sane-devel/attachments/20090324/fd537459/attachment-0001.htm
 


[sane-devel] Mac OS X: make errors

2009-03-24 Thread Chris Bagwell
OK, I have to stick with build issue myself... Sorry, can't help with USB
issues.  I have only 1 addition suggestion.  Try running configure with
--prefix=/usr/local/testsane to have it installed in a custom location.

I've not fully followed in the other threads if you've ever install a
previous copy of sane into the prefix /usr/local... but perhaps libsane is
loading some older version of your backend that has these USB issues.

Anyways, the --prefix idea can only help I think... but likely is not your
issue.

Chris

On Tue, Mar 24, 2009 at 4:24 PM, Peter Schoenrank peter at schoenrank.cawrote:

 On 09-Mar-24, at 11:22, Chris Bagwell wrote:

 This still results in the warnings about IOKit/scsi/SCSITaskLib.h that I
 previously posted, but as Chris suggested, I ignored those because my
 scanner is USB not SCSI.

 $ make check  makecheck.log
 $ make  make.log
 $ sudo make install  makeinstall.log
 $ sane-find-scanner  sane-find-scanner.log

 found USB scanner (vendor=0x04a9 [Canon], product=0x172c [MX850 series]) at
 libusb:007:002-04a9-172c-00-00

 $ scanimage -L  scanimage-L.log

 device `pixma:04A9172C_21B0DA' is a CANON Canon PIXMA MX850 multi-function
 peripheral

 $ export SANE_DEBUG_SANEI_USB=255
 $ export SANE_DEBUG=255
 $ export SANE_DEBUG_PIXMA=20
 $ scanimage -d pixma:04A9172C_21B0DA -T  scanimage.log

 And now I am back to where I was on Saturday: scanimage hangs.

 For those who care,

 config.log
 configure.log
 makecheck.log
 make.log
 makeinstall.log
 sane-find-scanner.log
 scanimage-L.log
 scanimage.log

 are available at
 http://members.shaw.ca/schoenrank.ca/sane-scm-2009-03-24.2/



 Peter
 -
 Peter Schoenrank
 mailto: peter at schoenrank.ca
 phone: 250-655-6753



-- next part --
An HTML attachment was scrubbed...
URL: 
http://lists.alioth.debian.org/pipermail/sane-devel/attachments/20090324/59b136b4/attachment.htm
 


[sane-devel] Segmentation Fault

2009-03-03 Thread Chris Bagwell
2009/3/3 Russell King rjkfsm at gmail.com

 Well, I tried that and xsane now complains that it needs sane-backends
 1.0.0 or higher.

 To get here, I had to unmerge sane-backends, sane-frontends and xsane, then
 to keep portage from bashing them, I masked them. I then downloaded the
 source for sane-backends and compiled it. That went fine and when I tried
 the same with xsane, I get:

 ERROR: SANE-1.0.0 or newer is needed for compiling xsane
  - if you installed SANE as rpm make sure you also included
sane-devel


I just did some limited testing with current CVS and xsane- 0.996 and had
success.  Note: I found an additional typo in sane-config and just submitted
a fix to CVS.  You'll want to update again.

Your error message above is because xsane can not find the sane-config of
your CVS sane-backends.  Step I did are similar to following:

cd sane-backend
./configure --prefix=/usr/local/sane
make; make install

export PATH=/usr/local/sane/bin:$PATH
cd /path/to/src/xsane-0.996
cd src
vi xsane-backend-gtk.c
comment out all of if(SANE_CAPS_ALWAYS_SETTABLE) at lines 2615-2618 as its
not documented by SANE1 API and not in current CVS... It was in sane-1.0.19
for what ever reasons but only used by qcam and v4l  backends. I'm sure
you'll not notice reduced functionality.
cd ..
./configure --prefix=/usr/local/xsane LDFLAGS=-L/usr/local/sane/lib
CPPFLAGS=-I/usr/local/sane/include
make; make install

/usr/local/xsane/bin/xsane
-- next part --
An HTML attachment was scrubbed...
URL: 
http://lists.alioth.debian.org/pipermail/sane-devel/attachments/20090303/c081e1d2/attachment.htm
 


[sane-devel] broken sane-config in sane-backends version 1.1.0

2009-03-02 Thread Chris Bagwell
Olaf Meeuwissen wrote:
 szukw000 at arcor.de writes:
 I had to make some changes to get a working 'sane-config'. The result:

 LIBS=  -lgphoto2 -lgphoto2_port -lexif -lm -lusb -ldl
 @GPHOTO2_LDFLAGS@ is empty

 I do not know whether this is sufficient. sane-backends-1.0.19 has a
 longer list for LIBS:

 LIBS=-lusb -lpthread -lm  -ljpeg -ltiff -lieee1284  -lgphoto2 -lgphoto2_port 
 -lexif -lm -lusb -ldl

   

OK, thanks for report... I submitted a version of your patches and now I 
get basically same as 1.0.19:

LIBS= -ldl -lv4l1 -lv4l2 -lv4lconvert   -lm -ltiff -ljpeg  -lgphoto2 
-lgphoto2_port -lexif -lm -lusb   -lusb 

TODO: We should really strip out duplicates libraries...

TODO2: I don't think that LIBS in most systems should really contain 
*ANY* values because libsane.so is just libsane-dll.so and doesn't 
contain any code that requires linking to that stuff.  When you dlopen a 
backend, it also loads its dependencies that were linked into it as 
needed, right?  In that case, sane-config's LIBS should be built based 
on only whats in PRELOAD_BACKENDS (normally nothing).

Chris



[sane-devel] Build system issues.

2009-02-28 Thread Chris Bagwell
On Thu, Feb 26, 2009 at 10:07 PM, m. allan noah kitno455 at gmail.com wrote:

 On Thu, Feb 26, 2009 at 11:00 PM, Chris Bagwell chris at cnpbagwell.com
 wrote:
  m. allan noah wrote:
 
  On Thu, Feb 26, 2009 at 9:46 PM, Chris Bagwell chris at cnpbagwell.com
  wrote:

  Here is an idea to explore... Is there any change your RPM package is
  replacing ltmain.sh or libtool when it was compiled?  I could see how
  ldconfig might behavior like your seeing if 1.0.19 backends were
 installed
  with soname's of the form libsane-backend.so.1 but your 1.1.0 backends
  were installed with soname's of the form libsane.so.1.
 

 Its not 'my' rpm- it is the distro's rpm, which happens to be: Fedora
 10, tada! Now you can test it too :)


Yep, that appears to be the issue... at least at first glance.  This line is
in Fedora 10's spec file:

 # We patched configure.in, so regenerate configure.
autoreconf --install --force

They should remove that --force option so as not to overwrite our patched
ltmain.sh.  So using Fedora RPM's and then installing on top with source
package will have the unwanted behavior you are seeing.

I'll bugzilla that when I have a moment.

Chris
-- next part --
An HTML attachment was scrubbed...
URL: 
http://lists.alioth.debian.org/pipermail/sane-devel/attachments/20090228/d530d0dd/attachment.htm
 


[sane-devel] build system issue installing config files

2009-02-28 Thread Chris Bagwell
On Sat, Feb 28, 2009 at 3:41 PM, Louis Lagendijk
louis at lagendijk.xs4all.nlwrote:

 hi
 In order to better keep track of what I installed, I am trying to build
 an RPM package for Sane on my Fedora 10 box.
 This fails as the config files do not get installed. This seems to be
 caused by the install-becfg target in backend/Makefile.am

 `/home/home1/louis/rpm/BUILD/sane-backends-1.1.0.cvs/backend'
 rm
 -f
 /home/home1/louis/rpm/BUILDROOT/sane-backends-1.1.0.cvs-12.fc10.x86_64/usr/lib64/sane/libsane.*
 test -z /etc/sane.d || /bin/mkdir -p /etc/sane.d
 test -z /etc/sane.d/dll.d || /bin/mkdir -p /etc/sane.d/dll.d
 NOT overwriting abaton.conf in /etc/sane.d...
 NOT overwriting agfafocus.conf in /etc/sane.d...
 NOT overwriting apple.conf in /etc/sane.d...


 I have no idea where to look for the cause. Or am I missing something
 obvious? In the makefile I see that the install-becfg is triggered by
 install-dat-hook, which in its turn is called by install-data-am which
 does  $(MAKE) $(AM_MAKEFLAGS) install-data-hook. So is DESTDIR missing
 from AM_MAKEFLAGS? I am afraid I do not know enough of autoconf to
 understand all logic involved. Suggestions?


Hmmm, I've not had time to work on Fedora's spec file but it will need some
changes to work with at least this automake change.  The recommended
practice is for the spec file to pass in the value of DESTDIR; its not
sane-backends that sets it.  If Fedora spec would have done that then we'd
have been OK.

In their spec file look for:

%{makeinstall} docdir=%{buildroot}/%{_docdir}/%{name}-%{version}

replace that with more recommend practice of:

make DESTDIR=%{buildroo} docdir=%{buildroot}/%{_docdir}/%{name}-%{version}
install

If that gives you problems, then try the following:

%{makeinstall} configdir=%{docdir=%{buildroot}/%{_docdir}/%{name}-%{version}
configdir=%{buildroot}/etc/sane.d



 As a side-note: RPM barfs when a package name has more than one dash in
 it. Would it be possible to change the package version in configure.in
 so it does not contain a dash, e.g. to 1.1.0cvs?


Yep, I run into the same issue.  I tend to modify configure.in though and
change version # to 1.0.99 (and remove the -cvs) so that if/when Fedora
upgrades their RPM's, my custom RPM will not look newer.

Not sure if others on list feel its OK to remove the dash from -cvs to
help RPM people out in general though?

Chris




 thanks in advance for the help
 Louis/insta


 --
 sane-devel mailing list: sane-devel at lists.alioth.debian.org
 http://lists.alioth.debian.org/mailman/listinfo/sane-devel
 Unsubscribe: Send mail with subject unsubscribe your_password
 to sane-devel-request at lists.alioth.debian.org

-- next part --
An HTML attachment was scrubbed...
URL: 
http://lists.alioth.debian.org/pipermail/sane-devel/attachments/20090228/2e1511d9/attachment-0001.htm
 


  1   2   >