X-Recipient: archive-cygwin AT delorie DOT com 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 Date: Wed, 25 May 2011 12:34:17 +0200 From: David Sastre <d DOT sastre DOT medina AT gmail DOT com> To: cygwin AT cygwin DOT com Subject: Re: Error building run2 from source package in win7 Message-ID: <20110525103417.GA7442@jethro.local.lan> References: <20110523171750 DOT GB16755 AT jethro DOT local DOT lan> <4DDA97CC DOT 1090404 AT redhat DOT com> <4DDAA894 DOT 5090802 AT cwilson DOT fastmail DOT fm> <20110524183824 DOT GA11571 AT jethro DOT local DOT lan> <4DDBFFFF DOT 8090909 AT cwilson DOT fastmail DOT fm> <20110524195347 DOT GB11571 AT jethro DOT local DOT lan> <4DDC1ECD DOT 8030609 AT cwilson DOT fastmail DOT 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 AT cygwin DOT com; run by ezmlm Precedence: bulk List-Id: <cygwin.cygwin.com> List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com> List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com> List-Archive: <http://sourceware.org/ml/cygwin/> List-Post: <mailto:cygwin AT cygwin DOT com> List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com --G4iJoqBmSsgzjUCe Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) iF4EAREIAAYFAk3c2ykACgkQ95urBFKZ7Fbv4AD/YJp5RYy//yEMwQfCEnCajw0V 6oYNZ/VJ733mbJgTn/AA/RHWMuDWPjIc4CWb0x4UZBQrQWgYSjjGL5mS9uu4caCM =uwd9 -----END PGP SIGNATURE----- --G4iJoqBmSsgzjUCe--