From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Andy Wingo Newsgroups: gmane.lisp.guile.devel Subject: Re: cross building 1.9.14 for mingw Date: Tue, 22 Feb 2011 09:34:15 +0100 Message-ID: References: <1296330082.8111.371.camel@vuurvlieg> <874o8r8kdn.fsf@gnu.org> <1297765259.2325.283.camel@vuurvlieg> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1298363360 17903 80.91.229.12 (22 Feb 2011 08:29:20 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 22 Feb 2011 08:29:20 +0000 (UTC) Cc: Ludovic =?utf-8?Q?Court=C3=A8s?= , guile-devel@gnu.org To: Jan Nieuwenhuizen Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Tue Feb 22 09:29:15 2011 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PrncQ-0004vp-2w for guile-devel@m.gmane.org; Tue, 22 Feb 2011 09:29:14 +0100 Original-Received: from localhost ([127.0.0.1]:43201 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PrncP-0007BW-Ib for guile-devel@m.gmane.org; Tue, 22 Feb 2011 03:29:13 -0500 Original-Received: from [140.186.70.92] (port=32785 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PrncL-0007BD-3f for guile-devel@gnu.org; Tue, 22 Feb 2011 03:29:10 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PrncH-0001d7-PT for guile-devel@gnu.org; Tue, 22 Feb 2011 03:29:09 -0500 Original-Received: from a-pb-sasl-sd.pobox.com ([64.74.157.62]:40967 helo=sasl.smtp.pobox.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PrncH-0001cS-JL; Tue, 22 Feb 2011 03:29:05 -0500 Original-Received: from sasl.smtp.pobox.com (unknown [127.0.0.1]) by a-pb-sasl-sd.pobox.com (Postfix) with ESMTP id 662BB2F02; Tue, 22 Feb 2011 03:30:16 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type:content-transfer-encoding; s=sasl; bh=4iEM17ViLioz OTHCjRddZa3W6KM=; b=CN79CiZWE0jZGaQ3KQIl4eNwuiLonrfwHEMOuhlORsN5 4j2hK5Rus8YVlVlVr/lR8blAr5qIthpvbUV/2U7FpQ1Jg8aZS0uawkmLmgdG3Y12 N2EZvNo7+uY8PkcsV66lDZXenI5ndVlDqHgkB2NCHJj0o+lJVePKckediekf3oU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type:content-transfer-encoding; q=dns; s=sasl; b=I/F8NL 9mFCPfuxnNo9/DluUJIrod6R8SYkZuCeGs+lF9YHiq3D5lJDmDw6km544FULH4Hv qAWhj27V3W7uKfcNMPR16bNDNhT1tl6+BKHM287e5DUcptsO/oP3ToKuH5sffadr sY99Lk8RxMg2Kl8vQpSzWKu9ty/AhAyVxDocM= Original-Received: from a-pb-sasl-sd.pobox.com (unknown [127.0.0.1]) by a-pb-sasl-sd.pobox.com (Postfix) with ESMTP id 439972F01; Tue, 22 Feb 2011 03:30:14 -0500 (EST) Original-Received: from unquote.localdomain (unknown [90.164.198.39]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by a-pb-sasl-sd.pobox.com (Postfix) with ESMTPSA id 0E83E2F00; Tue, 22 Feb 2011 03:30:10 -0500 (EST) In-Reply-To: <1297765259.2325.283.camel@vuurvlieg> (Jan Nieuwenhuizen's message of "Tue, 15 Feb 2011 11:20:59 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux) X-Pobox-Relay-ID: F874588A-3E5D-11E0-B66D-AF401E47CF6F-02397024!a-pb-sasl-sd.pobox.com X-detected-operating-system: by eggs.gnu.org: Solaris 10 (beta) X-Received-From: 64.74.157.62 X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:11677 Archived-At: Hi Jan, Excuse the long quote here, but: On Tue 15 Feb 2011 11:20, Jan Nieuwenhuizen writes: > Ludovic Court=C3=A8s schreef op za 29-01-2011 om 22:34 [+0100]: > >> > From 4aeb4bb48423d87001b598030afed0a2dc03e747 Mon Sep 17 00:00:00 2001 >> > From: Jan Nieuwenhuizen >> > Date: Sat, 29 Jan 2011 19:42:46 +0100 >> > Subject: [PATCH 2/4] Use AC_CHECK_LIB rather than AC_LIB_HAVE_LINKFLAG= S. 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=3Dgnu99 -o c= onftest.exe -O2 -DHAVE_CONFIG_H=3D1 -I/home/janneke/vc/gub/target/mingw/bui= ld/guile-1.9.14 -I/home/janneke/vc/gub/target/mingw/root/usr/include -L/hom= e/janneke/vc/gub/target/mingw/root/usr/lib -L/home/janneke/vc/gub/target/mi= ngw/root/usr/bin -L/home/janneke/vc/gub/target/mingw/root/usr/lib/w32api co= nftest.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. >>=20 >> 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=E2=80=99t 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=20 > 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 a= nd libdir > --without-libintl-prefix don't search for PACKLIBS in includedir an= d libdir > --without-libglib-2.0-prefix don't search for PACKLIBS in includedi= r and libdir > --without-libcroco-0.6-prefix don't search for PACKLIBS in included= ir and libdir > --without-libunistring-prefix don't search for PACKLIBS in included= ir and libdir > --without-libxml2-prefix don't search for PACKLIBS in includedir an= d 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 a= nd 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 in= cludedir and libdir --without-libltdl-prefix don't search for libltdl in includedir a= nd libdir --without-libgmp-prefix don't search for libgmp in includedir and= libdir --without-libintl-prefix don't search for libintl in includedir a= nd libdir --without-libreadline-prefix don't search for libreadline in incl= udedir 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, =C3=A1nimo, peregrino: we'll get there yet. Cheers, Andy --=20 http://wingolog.org/