On Fri, Sep 21, 2001 at 02:57:21PM -0500, Kenneth Pronovici wrote:
> I'm cross-posting this to the autoconf and libtool lists, because I'm not
> sure whose "jurisdiction" this is.
>
> I accidentally found this while trying to compile libxml2-2.4.5 under Solaris.
> I say "accidentally" because was compiling without /usr/local/lib in my
> $LD_LIBRARY_PATH, which was probably silly. However, I think this might
> still be a legitimate concern.
>
> The problem is with the AC_CHECK_LIB(z, gzread) call in libxml's configure.in.
> What happens is that the configure script uses gcc and finds -lz successfully,
> and everything moves on as if libz is available. However, libtool uses
> /usr/ccs/bin/ld when attempting to link the library, and is unable to find
> -lz at that point.
>
> I guess this is because gcc always looks in /usr/local/lib by default and the
> Solaris build tools don't. I can work around this by specifying the exact
> location of zlib (--with-zlib=/usr/local) or by forcing use of the Solaris
> C compiler (export CC="/usr/ccs/bin/cc")... but it seems like it's not good
> that I can get myself into a situation where the configure script will succeed
> but the build will always fail.
>
> I've rebuilt the configure script with autoconf 2.52, and I still see the
> problem. It looks like libxml was developed with libtool 1.4.
>
> Is this worth worrying about, or does this fall into the "well, the silly
> user [me] should set up $LD_LIBRARY_PATH properly" category?
Only plausible solution is setting LDFLAGS before ./configure or using
--with-zlib. BTW, libxml is not the only app where you'll run into
this problem. You should also look into LD_RUN_PATH. We build libxml:
LDFLAGS="-R[zlib path]/lib" ./configure --with-zlib=[zlib path]
--
albert chin ([EMAIL PROTECTED])
_______________________________________________
Libtool mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/libtool