[sane-devel] Re: Darwin/MacOSX

Karl Heinz Kremer khk at khk.net
Thu Nov 28 12:21:29 GMT 2002


On Thu, Nov 28, 2002 at 09:12:03PM +0900, Peter O'Gorman wrote:
[ ... ]
> >under OS X. Henning asked for more information, but I have not seen 
> >anything
> >yet.
> >
> 
> Okay, okay, I get the message :)

This was quick. It was not my intention to put this preassure on you,
I was just stating the facts :-)

> 
> Note that a dlopen compatibility library is needed, I suggest using 
> dlcompat <http://www.opendarwin.org/projects/dlcompat>, but I am a 
> little biased :)

Why do you need this library? I am able to load the backends without
this (at least I am not aware of dlcmpat being installed on my system).
What are the symptoms if you don't have this? 

Which frontends are you using? I am having problems with the preview
areas in both Xsane and xscanimage.

> 
> 
> Here is my patch in full (watch for line wrapping) also attached as a 
> .gz:
> 
> diff -Naur sane-backends-1.0.9.orig/backend/Makefile.in 
> sane-backends-1.0.9/backend/Makefile.in
> --- sane-backends-1.0.9.orig/backend/Makefile.in        Sun Sep  1 
> 22:46:53 2002
> +++ sane-backends-1.0.9/backend/Makefile.in     Sun Nov 24 19:40:38 2002
> @@ -139,7 +139,7 @@
>  libsane-%.la: %.lo %-s.lo $(EXTRA) $(LIBOBJS)
>         @$(LIBTOOL) $(MLINK) $(CC) -export-dynamic -o $@ $($*_LIBS) \
>         $(LDFLAGS) $(BACKENDLIBS) $^ -rpath $(libsanedir) \
> -       -version-info $(V_MAJOR):$(V_REV):$(V_MINOR)
> +       -version-info $(V_MAJOR):$(V_REV):$(V_MINOR) -module
> 
>  %-s.lo:        %-s.c
>         @$(LIBTOOL) $(MCOMP) $(COMPILE) -DSTUBS -DBACKEND_NAME=$* $<
> diff -Naur sane-backends-1.0.9.orig/backend/dll.c 
> sane-backends-1.0.9/backend/dll.c
> --- sane-backends-1.0.9.orig/backend/dll.c      Sun Apr 21 23:13:40 2002
> +++ sane-backends-1.0.9/backend/dll.c   Sun Nov 24 19:40:38 2002
> @@ -267,7 +267,11 @@
>  # ifdef __hpux
>  #   define POSTFIX ".sl.%u"
>  # else
> +#  ifdef __APPLE__
> +#   define POSTFIX ".%u.so"
> +#  else
>  #   define POSTFIX ".so.%u"
> +#  endif
>  # endif
>    mode = getenv ("LD_BIND_NOW") ? RTLD_NOW : RTLD_LAZY;
>  #elif defined(HAVE_SHL_LOAD)
> diff -Naur sane-backends-1.0.9.orig/configure 
> sane-backends-1.0.9/configure
> --- sane-backends-1.0.9.orig/configure  Wed Oct 23 05:19:22 2002
> +++ sane-backends-1.0.9/configure       Sun Nov 24 19:40:38 2002
> @@ -6571,7 +6571,7 @@
>      #        cross-compilation, but unfortunately the echo tests do not
>      #        yet detect zsh echo's removal of \ escapes.  Also zsh 
> mangles
>      #       `"' quotes if we put them in here... so don't!
> -    archive_cmds='$nonopt $(test .$module = .yes && echo -bundle || 
> echo -dynamiclib) $allow_undefined_flag -o $lib $libobjs 
> $deplibs$linker_flags -install_name $rpath/$soname $verstring'
> +    archive_cmds='$nonopt $(test .$module = .yes && echo -bundle || 
> echo -dynamiclib) $allow_undefined_flag -o $lib $libobjs 
> $deplibs$linker_flags $(test .$module = .yes || (echo -install_name 
> $rpath/$soname $verstring))'
>      # We need to add '_' to the symbols in $export_symbols first
>      #archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols'
>      hardcode_direct=yes
> diff -Naur sane-backends-1.0.9.orig/sanei/sanei_usb.c 
> sane-backends-1.0.9/sanei/sanei_usb.c
> --- sane-backends-1.0.9.orig/sanei/sanei_usb.c  Sat Oct 12 20:06:05 2002
> +++ sane-backends-1.0.9/sanei/sanei_usb.c       Sun Nov 24 19:41:34 2002
> @@ -542,7 +542,7 @@
>                      "(address: %d), ignoring the new one\n",
>                      devices[devcount].bulk_in_ep);
>               else
> -               devices[devcount].bulk_in_ep = address;
> +               devices[devcount].bulk_in_ep =  
> endpoint->bEndpointAddress;
>             }
>           else
>             {
> @@ -551,7 +551,7 @@
>                      "(address: %d), ignoring the new one\n",
>                      devices[devcount].bulk_out_ep);
>               else
> -               devices[devcount].bulk_out_ep = address;
> +               devices[devcount].bulk_out_ep =  
> endpoint->bEndpointAddress;
>             }
>         }
>  #else /* not HAVE_LIBUSB */
> 

I only had to change the endpoint stuff in sanei_usb.c. I can talk to
my scanner and actually start a scan, but the communication hangs when
the scanner expects the acknowledge message after sending the first
batch of data (about 18KB). This is with an EPSON Perfection 600. 
I am using Darwin 10.2.1, and should probably test it with 10.2.2 again.

Karl Heinz


-- 
Karl Heinz Kremer                                  khk at khk.net
PGP Key at                 http://www.khk.net/download/khk.asc
EPSON Sane Backend:                         http://www.khk.net
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/sane-devel/attachments/20021128/91b93cdc/attachment.sig>


More information about the sane-devel mailing list