delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2016/01/25/23:51:36

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:date:from:to:subject:message-id:references
:mime-version:content-type:in-reply-to; q=dns; s=default; b=H2BA
4PfjAfvyCLNvRlHNpf1ywqFitmZ4ktFsKEyLbUwuQXmXrSKDZyyiuCHJ2j+BErbc
tYj3mx4QOXfE6c0oirO7tZyW9hRUh8p7/8kHIOUm104/QJ+iYs0LnCbhflvtXAGl
WklKo6SGz9XBfhAK3tZOzmFM2rRVrbknpkKVGjk=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:date:from:to:subject:message-id:references
:mime-version:content-type:in-reply-to; s=default; bh=4gwNwFr9IN
7y9L+NymWt9mJb4/4=; b=YtkG3PCVDT4ezAs3H1vzZQNvRB0nG00mZLDogBEgqd
OmImblabCpjBXWaF0RQ5iCmCXAdVuA7OKO3edSKg5fkwuYaV2LJFenz9JdMc8QWT
SKtIxs0EeabcDPqOclP579E5hI9BuWi76wG12obCOu/BgQU3c3lyLsGTFjQA7Dnp
M=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.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
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=1.1 required=5.0 tests=BAYES_50,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_LOW autolearn=no version=3.3.2 spammy=pride, pre-dates, predates, __strict_ansi__
X-HELO: mail110.syd.optusnet.com.au
Date: Tue, 26 Jan 2016 15:51:05 +1100
From: Duncan Roe <duncan_roe AT acslink DOT net DOT au>
To: cygwin AT cygwin DOT com
Subject: Re: bcftools error running Make after installing update 2.4.1.1 to Cygwin64
Message-ID: <20160126045105.GA15234@dimstar.local.net>
Mail-Followup-To: cygwin AT cygwin DOT com
References: <BAY175-W14DF8CC504AF6F9213BF6CADC70 AT phx DOT gbl> <56A693F5 DOT 7070000 AT tiscali DOT co DOT uk>
MIME-Version: 1.0
In-Reply-To: <56A693F5.7070000@tiscali.co.uk>
User-Agent: Mutt/1.5.22 (2013-10-16)
X-Optus-CM-Score: 0
X-Optus-CM-Analysis: v=2.1 cv=R4L+YolX c=1 sm=1 tr=0 a=+cDhJlqnNvz9E7c5l3ERGg==:117 a=+cDhJlqnNvz9E7c5l3ERGg==:17 a=L9H7d07YOLsA:10 a=9cW_t1CCXrUA:10 a=s5jvgZ67dGcA:10 a=eIhxMilvRf8A:10 a=kj9zAlcOel0A:10 a=7aQ_Q-yQQ-AA:10 a=FRQSvaR4Lw90OAh44SkA:9 a=CjuIK1q_8ugA:10
X-IsSubscribed: yes

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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019