From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6779 invoked by alias); 25 May 2011 10:34:40 -0000 Received: (qmail 6402 invoked by uid 22791); 25 May 2011 10:34:39 -0000 X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,RFC_ABUSE_POST,TW_YG,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: sourceware.org Received: from mail-ww0-f45.google.com (HELO mail-ww0-f45.google.com) (74.125.82.45) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 25 May 2011 10:34:22 +0000 Received: by wwi36 with SMTP id 36so6819034wwi.2 for ; Wed, 25 May 2011 03:34:21 -0700 (PDT) Received: by 10.216.220.213 with SMTP id o63mr4272881wep.98.1306319660973; Wed, 25 May 2011 03:34:20 -0700 (PDT) Received: from localhost (144.145.217.87.dynamic.jazztel.es [87.217.145.144]) by mx.google.com with ESMTPS id fq6sm275146wbb.10.2011.05.25.03.34.19 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 25 May 2011 03:34:19 -0700 (PDT) Date: Wed, 25 May 2011 10:34:00 -0000 From: David Sastre To: cygwin@cygwin.com Subject: Re: Error building run2 from source package in win7 Message-ID: <20110525103417.GA7442@jethro.local.lan> References: <20110523171750.GB16755@jethro.local.lan> <4DDA97CC.1090404@redhat.com> <4DDAA894.5090802@cwilson.fastmail.fm> <20110524183824.GA11571@jethro.local.lan> <4DDBFFFF.8090909@cwilson.fastmail.fm> <20110524195347.GB11571@jethro.local.lan> <4DDC1ECD.8030609@cwilson.fastmail.fm> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="G4iJoqBmSsgzjUCe" Content-Disposition: inline In-Reply-To: <4DDC1ECD.8030609@cwilson.fastmail.fm> User-Agent: Mutt/1.5.20 (2009-06-14) X-IsSubscribed: yes Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com X-SW-Source: 2011-05/txt/msg00356.txt.bz2 --G4iJoqBmSsgzjUCe Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-length: 3554 On Tue, May 24, 2011 at 05:10:37PM -0400, Charles Wilson wrote: > On 5/24/2011 3:53 PM, David Sastre wrote: > > On Tue, May 24, 2011 at 02:59:11PM -0400, Charles Wilson wrote: > >> A-ha! > >> > >> Don't set -Werror as part of $CC, set it in $CFLAGS instead. > >=20 > > Which is what is defined in the *.cygport's src_compile func: > >=20 > > src_compile() { > > cd ${S} > > cygautoreconf > > cd ${B} > > cygconf CFLAGS=3D"-Wall -Werror" > > cygmake > > } > >=20 > > And I'm doing nothing but running 'cygport *.cygport all'. >=20 > Well, Eric is the real expert, and he says don't set the warning flags > until the cygmake line, so that's first. However, I assume the > incantation above worked in the past for the original author of the > .cygport(5) file, so why's it breaking for you? >=20 > Second, why does the STC below not work for you, when it worked for me? >=20 > > for the same reasons (config.log): > >=20 > > configure:2563: gcc -c -Wall -Werror conftest.c >&5 > > cc1: warnings being treated as errors > > conftest.c: In function 'main': > > conftest.c:38:10: error: 't' is used uninitialized in this function > > conftest.c:54:23: error: 'b' may be used uninitialized in this > > function > > configure:2563: $? =3D 1 >=20 > Well, looking at my config.log, I too have: >=20 > configure:2498: checking for an ANSI C-conforming const > configure:2563: gcc -c -Wall -Werror conftest.c >&5 > ^^^^^^^^^^^^^ > configure:2563: $? =3D 0 > configure:2570: result: yes >=20 > but we already know that this conftest.c is not -Wall -Werror clean -- > or, at least, that YOUR conftest.c is not clean. >=20 > Digging deeper in my configure, I find that the test uses the shell > function ac_fn_c_try_compile(), and that shell function has an > interesting bit of code: >=20 > 1340 test -z "$ac_c_werror_flag" || > 1341 test ! -s conftest.err > 1342 } && test -s conftest.$ac_objext; then : > 1343 ac_retval=3D0 >=20 > Hmmm...it's checking something to do with a Werror flag! Maybe there's > a workaround, but (a) is only activated if the -Werror is in CFLAGS, not > CC -- otherwise *I* would have passed the STC with CC=3D'gcc -Wall > -Werror' but I didn't, and (b) its only present in specific (newer?) > versions of autoconf, and you and I are using different versions. >=20 > Here's the first 3 lines of my configure script: >=20 > 1 #! /bin/sh > 2 # Guess values for system-dependent variables and create Makefiles. > 3 # Generated by GNU Autoconf 2.68. >=20 > What's yours say? Autoconf version matches yours: $ cygcheck -c autoconf2.5 Cygwin Package Information Package Version Status autoconf2.5 2.68-1 OK $ head -3 configure #! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.68 for run2 0.4.0. Moving the -Werror flag to the cygmake step did the trick: $ diff -u run2-0.4.0-1.cygport.orig run2-0.4.0-1.cygport --- run2-0.4.0-1.cygport.orig 2009-12-29 07:30:19.000000000 +0100 +++ run2-0.4.0-1.cygport 2011-05-25 11:11:51.139200000 +0200 @@ -11,7 +11,7 @@ cd ${S} cygautoreconf cd ${B} - cygconf CFLAGS=3D"-Wall -Werror" - cygmake + cygconf CFLAGS=3D"-Wall"=20 + cygmake CFLAGS=3D"-Werror" } checking for an ANSI C-conforming const... yes I've been able to compile without problems. Thanks for your time. --=20 Huella de clave primaria: AD8F BDC0 5A2C FD5F A179 60E7 F79B AB04 5299 EC56 --G4iJoqBmSsgzjUCe Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature Content-Disposition: inline Content-length: 230 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) iF4EAREIAAYFAk3c2ykACgkQ95urBFKZ7Fbv4AD/YJp5RYy//yEMwQfCEnCajw0V 6oYNZ/VJ733mbJgTn/AA/RHWMuDWPjIc4CWb0x4UZBQrQWgYSjjGL5mS9uu4caCM =uwd9 -----END PGP SIGNATURE----- --G4iJoqBmSsgzjUCe--