getting sane 0.72 going on solaris 2.6...

Michael Polo (mikep@Polo.NET)
Thu, 9 Apr 1998 04:42:33 -0700

I made a few small changes to get things compiled with gcc...

IMHO, I think the '@' lines in the Makefiles should have the '@'
removed to allow better debugging. I thought gcc was crapping out and
it turned out that it was actually within libtool that the problems
were occurring. (/usr/bin/printf was seg faulting, replacing it with
/usr/ucb/echo fixed it)

IMHO #2 - we should include a saned.conf file (at least an empty one
with a description) - I had to use 'truss' and dig through the
documentation to find out it was needed.

The patched lines are included below.

To build:

make sure free scg driver is installed before configure.
~> cd sane-0.72
~/sane-0.72> setenv SANE_BUILD_ECHO=/usr/ucb/echo
~/sane-0.72> export SANE_BUILD_ECHO
~/sane-0.72> ./configure; gmake ; gmake install

To configure it (I actually configured it for network
scanning which works great!)

/usr/local/etc/sane.d/dll.conf:
uncomment '#net' entry
comment out everything else but 'umax' line (I have a umax scanner)

/usr/local/etc/sane.d/net.conf
add host name of system with scanner

/usr/local/etc/sane.d/umax.conf
change '/dev/scanner' to /dev/scg0e
(symbolic links for /dev/scanner never seemed to work)

/usr/local/etc/sane.d/saned.conf
add host name of remote system

I just rdisted /usr/local to both systems and things work
great.

I had to add this line to /etc/services on both systems:
saned 6566/tcp

and I added this line to /etc/inet/inetd.conf on the system
with the scanner:

saned stream tcp nowait root /usr/local/sbin/saned saned

(I should study security problems with this, but...)

on the remote system:
~> cd ~/.gimp/plug-ins
~/.gimp/plug-ins> ln -s /usr/local/bin/xscanimage .

and that will get xscanimage working as a plug-in

Hope this helps!

Mike

~> /usr/local/bin/gnu/diff -ru sane-0.72 sane-0.72-orig
diff -ru sane-0.72/ltconfig sane-0.72-orig/ltconfig
--- sane-0.72/ltconfig Thu Apr 9 02:08:38 1998
+++ sane-0.72-orig/ltconfig Thu Apr 2 23:25:40 1998
@@ -29,7 +29,7 @@
# if CDPATH is set.
if test "${CDPATH+set}" = set; then CDPATH=; export CDPATH; fi

-echo=${SANE_BUILD_ECHO:-echo}
+echo=echo
if test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then :
else
# The Solaris and AIX default echo program unquotes backslashes.
diff -ru sane-0.72/sanei/sanei_pio.c sane-0.72-orig/sanei/sanei_pio.c
--- sane-0.72/sanei/sanei_pio.c Thu Apr 9 02:08:53 1998
+++ sane-0.72-orig/sanei/sanei_pio.c Mon Apr 6 21:49:44 1998
@@ -522,12 +522,13 @@

#else /* !HAVE_IOPERM */

-SANE_Status
-sanei_pio_open (const char *dev, int *fdp)
+int
+sanei_pio_open (const char *dev, SANE_Status * status)
{
- *fdp = -1;
- return SANE_STATUS_INVAL;
+ *status = SANE_STATUS_INVAL;
+ return -1;
}
+

void
sanei_pio_close (int fd)

--
Source code, list archive, and docs: http://www.mostang.com/sane/
To unsubscribe: echo unsubscribe sane-devel | mail majordomo@mostang.com