public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* bcftools error running Make after installing update 2.4.1.1 to Cygwin64
@ 2016-01-25 21:11 Robert May
  2016-01-26 17:23 ` David Stacey
  0 siblings, 1 reply; 5+ messages in thread
From: Robert May @ 2016-01-25 21:11 UTC (permalink / raw)
  To: cygwin

error running Make after installing update 2.4.1.1 to Cygwin64

Robert@DESKTOP-14EL82S /usr/local/bin/bcftools-1.3

$ make
 
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);
                           ^
gcc -g -Wall -Wc++-compat -O2  -std=c99 -I. -Ihtslib-1.3 -DPLUGINPATH=\"/usr/local/libexec/bcftools\"  -c -o tabix.o tabix.c
tabix.c: In function ‘main_tabix’:
tabix.c:97:13: warning: implicit declaration of function ‘alloca’ [-Wimplicit-function-declaration]
             fn = (char*)alloca(strlen(argv[optind]) + 5);
             ^
tabix.c:97:18: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
             fn = (char*)alloca(strlen(argv[optind]) + 5);
                  ^
gcc -g -Wall -Wc++-compat -O2  -std=c99 -I. -Ihtslib-1.3 -DPLUGINPATH=\"/usr/local/libexec/bcftools\"  -c -o vcfstats.o vcfstats.c
vcfstats.c: In function ‘main_vcfstats’:
vcfstats.c:1558:9: warning: implicit declaration of function ‘fileno’ [-Wimplicit-function-declaration]
         if ( !isatty(fileno((FILE *)stdin)) ) fname = "-";  // reading from stdin
         ^
gcc -g -Wall -Wc++-compat -O2  -std=c99 -I. -Ihtslib-1.3 -DPLUGINPATH=\"/usr/local/libexec/bcftools\"  -c -o vcfisec.o vcfisec.c
vcfisec.c: In function ‘main_vcfisec’:
vcfisec.c:556:21: warning: array subscript has type ‘char’ [-Wchar-subscripts]
                     else if ( isdigit(*p) ) args->isec_op = OP_EQUAL;
                     ^
gcc -g -Wall -Wc++-compat -O2  -std=c99 -I. -Ihtslib-1.3 -DPLUGINPATH=\"/usr/local/libexec/bcftools\"  -c -o vcfmerge.o vcfmerge.c
vcfmerge.c: In function ‘merge_alleles’:
vcfmerge.c:542:13: warning: array subscript has type ‘char’ [-Wchar-subscripts]
             for (j=0; j<len; j++) a[i][j] = toupper(a[i][j]);
             ^
vcfmerge.c:547:13: warning: array subscript has type ‘char’ [-Wchar-subscripts]
             for (j=0; j<len; j++) b[i][j] = toupper(b[i][j]);
             ^
gcc -g -Wall -Wc++-compat -O2  -std=c99 -I. -Ihtslib-1.3 -DPLUGINPATH=\"/usr/local/libexec/bcftools\"  -c -o vcfquery.o vcfquery.c
vcfquery.c: In function ‘main_vcfquery’:
vcfquery.c:285:9: warning: implicit declaration of function ‘fileno’ [-Wimplicit-function-declaration]
         if ( !isatty(fileno((FILE *)stdin)) ) fname = "-";
         ^
gcc -g -Wall -Wc++-compat -O2  -std=c99 -I. -Ihtslib-1.3 -DPLUGINPATH=\"/usr/local/libexec/bcftools\"  -c -o vcffilter.o vcffilter.c
vcffilter.c: In function ‘main_vcffilter’:
vcffilter.c:501:9: warning: implicit declaration of function ‘fileno’ [-Wimplicit-function-declaration]
         if ( !isatty(fileno((FILE *)stdin)) ) fname = "-";  // reading from stdin
         ^
gcc -g -Wall -Wc++-compat -O2  -std=c99 -I. -Ihtslib-1.3 -DPLUGINPATH=\"/usr/local/libexec/bcftools\"  -c -o filter.o filter.c
filter.c: In function ‘filters_next_token’:
filter.c:109:5: warning: array subscript has type ‘char’ [-Wchar-subscripts]
     while ( *tmp && isspace(*tmp) ) tmp++;
     ^
filter.c:114:5: warning: array subscript has type ‘char’ [-Wchar-subscripts]
     if ( isdigit(*str[0]) || *str[0]=='.' )   // strtod would eat +/-
     ^
filter.c:117:9: warning: array subscript has type ‘char’ [-Wchar-subscripts]
         if ( *str!=tmp && (!tmp[0] || !isalnum(tmp[0])) )
         ^
filter.c:141:9: warning: array subscript has type ‘char’ [-Wchar-subscripts]
         while ( *tmp && !isspace(*tmp) && *tmp!='=' && *tmp!='!' ) tmp++;
         ^
filter.c:150:9: warning: array subscript has type ‘char’ [-Wchar-subscripts]
         if ( isspace(tmp[0]) ) break;
         ^
filter.c: In function ‘filters_init1’:
filter.c:1173:13: warning: array subscript has type ‘char’ [-Wchar-subscripts]
             while ( *se && !isspace(*se) ) se++;
             ^
filter.c: In function ‘filter_init’:
filter.c:1479:13: warning: array subscript has type ‘char’ [-Wchar-subscripts]
             if ( *tmp && !isspace(*tmp) ) error("Could not parse the expression: [%s]\n", str);
             ^
gcc -g -Wall -Wc++-compat -O2  -std=c99 -I. -Ihtslib-1.3 -DPLUGINPATH=\"/usr/local/libexec/bcftools\"  -c -o vcfsom.o vcfsom.c
gcc -g -Wall -Wc++-compat -O2  -std=c99 -I. -Ihtslib-1.3 -DPLUGINPATH=\"/usr/local/libexec/bcftools\"  -c -o vcfnorm.o vcfnorm.c
vcfnorm.c: In function ‘replace_iupac_codes’:
vcfnorm.c:88:9: warning: array subscript has type ‘char’ [-Wchar-subscripts]
         char c = toupper(seq[i]);
         ^
vcfnorm.c: In function ‘main_vcfnorm’:
vcfnorm.c:1785:9: warning: implicit declaration of function ‘fileno’ [-Wimplicit-function-declaration]
         if ( !isatty(fileno((FILE *)stdin)) ) fname = "-";  // reading from stdin
         ^
gcc -g -Wall -Wc++-compat -O2  -std=c99 -I. -Ihtslib-1.3 -DPLUGINPATH=\"/usr/local/libexec/bcftools\"  -c -o vcfgtcheck.o vcfgtcheck.c
vcfgtcheck.c: In function ‘main_vcfgtcheck’:
vcfgtcheck.c:780:9: warning: implicit declaration of function ‘fileno’ [-Wimplicit-function-declaration]
         if ( !isatty(fileno((FILE *)stdin)) ) fname = "-";  // reading from stdin
         ^
gcc -g -Wall -Wc++-compat -O2  -std=c99 -I. -Ihtslib-1.3 -DPLUGINPATH=\"/usr/local/libexec/bcftools\"  -c -o vcfview.o vcfview.c
vcfview.c: In function ‘main_vcfview’:
vcfview.c:696:9: warning: implicit declaration of function ‘fileno’ [-Wimplicit-function-declaration]
         if ( !isatty(fileno((FILE *)stdin)) ) fname = "-";  // reading from stdin
         ^
gcc -g -Wall -Wc++-compat -O2  -std=c99 -I. -Ihtslib-1.3 -DPLUGINPATH=\"/usr/local/libexec/bcftools\"  -c -o vcfannotate.o vcfannotate.c
vcfannotate.c: In function ‘set_samples’:
vcfannotate.c:1033:9: warning: array subscript has type ‘char’ [-Wchar-subscripts]
         while ( *se && !isspace(*se) ) se++;
         ^
vcfannotate.c:1049:9: warning: array subscript has type ‘char’ [-Wchar-subscripts]
         while ( isspace(*ss) ) ss++;
         ^
vcfannotate.c:1051:9: warning: array subscript has type ‘char’ [-Wchar-subscripts]
         while ( *se && !isspace(*se) ) se++;
         ^
vcfannotate.c: In function ‘rename_chrs’:
vcfannotate.c:1357:9: warning: array subscript has type ‘char’ [-Wchar-subscripts]
         while ( *ss && !isspace(*ss) ) ss++;
         ^
vcfannotate.c:1367:9: warning: array subscript has type ‘char’ [-Wchar-subscripts]
         while ( *ss && isspace(*ss) ) ss++;
         ^
vcfannotate.c:1369:9: warning: array subscript has type ‘char’ [-Wchar-subscripts]
         while ( *se && !isspace(*se) ) se++;
         ^
vcfannotate.c: In function ‘main_vcfannotate’:
vcfannotate.c:1716:9: warning: implicit declaration of function ‘fileno’ [-Wimplicit-function-declaration]
         if ( !isatty(fileno((FILE *)stdin)) ) fname = "-";  // reading from stdin
         ^
gcc -g -Wall -Wc++-compat -O2  -std=c99 -I. -Ihtslib-1.3 -DPLUGINPATH=\"/usr/local/libexec/bcftools\"  -c -o vcfroh.o vcfroh.c
vcfroh.c: In function ‘load_genmap’:
vcfroh.c:229:9: warning: array subscript has type ‘char’ [-Wchar-subscripts]
         while ( *tmp && !isspace(*tmp) ) tmp++;
         ^
vcfroh.c: In function ‘read_AF’:
vcfroh.c:439:5: warning: array subscript has type ‘char’ [-Wchar-subscripts]
     if ( *tmp && !isspace(*tmp) )
     ^
vcfroh.c:441:9: warning: array subscript has type ‘char’ [-Wchar-subscripts]
         if ( str[0]=='.' && (!str[1] || isspace(str[1])) ) return -1; // missing value
         ^
gcc -g -Wall -Wc++-compat -O2  -std=c99 -I. -Ihtslib-1.3 -DPLUGINPATH=\"/usr/local/libexec/bcftools\"  -c -o vcfconcat.o vcfconcat.c
gcc -g -Wall -Wc++-compat -O2  -std=c99 -I. -Ihtslib-1.3 -DPLUGINPATH=\"/usr/local/libexec/bcftools\"  -c -o vcfcall.o vcfcall.c
vcfcall.c: In function ‘parse_ped_samples’:
vcfcall.c:201:13: warning: array subscript has type ‘char’ [-Wchar-subscripts]
             if ( isspace(*tmp) )
             ^
vcfcall.c:205:17: warning: array subscript has type ‘char’ [-Wchar-subscripts]
                 while ( isspace(*tmp) ) tmp++;  // allow multiple spaces
                 ^
vcfcall.c: In function ‘set_samples’:
vcfcall.c:283:9: warning: array subscript has type ‘char’ [-Wchar-subscripts]
         while ( *ss && isspace(*ss) ) ss++;
         ^
vcfcall.c:287:9: warning: array subscript has type ‘char’ [-Wchar-subscripts]
         while ( *se && !isspace(*se) ) se++;
         ^
vcfcall.c:294:9: warning: array subscript has type ‘char’ [-Wchar-subscripts]
         while ( *ss && isspace(*ss) ) ss++;
         ^
vcfcall.c:297:9: warning: array subscript has type ‘char’ [-Wchar-subscripts]
         while ( *se && !isspace(*se) ) se++;
         ^
vcfcall.c: In function ‘main_vcfcall’:
vcfcall.c:739:9: warning: implicit declaration of function ‘fileno’ [-Wimplicit-function-declaration]
         if ( !isatty(fileno((FILE *)stdin)) ) args.bcf_fname = "-";  // reading from stdin
         ^
gcc -g -Wall -Wc++-compat -O2  -std=c99 -I. -Ihtslib-1.3 -DPLUGINPATH=\"/usr/local/libexec/bcftools\"  -c -o mcall.o mcall.c
gcc -g -Wall -Wc++-compat -O2  -std=c99 -I. -Ihtslib-1.3 -DPLUGINPATH=\"/usr/local/libexec/bcftools\"  -c -o vcmp.o vcmp.c
vcmp.c: In function ‘vcmp_set_ref’:
vcmp.c:57:5: warning: array subscript has type ‘char’ [-Wchar-subscripts]
     while ( *a && *b && toupper(*a)==toupper(*b) ) { a++; b++; }
     ^
vcmp.c:57:5: warning: array subscript has type ‘char’ [-Wchar-subscripts]
vcmp.c:68:9: warning: array subscript has type ‘char’ [-Wchar-subscripts]
         for (i=0; i<vcmp->ndref; i++) vcmp->dref[i] = toupper(ref1[vcmp->nmatch+i]);
         ^
vcmp.c:78:5: warning: array subscript has type ‘char’ [-Wchar-subscripts]
     for (i=0; i<vcmp->ndref; i++) vcmp->dref[i] = toupper(ref2[vcmp->nmatch+i]);
     ^
vcmp.c: In function ‘vcmp_find_allele’:
vcmp.c:90:9: warning: array subscript has type ‘char’ [-Wchar-subscripts]
         while ( *a && *b && toupper(*a)==toupper(*b) ) { a++; b++; }
         ^
vcmp.c:90:9: warning: array subscript has type ‘char’ [-Wchar-subscripts]
vcmp.c:103:17: warning: array subscript has type ‘char’ [-Wchar-subscripts]
                 if ( !a[j] || toupper(a[j])!=vcmp->dref[j] ) break;
                 ^
vcmp.c:110:13: warning: array subscript has type ‘char’ [-Wchar-subscripts]
             if ( !b[j] || toupper(b[j])!=vcmp->dref[j] ) break;
             ^
gcc -g -Wall -Wc++-compat -O2  -std=c99 -I. -Ihtslib-1.3 -DPLUGINPATH=\"/usr/local/libexec/bcftools\"  -c -o gvcf.o gvcf.c
gcc -g -Wall -Wc++-compat -O2  -std=c99 -I. -Ihtslib-1.3 -DPLUGINPATH=\"/usr/local/libexec/bcftools\"  -c -o reheader.o reheader.c
reheader.c: In function ‘read_header_file’:
reheader.c:65:5: warning: array subscript has type ‘char’ [-Wchar-subscripts]
     while ( hdr->l>0 && isspace(hdr->s[hdr->l-1]) ) hdr->l--;  // remove trailing newlines
     ^
reheader.c: In function ‘set_sample_pairs’:
reheader.c:79:9: warning: array subscript has type ‘char’ [-Wchar-subscripts]
         while ( *value && !isspace(*value) ) value++;
         ^
reheader.c:82:9: warning: array subscript has type ‘char’ [-Wchar-subscripts]
         while ( isspace(*value) ) value++;
         ^
reheader.c:91:5: warning: array subscript has type ‘char’ [-Wchar-subscripts]
     while ( hdr->l>0 && isspace(hdr->s[hdr->l-1]) ) hdr->l--;  // remove trailing newlines
     ^
reheader.c: In function ‘reheader_vcf_gz’:
reheader.c:227:9: warning: implicit declaration of function ‘fileno’ [-Wimplicit-function-declaration]
         bgzf_out = bgzf_dopen(fileno(stdout), "w");
         ^
gcc -g -Wall -Wc++-compat -O2  -std=c99 -I. -Ihtslib-1.3 -DPLUGINPATH=\"/usr/local/libexec/bcftools\"  -c -o convert.o convert.c
convert.c: In function ‘parse_subscript’:
convert.c:781:5: warning: array subscript has type ‘char’ [-Wchar-subscripts]
     while ( *q && *q!='}' && isdigit(*q) ) q++;
     ^
convert.c: In function ‘parse_tag’:
convert.c:791:5: warning: array subscript has type ‘char’ [-Wchar-subscripts]
     while ( *q && (isalnum(*q) || *q=='_' || *q=='.') ) q++;
     ^
convert.c:806:13: warning: array subscript has type ‘char’ [-Wchar-subscripts]
             while ( *q && (isalnum(*q) || *q=='_' || *q=='.') ) q++;
 ^
convert.c:848:13: warning: array subscript has type ‘char’ [-Wchar-subscripts]
             while ( *q && (isalnum(*q) || *q=='_' || *q=='.') ) q++;
             ^
gcc -g -Wall -Wc++-compat -O2  -std=c99 -I. -Ihtslib-1.3 -DPLUGINPATH=\"/usr/local/libexec/bcftools\"  -c -o vcfconvert.o vcfconvert.c
In file included from vcfconvert.c:42:0:
tsv2vcf.h: In function ‘tsv_next’:
tsv2vcf.h:68:9: warning: array subscript has type ‘char’ [-Wchar-subscripts]
         while ( *tsv->se && !isspace(*tsv->se) ) tsv->se++;
         ^
tsv2vcf.h:71:5: warning: array subscript has type ‘char’ [-Wchar-subscripts]
     while ( *tsv->se && isspace(*tsv->se) ) tsv->se++;
     ^
tsv2vcf.h:73:5: warning: array subscript has type ‘char’ [-Wchar-subscripts]
     while ( *tsv->se && !isspace(*tsv->se) ) tsv->se++;
     ^
vcfconvert.c: In function ‘tsv_setter_chrom_pos_ref_alt’:
vcfconvert.c:161:5: warning: array subscript has type ‘char’ [-Wchar-subscripts]
     while ( se < tsv->se && *se!='_' && isspace(*tsv->se) ) se++;
     ^
vcfconvert.c:162:5: warning: array subscript has type ‘char’ [-Wchar-subscripts]
     if ( se < tsv->se && *se!='_' && isspace(*tsv->se) ) error("Could not parse ALT in CHROM:POS_REF_ALT id: %s\n", tsv->ss);
     ^
vcfconvert.c: In function ‘tsv_setter_verify_ref_alt’:
vcfconvert.c:195:5: warning: array subscript has type ‘char’ [-Wchar-subscripts]
     while ( *tsv->se && isspace(*tsv->se) ) tsv->se++;
     ^
vcfconvert.c:197:5: warning: array subscript has type ‘char’ [-Wchar-subscripts]
     while ( *tsv->se && !isspace(*tsv->se) ) tsv->se++;
     ^
vcfconvert.c: In function ‘gensample_to_vcf’:
vcfconvert.c:354:5: warning: array subscript has type ‘char’ [-Wchar-subscripts]
     while ( *se && !isspace(*se) ) se++;
     ^
vcfconvert.c:378:9: warning: array subscript has type ‘char’ [-Wchar-subscripts]
         se = samples[i]; while ( *se && !isspace(*se) ) se++;
         ^
vcfconvert.c: In function ‘haplegendsample_to_vcf’:
vcfconvert.c:502:9: warning: array subscript has type ‘char’ [-Wchar-subscripts]
         se = samples[i]; while ( *se && !isspace(*se) ) se++;
         ^
vcfconvert.c: In function ‘hapsample_to_vcf’:
vcfconvert.c:615:9: warning: array subscript has type ‘char’ [-Wchar-subscripts]
         se = samples[i]; while ( *se && !isspace(*se) ) se++;
         ^
vcfconvert.c: In function ‘tsv_setter_aa1’:
vcfconvert.c:1069:5: warning: array subscript has type ‘char’ [-Wchar-subscripts]
     int a0 = acgt_to_5(toupper(ss[0]));
     ^
vcfconvert.c:1070:5: warning: array subscript has type ‘char’ [-Wchar-subscripts]
     int a1 = ss[1] ? acgt_to_5(toupper(ss[1])) : a0;
     ^
vcfconvert.c: In function ‘tsv_setter_aa’:
vcfconvert.c:1094:5: warning: array subscript has type ‘char’ [-Wchar-subscripts]
     ref[0] = toupper(ref[0]);
     ^
vcfconvert.c: In function ‘main_vcfconvert’:
vcfconvert.c:1436:13: warning: implicit declaration of function ‘fileno’ [-Wimplicit-function-declaration]
             if ( !isatty(fileno((FILE *)stdin)) ) args->infname = "-";
             ^
gcc -g -Wall -Wc++-compat -O2  -std=c99 -I. -Ihtslib-1.3 -DPLUGINPATH=\"/usr/local/libexec/bcftools\"  -c -o tsv2vcf.o tsv2vcf.c
In file included from tsv2vcf.c:27:0:
tsv2vcf.h: In function ‘tsv_next’:
tsv2vcf.h:68:9: warning: array subscript has type ‘char’ [-Wchar-subscripts]
         while ( *tsv->se && !isspace(*tsv->se) ) tsv->se++;
         ^
tsv2vcf.h:71:5: warning: array subscript has type ‘char’ [-Wchar-subscripts]
     while ( *tsv->se && isspace(*tsv->se) ) tsv->se++;
     ^
tsv2vcf.h:73:5: warning: array subscript has type ‘char’ [-Wchar-subscripts]
     while ( *tsv->se && !isspace(*tsv->se) ) tsv->se++;
     ^
tsv2vcf.c: In function ‘tsv_parse’:
tsv2vcf.c:81:9: warning: array subscript has type ‘char’ [-Wchar-subscripts]
         while ( *tsv->se && !isspace(*tsv->se) ) tsv->se++;
         ^
tsv2vcf.c:88:9: warning: array subscript has type ‘char’ [-Wchar-subscripts]
         while ( *tsv->se && isspace(*tsv->se) ) tsv->se++;
         ^
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]
 }
 ^

With this final error message

Makefile:103: recipe for target 'vcfcnv.o' failed
make: *** [vcfcnv.o] Error 1



 Bob May
DNA Projects I2b L415, I2c L596 HG, Spriggs of Cleve SA Family & Tyler Surname and ISOGG YTree 		 	   		  
--
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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: bcftools error running Make after installing update 2.4.1.1 to Cygwin64
  2016-01-25 21:11 bcftools error running Make after installing update 2.4.1.1 to Cygwin64 Robert May
@ 2016-01-26 17:23 ` David Stacey
  2016-01-26 19:33   ` Duncan Roe
  0 siblings, 1 reply; 5+ messages in thread
From: David Stacey @ 2016-01-26 17:23 UTC (permalink / raw)
  To: cygwin

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.


--
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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: bcftools error running Make after installing update 2.4.1.1 to Cygwin64
  2016-01-26 17:23 ` David Stacey
@ 2016-01-26 19:33   ` Duncan Roe
  0 siblings, 0 replies; 5+ messages in thread
From: Duncan Roe @ 2016-01-26 19:33 UTC (permalink / raw)
  To: cygwin

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: bcftools error running Make after installing update 2.4.1.1 to Cygwin64
  2016-01-27  8:29 Robert May
@ 2016-01-27 11:46 ` Marco Atzeri
  0 siblings, 0 replies; 5+ messages in thread
From: Marco Atzeri @ 2016-01-27 11:46 UTC (permalink / raw)
  To: cygwin



On 27/01/2016 05:53, Robert May wrote:
> I have had another look at Makefile and I changed c to gnu in this line 40 -std=gnu99
> CFLAGS   = -g -Wall -Wc++-compat -O2  -std=gnu99
>
> I had also removed -rdynamic in  line 185 so it now reads
> $(CC)  $(LDFLAGS) -o $@ $(OBJS) $(HTSLIB) -lpthread -lz -lm -ldl $(GSL_LIBS) $(LIBS)
>
> and ran make again
>
> Like sametools it has many warning essages about ‘expl’, ‘alloca’, ‘fileno’, ‘char’, this last one being the most prominent and ends with
>
> prob1.o: In function `mc_cal_y':
> /usr/local/bin/bcftools-1.3/prob1.c:320: undefined reference to `expl'
> /usr/local/bin/bcftools-1.3/prob1.c:320:(.text+0x1842): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `expl'
> collect2: error: ld returned 1 exit status
> Makefile:185: recipe for target 'bcftools' failed
> make: *** [bcftools] Error 1
>
> this is the same error message as in samtools collect2: error: ld returned 1 exit status
> but a different culprit prob1.o: In function `mc_cal_y':
>
>
>   Bob May

Bob,
it seems you are missing some includes

fileno is defined in
   /usr/include/stdio.h

alloca in
   /usr/include/alloca.h

expl is not available so use exp are workaround


That char is not defined seems VERY VERY strange

--
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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* bcftools error running Make after installing update 2.4.1.1 to Cygwin64
@ 2016-01-27  8:29 Robert May
  2016-01-27 11:46 ` Marco Atzeri
  0 siblings, 1 reply; 5+ messages in thread
From: Robert May @ 2016-01-27  8:29 UTC (permalink / raw)
  To: cygwin

I have had another look at Makefile and I changed c to gnu in this line 40 -std=gnu99
CFLAGS   = -g -Wall -Wc++-compat -O2  -std=gnu99

I had also removed -rdynamic in  line 185 so it now reads
$(CC)  $(LDFLAGS) -o $@ $(OBJS) $(HTSLIB) -lpthread -lz -lm -ldl $(GSL_LIBS) $(LIBS)

and ran make again

Like sametools it has many warning essages about ‘expl’, ‘alloca’, ‘fileno’, ‘char’, this last one being the most prominent and ends with 

prob1.o: In function `mc_cal_y':
/usr/local/bin/bcftools-1.3/prob1.c:320: undefined reference to `expl'
/usr/local/bin/bcftools-1.3/prob1.c:320:(.text+0x1842): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `expl'
collect2: error: ld returned 1 exit status
Makefile:185: recipe for target 'bcftools' failed
make: *** [bcftools] Error 1

this is the same error message as in samtools collect2: error: ld returned 1 exit status
but a different culprit prob1.o: In function `mc_cal_y':


 Bob May
DNA Projects I2b L415, I2c L596 HG, Spriggs of Cleve SA Family & Tyler Surname and ISOGG YTree 		 	   		  
--
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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2016-01-27  9:06 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-01-25 21:11 bcftools error running Make after installing update 2.4.1.1 to Cygwin64 Robert May
2016-01-26 17:23 ` David Stacey
2016-01-26 19:33   ` Duncan Roe
2016-01-27  8:29 Robert May
2016-01-27 11:46 ` Marco Atzeri

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).