[sane-devel] Re: strange rattle in epson 610 / compile problem 1.0.14 on slackware 9.1

Kees Lemmens C.W.J.Lemmens@ewi.tudelft.nl
Sat, 19 Jun 2004 15:48:11 +0200


Hi,

My problem compiling sane-1.0.14 under Slackware 9.1 is solved :

Someone added gphoto2 to the default libraries since 1.0.14 !

However, "configure" found libgphoto2 because of an old gphoto2-config in
/usr/local/bin but WASN'T able to find libgphoto2.so at compile time !
This made the test compilation for getenv, strdup and others fail, thereby
making it completely impossible to install the backends.

What should be improved IMO :

configure should only decide to use libgphoto2 if it is able to compile and
link a program using these libraries and it should disable gphoto2 in all
other cases. Relying on the presence of gphoto2-config is not enough IMO.

For now I configured using :

./configure --prefix=/opt/sane-1.0.14 --without-gphoto2

BTW: sane-1.0.14 works fine now ;)

Bye,
Kees Lemmens.

On Sat, Jun 19, 2004 at 02:09:17PM +0200, Kees Lemmens wrote:
> Hi,
<snip>
> Second problem : compile 1.0.14 under Slackware fails
> --------------
> 
> Whatever I try sane-1.0.14 doesn't compile under Slackware 9.1 !!
> configure fails to detect the presence of basic routines like "strdup",
> "getenv" and others under Slackware 9.1, thereby making it impposible to
> compile (at least on my system).
> 
> Any ideas ?
> 
> giant:/tmp/sane-backends-1.0.14 252 % make
> making all in include
> make[1]: Entering directory /tmp/sane-backends-1.0.14/include'
> make[1]: Nothing to be done for all'.
> make[1]: Leaving directory /tmp/sane-backends-1.0.14/include'
> making all in lib
> make[1]: Entering directory /tmp/sane-backends-1.0.14/lib'
> gcc -c -DHAVE_CONFIG_H -I. -I. -I../include/sane -I../include
> -DPATH_SANE_CONFIG_DIR=/opt/sane-1.0.14//etc/sane.d
> -DPATH_SANE_DATA_DIR=/opt/sane-1.0.14//share    -DV_MAJOR=1 -DV_MINOR=0
> -I/usr/local/include/gphoto2 -g -O2 -W -Wall getenv.c
> getenv.c:13:4: #error "Missing getenv() on this platform.  Please implement."
> getenv.c: In function getenv':
> getenv.c:6: warning: unused parameter name'
> make[1]: *** [getenv.o] Error 1
> make[1]: Leaving directory /tmp/sane-backends-1.0.14/lib'
> make: *** [all-recursive] Error 1
> 
> giant:/tmp/sane-backends-1.0.14 254 % less include/sane/config.h
> ...
> /* Define to 1 if you have the getenv' function. */
> /* #undef HAVE_GETENV */
> ...
> /* Define to 1 if you have the strcasecmp' function. */
> /* #undef HAVE_STRCASECMP */
> 
> /* Define to 1 if you have the strdup' function. */
> /* #undef HAVE_STRDUP */
> 

-- 
Bye,
Kees Lemmens.