[sane-devel] Re: Darwin/MacOSX
Karl Heinz Kremer
khk@khk.net
Thu, 28 Nov 2002 07:21:29 -0500
--jRHKVT23PllUwdXP
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
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=20
> >anything
> >yet.
> >
>=20
> 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 :-)
>=20
> Note that a dlopen compatibility library is needed, I suggest using=20
> dlcompat <http://www.opendarwin.org/projects/dlcompat>, but I am a=20
> 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?=20
Which frontends are you using? I am having problems with the preview
areas in both Xsane and xscanimage.
>=20
>=20
> Here is my patch in full (watch for line wrapping) also attached as a=20
> .gz:
>=20
> diff -Naur sane-backends-1.0.9.orig/backend/Makefile.in=20
> sane-backends-1.0.9/backend/Makefile.in
> --- sane-backends-1.0.9.orig/backend/Makefile.in Sun Sep 1=20
> 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
>=20
> %-s.lo: %-s.c
> @$(LIBTOOL) $(MCOMP) $(COMPILE) -DSTUBS -DBACKEND_NAME=3D$* $<
> diff -Naur sane-backends-1.0.9.orig/backend/dll.c=20
> 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 =3D getenv ("LD_BIND_NOW") ? RTLD_NOW : RTLD_LAZY;
> #elif defined(HAVE_SHL_LOAD)
> diff -Naur sane-backends-1.0.9.orig/configure=20
> 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=20
> mangles
> # `"' quotes if we put them in here... so don't!
> - archive_cmds=3D'$nonopt $(test .$module =3D .yes && echo -bundle ||=
=20
> echo -dynamiclib) $allow_undefined_flag -o $lib $libobjs=20
> $deplibs$linker_flags -install_name $rpath/$soname $verstring'
> + archive_cmds=3D'$nonopt $(test .$module =3D .yes && echo -bundle ||=
=20
> echo -dynamiclib) $allow_undefined_flag -o $lib $libobjs=20
> $deplibs$linker_flags $(test .$module =3D .yes || (echo -install_name=20
> $rpath/$soname $verstring))'
> # We need to add '_' to the symbols in $export_symbols first
> #archive_expsym_cmds=3D"$archive_cmds"' && strip -s $export_symbols'
> hardcode_direct=3Dyes
> diff -Naur sane-backends-1.0.9.orig/sanei/sanei_usb.c=20
> 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 =3D address;
> + devices[devcount].bulk_in_ep =3D =20
> 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 =3D address;
> + devices[devcount].bulk_out_ep =3D =20
> endpoint->bEndpointAddress;
> }
> }
> #else /* not HAVE_LIBUSB */
>=20
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.=20
I am using Darwin 10.2.1, and should probably test it with 10.2.2 again.
Karl Heinz
--=20
Karl Heinz Kremer khk@khk.net
PGP Key at http://www.khk.net/download/khk.asc
EPSON Sane Backend: http://www.khk.net
--jRHKVT23PllUwdXP
Content-Type: application/pgp-signature
Content-Disposition: inline
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)
iD8DBQE95gpJxejv3RfKrhsRAt+MAJ9/L3tZzPbI1XqufNlJ8stWUxnpOwCfa5cE
aGBEHqQUvStCs7PgRR9PeT0=
=br5S
-----END PGP SIGNATURE-----
--jRHKVT23PllUwdXP--