Re: sane 0.72 compilation under Solaris x86

Michael Polo (mikep@Polo.NET)
Tue, 21 Apr 1998 16:21:26 -0700

Hi Andreas,

Sorry, you only patched sanei_pio.c. You forgot the second part
of the patch.

if you cd to the sane directory and just copy and paste the lines
below, you'll get a fixed version of ltconfig. You have to rerun the
config scripts so that a new version of libtool will be generated,
like this:

SANE_BUILD_ECHO=/usr/ucb/echo
export SANE_BUILD_ECHO
./configure; gmake ; gmake install

The problem is with /bin/printf. libtool requires a version of
echo that doesn't do wierd substitution. for solaris, this turns
out to be;

printf "%s\n" <string>

changing this to

/usr/ucb/echo <string>

works too.

I haven't been able to track down why it craps out. Sun should
probably get a bug report out of it, but it might really be a problem
with libtool trying to pass something wierd to printf.

Anyway, apply this patch, it should fix things.

Does anyone have an idea on how to elegantly fix things in ltconfig
for solaris 2.6, then get the changes back into libtool?

Mike

#!/bin/sh
/bin/patch -bc -p 0 <<'EOF'
*** ltconfig-orig Thu Apr 2 23:25:40 1998
--- ltconfig Fri Apr 10 12:00:31 1998
***************
*** 29,35 ****
# if CDPATH is set.
if test "${CDPATH+set}" = set; then CDPATH=; export CDPATH; fi

! echo=echo
if test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then :
else
# The Solaris and AIX default echo program unquotes backslashes.
--- 29,35 ----
# if CDPATH is set.
if test "${CDPATH+set}" = set; then CDPATH=; export CDPATH; fi

! echo=${SANE_BUILD_ECHO:-echo}
if test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then :
else
# The Solaris and AIX default echo program unquotes backslashes.
EOF

> Hi!
>
> I have a problem compiling and installing sane-0.72 under solaris x86 2.6
>
> I use gtk 1.0.0 & gimp 0.99.27 & gcc 2.7.2.2 & sane-0.72 (including
> the patch from Michael Polo to sanei_pio.c)
>
> I used the following commans to build sane:
>
> setenv CPPFLAGS -I/opt/include -L/opt/lib
> setenv MAKE /opt/bin/make
> ./configure --prefix=/opt
> /opt/bin/make
> /opt/bin/make install
>
> The last steps breaks with the following messages:
>
> make[1]: Entering directory `/home/install/sane-0.72/frontend'
> ../mkinstalldirs /opt/bin /opt/sbin /opt/share
> .././install-sh -c scanimage /opt/bin/scanimage
> .././install-sh -c xscanimage /opt/bin/xscanimage
> ../libtool: syntax error at line 105: `fi' unexpected
> make[1]: *** [install] Error 2
> make[1]: Leaving directory `/home/install/sane-0.72/frontend'
> make: *** [install-recursive] Error 1
> Exit 2
>
> On further inspection, make scanimage & xscanimage die with an
> Segmentation Fault:
>
> gcc -L/usr/openwin/lib -o .libs/scanimage scanimage.o -R/opt/lib
> ../backend/.libs/libsane.so -L/usr/openwin/lib ../lib/liblib.a -ldl -lsocket
> -lnsl -lintl -lm
> creating scanimage
> Segmentation Fault
>
> gcc -L/usr/openwin/lib -o .libs/xscanimage xscanimage.o progress.o preview.o
> preferences.o gtkglue.o ../sanei/libsanei.a -R/opt/lib
> ../backend/.libs/libsane.so -L/usr/openwin/lib ../lib/liblib.a -lgimp -lgtk
> -lgdk -lXi -lglib -lXext -lX11 -ldl -lsocket -lnsl -lintl -lm
> creating xscanimage
> Segmentation Fault
>
> Is this normal ?
>
> Executing scanimage yields the following result:
>
> /opt/bin/scanimage: X/../backend/.libs:/usr/openwin/lib:/opt/X11R6/lib/X11:/opt
> /lib: not found
> /opt/bin/scanimage: -e: not found
> /opt/bin/scanimage: /opt/bin/scanimage: cannot exec : not found
> Exit 1
>
> Any Suggestions would be greatly appreciated.
>
> Andreas Graevinghoff
> FernUniversitaet Hagen
>
> I forgot to mention that the scg driver is installed on this machine
> (configure regocnizes the corresponding .h file) and findscanner is
> able to find my scanner.
>
>
>
>
>
>
>
>
>
> --
> Source code, list archive, and docs: http://www.mostang.com/sane/
> To unsubscribe: echo unsubscribe sane-devel | mail majordomo@mostang.com
>

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