Hi Jan, Excuse the long quote here, but:
On Tue 15 Feb 2011 11:20, Jan Nieuwenhuizen <janneke-l...@xs4all.nl> writes: > Ludovic Courtès schreef op za 29-01-2011 om 22:34 [+0100]: > >> > From 4aeb4bb48423d87001b598030afed0a2dc03e747 Mon Sep 17 00:00:00 2001 >> > From: Jan Nieuwenhuizen <jann...@gnu.org> >> > Date: Sat, 29 Jan 2011 19:42:46 +0100 >> > Subject: [PATCH 2/4] Use AC_CHECK_LIB rather than AC_LIB_HAVE_LINKFLAGS. >> > Fixes cross configuring. >> > >> > AC_LIB_HAVE_LINKFLAGS blondly looks in $prefix etc. for libraries. >> > Not only is that unnecessary, it also breaks cross building. >> > >> > Here's what config.log says: >> > >> > configure:33053: i686-mingw32-gcc -mms-bitfields -std=gnu99 -o >> > conftest.exe -O2 -DHAVE_CONFIG_H=1 >> > -I/home/janneke/vc/gub/target/mingw/build/guile-1.9.14 >> > -I/home/janneke/vc/gub/target/mingw/root/usr/include >> > -L/home/janneke/vc/gub/target/mingw/root/usr/lib >> > -L/home/janneke/vc/gub/target/mingw/root/usr/bin >> > -L/home/janneke/vc/gub/target/mingw/root/usr/lib/w32api conftest.c >> > /usr/lib/libltdl.a /usr/lib/libdl.a >&5 >> > /tmp/cc5v8vq5.o:conftest.c:(.text+0x1e): undefined reference to >> > `_lt_dlopenext' >> > >> > note that using -lltdl -ldl instead of /usr/lib/libltdl.a >> > /usr/lib/libdl.la works fine. >> >> Ouch. May I suggest reporting it to bug-gnu...@gnu.org? :-) I think >> people there would be happy to provide an appropriate fix and we >> wouldn’t even have to worry. ;-) > > I did, and Bruno Haible does not really care about this brokenness > or about cross compiling; That is a totally unfair characterization, Jan. You met him in the Hague and he did not seem particularly evil then :) > he throws the towel on fixing this and > defends it by arguing that there are more users with a broken > compiler/linker, installed in /usr, which must be helped to find libs > in /usr/lib, than there are cross build users who have a sane setup and > suffer by this. > > In fact he thinks it's a feature that configure breaks when you > "upgrade" from autoconf's AC_CHECK_LIB to gnulib's > AC_LIB_HAVE_LINKFLAGS. > > Bruno suggests that cross build environments (or more accurately, > build environments that install in another or clean DESTDIR > than where the buildtools are), should now start using or introduce > special configure flags, so that what worked previously, now can > be fixed by a tedious manual process, he writes > > For example, gettext's "configure --help" contains: > > --without-libpth-prefix don't search for PACKLIBS in includedir and > libdir > --without-libiconv-prefix don't search for PACKLIBS in includedir and > libdir > --without-libintl-prefix don't search for PACKLIBS in includedir and > libdir > --without-libglib-2.0-prefix don't search for PACKLIBS in includedir > and libdir > --without-libcroco-0.6-prefix don't search for PACKLIBS in includedir > and libdir > --without-libunistring-prefix don't search for PACKLIBS in includedir > and libdir > --without-libxml2-prefix don't search for PACKLIBS in includedir and > libdir > --without-libncurses-prefix don't search for PACKLIBS in includedir and > libdir > --without-libtermcap-prefix don't search for PACKLIBS in includedir and > libdir > --without-libxcurses-prefix don't search for PACKLIBS in includedir and > libdir > --without-libcurses-prefix don't search for PACKLIBS in includedir and > libdir > --without-libexpat-prefix don't search for PACKLIBS in includedir and > libdir Have you noticed that Guile has similar flags? $ ./configure --help | grep without | grep -- -lib --without-libiconv-prefix don't search for libiconv in includedir and libdir --without-libunistring-prefix don't search for libunistring in includedir and libdir --without-libltdl-prefix don't search for libltdl in includedir and libdir --without-libgmp-prefix don't search for libgmp in includedir and libdir --without-libintl-prefix don't search for libintl in includedir and libdir --without-libreadline-prefix don't search for libreadline in includedir and libdir To be honest I don't find it too onerous to have to set these flags when compiling with DESTDIR. Sure, it would be nicer if it were just one flag, and perhaps we can fix that; but as you have perhaps seen in the numerous discussions on bug-guile recently, it seems that AC_LIB_HAVE_LINKFLAGS solves real problems. People who cross-compile are a hardy breed, and less numerous than normal folk. If the outcome here is that you have to pass more configure flags, but I have to deal with less mail on bug-guile, thus actually letting me hack again (!), I will take AC_LIB_HAVE_LINKFLAGS any day ;) I appreciate the work that you are doing on MinGW. It will be nice for the oppressed denizens of Microsoft to have Guile relief. So, ánimo, peregrino: we'll get there yet. Cheers, Andy -- http://wingolog.org/