unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
From: Andy Wingo <wingo@pobox.com>
To: Jan Nieuwenhuizen <janneke-list@xs4all.nl>
Cc: "Ludovic Courtès" <ludo@gnu.org>, guile-devel@gnu.org
Subject: Re: cross building 1.9.14 for mingw
Date: Tue, 22 Feb 2011 09:34:15 +0100	[thread overview]
Message-ID: <m3zkpowjqw.fsf@unquote.localdomain> (raw)
In-Reply-To: <1297765259.2325.283.camel@vuurvlieg> (Jan Nieuwenhuizen's message of "Tue, 15 Feb 2011 11:20:59 +0100")

Hi Jan,

Excuse the long quote here, but:

On Tue 15 Feb 2011 11:20, Jan Nieuwenhuizen <janneke-list@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 <janneke@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-gnulib@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/



  reply	other threads:[~2011-02-22  8:34 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-29 19:41 cross building 1.9.14 for mingw Jan Nieuwenhuizen
2011-01-29 21:34 ` Ludovic Courtès
2011-01-31 20:16   ` Jan Nieuwenhuizen
2011-01-31 20:44     ` Ludovic Courtès
2011-02-15 10:20   ` Jan Nieuwenhuizen
2011-02-22  8:34     ` Andy Wingo [this message]
2011-02-24  9:39       ` Jan Nieuwenhuizen
2011-02-24 10:37         ` Ludovic Courtès
2011-03-04 11:11         ` problems solved by AC_LIB_HAVE_LINKFLAGS [was: cross building 1.9.14 for mingw] Andy Wingo
2011-03-20  8:08           ` Jan Nieuwenhuizen
2011-03-20  8:21             ` Ralf Wildenhues
2011-03-20  8:34               ` Jan Nieuwenhuizen
2011-03-20  8:56                 ` Ralf Wildenhues
2011-01-29 21:39 ` Relocatable installation Ludovic Courtès
2011-01-31 20:26   ` Jan Nieuwenhuizen
2011-01-31 20:50     ` Andy Wingo
2011-01-31 20:55       ` Jan Nieuwenhuizen
2011-01-31 21:30         ` Andy Wingo
2011-01-31 21:49           ` Jan Nieuwenhuizen
2011-01-31 21:00     ` Ludovic Courtès
2011-01-31 21:18       ` Jan Nieuwenhuizen
2011-01-31 22:09         ` Ludovic Courtès
2011-01-31 22:26           ` Jan Nieuwenhuizen
2011-02-14 12:29 ` cross building 1.9.14 for mingw Ludovic Courtès
2011-02-15 10:02   ` Jan Nieuwenhuizen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m3zkpowjqw.fsf@unquote.localdomain \
    --to=wingo@pobox.com \
    --cc=guile-devel@gnu.org \
    --cc=janneke-list@xs4all.nl \
    --cc=ludo@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).