public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: David Sastre <d.sastre.medina@gmail.com>
To: cygwin@cygwin.com
Subject: Re: Error building run2 from source package in win7
Date: Tue, 24 May 2011 19:54:00 -0000	[thread overview]
Message-ID: <20110524195347.GB11571@jethro.local.lan> (raw)
In-Reply-To: <4DDBFFFF.8090909@cwilson.fastmail.fm>

[-- Attachment #1: Type: text/plain, Size: 3052 bytes --]

On Tue, May 24, 2011 at 02:59:11PM -0400, Charles Wilson wrote:
> On 5/24/2011 2:38 PM, David Sastre wrote:
> 
> >> hmm...maybe the OP should check his generated config.h file for the
> >> offending def.  If it's there, a quick look inside config.log should
> >> tell you why 'checking for an ANSI C-conforming const' is reporting 'no'.
> > 
> > $ grep -nR "define const" run2-0.4.0-1/build/config.h
> > 152:#define const /**/
> > 
> > From the config.log:
> > 
> > configure:12737: checking for an ANSI C-conforming const
> > configure:12802: gcc -c -Wall -Werror  conftest.c >&5
> > cc1: warnings being treated as errors
> > conftest.c: In function 'main':
> > conftest.c:69:10: error: 't' is used uninitialized in this function
> > conftest.c:85:23: error: 'b' may be used uninitialized in this function
> 
> Looks like a possible bug in autoconf, which is where the definition of
> AC_C_CONST comes from -- or they might define this as PIBKAC (see
> below).  The test really ought to be -Wall -Werror friendly, but that's
> up to the autoconf guys.

(snip) 

> $ ./configure CC="gcc -Wall -Werror"
> checking for gcc... gcc -Wall -Werror
> checking whether the C compiler works... yes
> checking for C compiler default output file name... a.exe
> checking for suffix of executables... .exe
> checking whether we are cross compiling... no
> checking for suffix of object files... o
> checking whether we are using the GNU C compiler... yes
> checking whether gcc -Wall -Werror accepts -g... yes
> checking for gcc -Wall -Werror option to accept ISO C89... none needed
> checking for an ANSI C-conforming const... no
> 
> A-ha!
> 
> Don't set -Werror as part of $CC, set it in $CFLAGS instead.

Which is what is defined in the *.cygport's src_compile func:

src_compile() {
        cd ${S}
        cygautoreconf
        cd ${B}
        cygconf CFLAGS="-Wall -Werror"
        cygmake
}

And I'm doing nothing but running 'cygport *.cygport all'.

This test is failing for me:

$ cat configure.ac
AC_INIT([test])
AC_CONFIG_SRCDIR([configure.ac])
AC_C_CONST

$ autoconf
$ ./configure CFLAGS="-Wall -Werror"
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.exe
checking for suffix of executables... .exe
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for an ANSI C-conforming const... no

for the same reasons (config.log):

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: $? = 1

-- 
Huella de clave primaria: AD8F BDC0 5A2C FD5F A179  60E7 F79B AB04 5299 EC56

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 230 bytes --]

  reply	other threads:[~2011-05-24 19:54 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-23 17:18 David Sastre
2011-05-23 17:22 ` Eric Blake
2011-05-23 18:34   ` Charles Wilson
2011-05-24 18:38     ` David Sastre
2011-05-24 18:48       ` Eric Blake
2011-05-24 18:59       ` Charles Wilson
2011-05-24 19:54         ` David Sastre [this message]
2011-05-24 21:10           ` Charles Wilson
2011-05-25 10:34             ` David Sastre

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

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

  git send-email \
    --in-reply-to=20110524195347.GB11571@jethro.local.lan \
    --to=d.sastre.medina@gmail.com \
    --cc=cygwin@cygwin.com \
    /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).