From: Duncan Roe <duncan_roe@acslink.net.au>
To: cygwin@cygwin.com
Subject: Re: bcftools error running Make after installing update 2.4.1.1 to Cygwin64
Date: Tue, 26 Jan 2016 19:33:00 -0000 [thread overview]
Message-ID: <20160126045105.GA15234@dimstar.local.net> (raw)
In-Reply-To: <56A693F5.7070000@tiscali.co.uk>
On Mon, Jan 25, 2016 at 09:30:29PM +0000, David Stacey wrote:
> On 25/01/16 21:00, Robert May wrote:
> >many warnings are given in the following text - see end for error message
> >
> >echo '#define BCFTOOLS_VERSION "1.3"'> version.h
> >gcc -g -Wall -Wc++-compat -O2 -std=c99 -I. -Ihtslib-1.3 -DPLUGINPATH=\"/usr/local/libexec/bcftools\" -c -o main.o main.c
> >gcc -g -Wall -Wc++-compat -O2 -std=c99 -I. -Ihtslib-1.3 -DPLUGINPATH=\"/usr/local/libexec/bcftools\" -c -o vcfindex.o vcfindex.c
> >vcfindex.c: In function ?main_vcfindex?:
> >vcfindex.c:209:9: warning: implicit declaration of function ?alloca? [-Wimplicit-function-declaration]
> > char*idx_fname = (char*)alloca(strlen(fname) + 5);
> > ^
> >vcfindex.c:209:27: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
> > char*idx_fname = (char*)alloca(strlen(fname) + 5);
>
> These warnings can be generated for a number of reasons. One is that the
> source code you are attempting to compile pre-dates this version of gcc.
> Another reason is that you are somehow using a combination of compiler
> switches that were never expected. A third reason is that the source code
> simply isn't well written, but the majority of Open Source contributors take
> great pride in their work.
>
> In your case, it could be the compiler switches - see below.
>
> >gcc -g -Wall -Wc++-compat -O2 -std=c99 -I. -Ihtslib-1.3 -DPLUGINPATH=\"/usr/local/libexec/bcftools\" -c -o vcfcnv.o vcfcnv.c
> >vcfcnv.c: In function ?norm_prob?:
> >vcfcnv.c:602:93: error: ?M_PI? undeclared (first use in this function)
> > return exp(-(baf-param->mean)*(baf-param->mean)*0.5/param->dev2) / param->norm / sqrt(2*M_PI*param->dev2);
> > ^
> >vcfcnv.c:602:93: note: each undeclared identifier is reported only once for each function it appears in
> >vcfcnv.c: In function ?main_vcfcnv?:
> >vcfcnv.c:1349:9: warning: implicit declaration of function ?fileno? [-Wimplicit-function-declaration]
> > if ( !isatty(fileno((FILE *)stdin)) ) fname = "-";
> > ^
> >vcfcnv.c: In function ?norm_prob?:
> >vcfcnv.c:603:1: warning: control reaches end of non-void function [-Wreturn-type]
> > }
> > ^
>
> This looks like expected behaviour to me. Specifying '-std=c99' defines a
> __STRICT_ANSI__ macro, which in turn means that mathematical constants like
> M_PI are not defined. Using '-std=gnu99' instead should work. You may also
> find that this more relaxed compiler setting doesn't generate so many
> warnings.
>
> Dave.
>
Definitely you need a gnu standard for /usr/include/alloca.h to make alloca
visible. It is not a POSIX function.
Cheers ... Duncan.
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
next prev parent reply other threads:[~2016-01-26 4:51 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-25 21:11 Robert May
2016-01-26 17:23 ` David Stacey
2016-01-26 19:33 ` Duncan Roe [this message]
2016-01-27 8:29 Robert May
2016-01-27 11:46 ` Marco Atzeri
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=20160126045105.GA15234@dimstar.local.net \
--to=duncan_roe@acslink.net.au \
--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).