guile-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: cross building 1.9.14 for mingw


From: Jan Nieuwenhuizen
Subject: Re: cross building 1.9.14 for mingw
Date: Tue, 15 Feb 2011 11:20:59 +0100

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 <address@hidden>
> > 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 address@hidden  :-)  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; 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.

So I would suggest to take my patch and not use AC_LIB_HAVE_LINKFLAGS,
and possibly work with Ralf Wildenhues from autotools to provide
any extra autoconf functionality in autoconf itself, rather than
working through gnulib.  Ralf does have a good understandng about
cross building.

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

Greetings,

Jan.

-- 
Jan Nieuwenhuizen <address@hidden> | GNU LilyPond http://lilypond.org
Freelance IT http://JoyofSource.com | Avatar®  http://AvatarAcademy.nl  




reply via email to

[Prev in Thread] Current Thread [Next in Thread]