Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cygwin linking problems: no -rdynamic, plugins can't be built #377

Open
NicoleJohn opened this issue Feb 1, 2016 · 7 comments
Open

Cygwin linking problems: no -rdynamic, plugins can't be built #377

NicoleJohn opened this issue Feb 1, 2016 · 7 comments

Comments

@NicoleJohn
Copy link

Good day.

Now, I am trying to compile bcftools 1.3 through Cygwin. I have removed "-rdynamic" from the makefile as I encountered an error, the same error I got when I tried to compile samtools in Cygwin. However, after doing this, another error occurred (see below):

echo '#define BCFTOOLS_VERSION "1.3"' > version.h
gcc -g -Wall -Wc++-compat -O2 -I. -Ihtslib-1.3 -DPLUGINPATH="/usr/local/libexec /bcftools" -c -o main.o main.c
gcc -g -Wall -Wc++-compat -O2 -I. -Ihtslib-1.3 -DPLUGINPATH="/usr/local/libexec /bcftools" -c -o vcfindex.o vcfindex.c
gcc -g -Wall -Wc++-compat -O2 -I. -Ihtslib-1.3 -DPLUGINPATH="/usr/local/libexec /bcftools" -c -o tabix.o tabix.c
gcc -g -Wall -Wc++-compat -O2 -I. -Ihtslib-1.3 -DPLUGINPATH="/usr/local/libexec /bcftools" -c -o vcfstats.o vcfstats.c
gcc -g -Wall -Wc++-compat -O2 -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 -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 -I. -Ihtslib-1.3 -DPLUGINPATH="/usr/local/libexec /bcftools" -c -o vcfquery.o vcfquery.c
gcc -g -Wall -Wc++-compat -O2 -I. -Ihtslib-1.3 -DPLUGINPATH="/usr/local/libexec /bcftools" -c -o vcffilter.o vcffilter.c
gcc -g -Wall -Wc++-compat -O2 -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 -I. -Ihtslib-1.3 -DPLUGINPATH="/usr/local/libexec /bcftools" -c -o vcfsom.o vcfsom.c
gcc -g -Wall -Wc++-compat -O2 -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]);
^
gcc -g -Wall -Wc++-compat -O2 -I. -Ihtslib-1.3 -DPLUGINPATH="/usr/local/libexec /bcftools" -c -o vcfgtcheck.o vcfgtcheck.c
gcc -g -Wall -Wc++-compat -O2 -I. -Ihtslib-1.3 -DPLUGINPATH="/usr/local/libexec /bcftools" -c -o vcfview.o vcfview.c
gcc -g -Wall -Wc++-compat -O2 -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-subscript s]
while ( se && !isspace(se) ) se++;
^
vcfannotate.c:1049:9: warning: array subscript has type ‘char’ [-Wchar-subscript s]
while ( isspace(ss) ) ss++;
^
vcfannotate.c:1051:9: warning: array subscript has type ‘char’ [-Wchar-subscript s]
while ( *se && !isspace(se) ) se++;
^
vcfannotate.c: In function ‘rename_chrs’:
vcfannotate.c:1357:9: warning: array subscript has type ‘char’ [-Wchar-subscript s]
while ( ss && !isspace(ss) ) ss++;
^
vcfannotate.c:1367:9: warning: array subscript has type ‘char’ [-Wchar-subscript s]
while ( ss && isspace(ss) ) ss++;
^
vcfannotate.c:1369:9: warning: array subscript has type ‘char’ [-Wchar-subscript s]
while ( se && !isspace(se) ) se++;
^
gcc -g -Wall -Wc++-compat -O2 -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; // missin g value
^
gcc -g -Wall -Wc++-compat -O2 -I. -Ihtslib-1.3 -DPLUGINPATH="/usr/local/libexec /bcftools" -c -o vcfconcat.o vcfconcat.c
gcc -g -Wall -Wc++-compat -O2 -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++;
^
gcc -g -Wall -Wc++-compat -O2 -I. -Ihtslib-1.3 -DPLUGINPATH="/usr/local/libexec /bcftools" -c -o mcall.o mcall.c
gcc -g -Wall -Wc++-compat -O2 -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; indref; i++) vcmp->dref[i] = toupper(ref1[vcmp->nmatch +i]);
^
vcmp.c:78:5: warning: array subscript has type ‘char’ [-Wchar-subscripts]
for (i=0; indref; 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 -I. -Ihtslib-1.3 -DPLUGINPATH="/usr/local/libexec /bcftools" -c -o gvcf.o gvcf.c
gcc -g -Wall -Wc++-compat -O2 -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 traili ng 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 traili ng newlines
^
gcc -g -Wall -Wc++-compat -O2 -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 -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]);
^
gcc -g -Wall -Wc++-compat -O2 -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 -I. -Ihtslib-1.3 -DPLUGINPATH="/usr/local/libexec /bcftools" -c -o vcfcnv.o vcfcnv.c
gcc -g -Wall -Wc++-compat -O2 -I. -Ihtslib-1.3 -DPLUGINPATH="/usr/local/libexec /bcftools" -c -o HMM.o HMM.c
gcc -g -Wall -Wc++-compat -O2 -I. -Ihtslib-1.3 -DPLUGINPATH="/usr/local/libexec /bcftools" -c -o vcfplugin.o vcfplugin.c
gcc -g -Wall -Wc++-compat -O2 -I. -Ihtslib-1.3 -DPLUGINPATH="/usr/local/libexec /bcftools" -c -o consensus.o consensus.c
consensus.c: In function ‘init_region’:
consensus.c:239:5: warning: array subscript has type ‘char’ [-Wchar-subscripts]
while ( se && !isspace(se) && se!=':' ) se++;
^
consensus.c:253:13: warning: array subscript has type ‘char’ [-Wchar-subscripts]
if ( ss==se || (se && !isspace(se)) ) { from = 0; to = 0; }
^
consensus.c: In function ‘apply_variant’:
consensus.c:452:9: warning: array subscript has type ‘char’ [-Wchar-subscripts]
for (i=0; id.allele[ialt][i] = toupper(rec->d.allele[i alt][i]);
^
consensus.c:454:9: warning: array subscript has type ‘char’ [-Wchar-subscripts]
for (i=0; id.allele[ialt][i] = tolower(rec->d.allele[i alt][i]);
^
consensus.c: In function ‘consensus’:
consensus.c:542:9: warning: array subscript has type ‘char’ [-Wchar-subscripts]
if ( args->fa_case==-1 ) args->fa_case = toupper(str.s[0])==str.s[0] ? 1 : 0;
^
gcc -g -Wall -Wc++-compat -O2 -I. -Ihtslib-1.3 -DPLUGINPATH="/usr/local/libexec /bcftools" -c -o ploidy.o ploidy.c
ploidy.c: In function ‘ploidy_parse’:
ploidy.c:65:5: warning: array subscript has type ‘char’ [-Wchar-subscripts]
while ( *ss && isspace(ss) ) ss++;
^
ploidy.c:66:5: warning: array subscript has type ‘char’ [-Wchar-subscripts]
if ( ss[0]=='' && (!ss[1] || isspace(ss[1])) )
^
ploidy.c:77:5: warning: array subscript has type ‘char’ [-Wchar-subscripts]
while ( *ss && isspace(ss) ) ss++;
^
ploidy.c:80:9: warning: array subscript has type ‘char’ [-Wchar-subscripts]
while ( ss && !isspace(ss) ) ss++;
^
ploidy.c:82:9: warning: array subscript has type ‘char’ [-Wchar-subscripts]
while ( ss && isspace(ss) ) ss++;
^
ploidy.c:88:5: warning: array subscript has type ‘char’ [-Wchar-subscripts]
while ( se && !isspace(se) ) se++;
^
ploidy.c:105:5: warning: array subscript has type ‘char’ [-Wchar-subscripts]
while ( se && isspace(se) ) se++;
^
ploidy.c: In function ‘ploidy_init_string’:
ploidy.c:151:9: warning: array subscript has type ‘char’ [-Wchar-subscripts]
while ( ss && isspace(ss) ) ss++;
^
ploidy.c:157:9: warning: array subscript has type ‘char’ [-Wchar-subscripts]
while ( se && isspace(se) ) se++;
^
gcc -g -Wall -Wc++-compat -O2 -I. -Ihtslib-1.3 -DPLUGINPATH="/usr/local/libexec /bcftools" -c -o version.o version.c
gcc -g -Wall -Wc++-compat -O2 -I. -Ihtslib-1.3 -DPLUGINPATH="/usr/local/libexec /bcftools" -c -o ccall.o ccall.c
gcc -g -Wall -Wc++-compat -O2 -I. -Ihtslib-1.3 -DPLUGINPATH="/usr/local/libexec /bcftools" -c -o em.o em.c
gcc -g -Wall -Wc++-compat -O2 -I. -Ihtslib-1.3 -DPLUGINPATH="/usr/local/libexec /bcftools" -c -o prob1.o prob1.c
gcc -g -Wall -Wc++-compat -O2 -I. -Ihtslib-1.3 -DPLUGINPATH="/usr/local/libexec /bcftools" -c -o kmin.o kmin.c
gcc -o bcftools main.o vcfindex.o tabix.o vcfstats.o vcfisec.o vcfmerge.o vcfqu ery.o vcffilter.o filter.o vcfsom.o vcfnorm.o vcfgtcheck.o vcfview.o vcfannotate .o vcfroh.o vcfconcat.o vcfcall.o mcall.o vcmp.o gvcf.o reheader.o convert.o vcf convert.o tsv2vcf.o vcfcnv.o HMM.o vcfplugin.o consensus.o ploidy.o version.o cc all.o em.o prob1.o kmin.o htslib-1.3/libhts.a -lpthread -lz -lm -ldl
gcc -g -Wall -Wc++-compat -O2 -I. -Ihtslib-1.3 -DPLUGINPATH="/usr/local/libexec /bcftools" -c -o test/test-rbuf.o test/test-rbuf.c
gcc -o test/test-rbuf test/test-rbuf.o -lm
gcc -fPIC -shared -g -Wall -Wc++-compat -O2 -I. -Ihtslib-1.3 -DPLUGINPATH="/usr /local/libexec/bcftools" -o plugins/fill-AN-AC.so version.c plugins/fill-AN-A C.c
version.c:1:0: warning: -fPIC ignored for target (all code is position independe nt)
/_ version.c -- report version numbers for plugins.
^
plugins/fill-AN-AC.c:1:0: warning: -fPIC ignored for target (all code is positio n independent)
/* plugins/fill-AN-AC.c -- fills AN and AC INFO fields.
^
/tmp/cca9Flmb.o: In function version': /cygdrive/c/Users/NicoleJohnMagculia/Home/bin/bcftools-1.3/version.c:35: undefin ed reference tohts_version'
/cygdrive/c/Users/NicoleJohnMagculia/Home/bin/bcftools-1.3/version.c:35:(.text+0 x13): relocation truncated to fit: R_X86_64_PC32 against undefined symbol hts_v ersion' /tmp/ccLHH1WC.o: In functioninit':
/cygdrive/c/Users/NicoleJohnMagculia/Home/bin/bcftools-1.3/plugins/fill-AN-AC.c: 43: undefined reference to bcf_hdr_append' /cygdrive/c/Users/NicoleJohnMagculia/Home/bin/bcftools-1.3/plugins/fill-AN-AC.c: 43:(.text+0x2d): relocation truncated to fit: R_X86_64_PC32 against undefined sy mbolbcf_hdr_append'
/cygdrive/c/Users/NicoleJohnMagculia/Home/bin/bcftools-1.3/plugins/fill-AN-AC.c: 44: undefined reference to bcf_hdr_append' /cygdrive/c/Users/NicoleJohnMagculia/Home/bin/bcftools-1.3/plugins/fill-AN-AC.c: 44:(.text+0x40): relocation truncated to fit: R_X86_64_PC32 against undefined sy mbolbcf_hdr_append'
/tmp/ccLHH1WC.o: In function process': /cygdrive/c/Users/NicoleJohnMagculia/Home/bin/bcftools-1.3/plugins/fill-AN-AC.c: 51: undefined reference tobcf_calc_ac'
/cygdrive/c/Users/NicoleJohnMagculia/Home/bin/bcftools-1.3/plugins/fill-AN-AC.c: 51:(.text+0x82): relocation truncated to fit: R_X86_64_PC32 against undefined sy mbol bcf_calc_ac' /cygdrive/c/Users/NicoleJohnMagculia/Home/bin/bcftools-1.3/plugins/fill-AN-AC.c: 56: undefined reference tobcf_update_info'
/cygdrive/c/Users/NicoleJohnMagculia/Home/bin/bcftools-1.3/plugins/fill-AN-AC.c: 56:(.text+0xe9): relocation truncated to fit: R_X86_64_PC32 against undefined sy mbol bcf_update_info' /cygdrive/c/Users/NicoleJohnMagculia/Home/bin/bcftools-1.3/plugins/fill-AN-AC.c: 57: undefined reference tobcf_update_info'
/cygdrive/c/Users/NicoleJohnMagculia/Home/bin/bcftools-1.3/plugins/fill-AN-AC.c: 57:(.text+0x11d): relocation truncated to fit: R_X86_64_PC32 against undefined s ymbol `bcf_update_info'
collect2: error: ld returned 1 exit status
Makefile:125: recipe for target 'plugins/fill-AN-AC.so' failed

make: *** [plugins/fill-AN-AC.so] Error 1

What seems to be the problem? I badly need your expertise on this matter. Thanks.

Sincerely,

Nicole John

@jmarshall
Copy link
Member

Windows and Cygwin do not support dynamic linking in the same way as the other platforms that bcftools is often compiled on (Linux and other Unixes, OS X). So the parts of htslib and bcftools that need dynamic linking (HTSlib's hfile* plugins and bcftools's plugins) do not yet work on Cygwin.

You have seen this with the lack of the -rdynamic linker option on Cygwin. Your workaround of removing -rdynamic and -ldl from the bcftools link command in the Makefile is the correct one. Removing that is sufficient to produce a working bcftools.exe: if you try and run it I think you will find most bcftools commands work fine.

Unfortunately at the moment, the plugins are unsupported on Cygwin. Someone who is familiar with this level of Cygwin programming will need to supply the equivalent Cygwin linker options needed to build plugin-style dynamic objects so that we can add support to the makefile.

In the meantime, the good news is that you can probably get a lot of work done even without the plugins!

@jmarshall jmarshall changed the title Makefile:125: recipe for target 'plugins/fill-AN-AC.so' failed Cygwin linking problems: no -rdynamic, plugins can't be built Feb 1, 2016
@jmarshall
Copy link
Member

(All the array subscript has type ‘char’ warnings are comparatively minor, and can be temporarily silenced by removing -Wall from the makefile.)

@tpibob
Copy link

tpibob commented Feb 1, 2016

I still get left with make failed the foloowing lines are the error/s area

Bob

gcc -o bcftools main.o vcfindex.o tabix.o vcfstats.o vcfisec.o vcfmerge.o vcfquery.o vcffilter.o filter.o vcfsom.o vcfnorm.o vcfgtcheck.o vcfview.o vcfannotate.o vcfroh.o vcfconcat.o vcfcall.o mcall.o vcmp.o gvcf.o reheader.o convert.o vcfconvert.o tsv2vcf.o vcfcnv.o HMM.o vcfplugin.o consensus.o ploidy.o version.o ccall.o em.o prob1.o kmin.o htslib-1.3/libhts.a -lpthread -lz -lm

gcc -g -Wc++-compat -O2 -std=gnu99 -I. -Dexpl=exp -I. -Ihtslib-1.3 -DPLUGINPATH="/usr/local/libexec/bcftools" -c -o test/test-rbuf.o test/test-rbuf.c

gcc -o test/test-rbuf test/test-rbuf.o -lm

gcc -fPIC -shared -g -Wc++-compat -O2 -std=gnu99 -I. -Dexpl=exp -I. -Ihtslib-1.3 -DPLUGINPATH="/usr/local/libexec/bcftools" -o plugins/fill-AN-AC.so version.c plugins/fill-AN-AC.c
version.c:1:0: warning: -fPIC ignored for target (all code is position independent)
/* version.c -- report version numbers for plugins.
^
plugins/fill-AN-AC.c:1:0: warning: -fPIC ignored for target (all code is position independent)
/* plugins/fill-AN-AC.c -- fills AN and AC INFO fields.
^
/tmp/ccFHcnwQ.o: In function version': /usr/local/bin/bcftools-1.3/version.c:35: undefined reference tohts_version'
/usr/local/bin/bcftools-1.3/version.c:35:(.text+0x13): relocation truncated to fit: R_X86_64_PC32 against undefined symbol hts_version' /tmp/ccwpmlyJ.o: In functioninit':
/usr/local/bin/bcftools-1.3/plugins/fill-AN-AC.c:43: undefined reference to bcf_hdr_append' /usr/local/bin/bcftools-1.3/plugins/fill-AN-AC.c:43:(.text+0x2d): relocation truncated to fit: R_X86_64_PC32 against undefined symbolbcf_hdr_append'
/usr/local/bin/bcftools-1.3/plugins/fill-AN-AC.c:44: undefined reference to bcf_hdr_append' /usr/local/bin/bcftools-1.3/plugins/fill-AN-AC.c:44:(.text+0x40): relocation truncated to fit: R_X86_64_PC32 against undefined symbolbcf_hdr_append'
/tmp/ccwpmlyJ.o: In function process': /usr/local/bin/bcftools-1.3/plugins/fill-AN-AC.c:51: undefined reference tobcf_calc_ac'
/usr/local/bin/bcftools-1.3/plugins/fill-AN-AC.c:51:(.text+0x82): relocation truncated to fit: R_X86_64_PC32 against undefined symbol bcf_calc_ac' /usr/local/bin/bcftools-1.3/plugins/fill-AN-AC.c:56: undefined reference tobcf_update_info'
/usr/local/bin/bcftools-1.3/plugins/fill-AN-AC.c:56:(.text+0xe9): relocation truncated to fit: R_X86_64_PC32 against undefined symbol bcf_update_info' /usr/local/bin/bcftools-1.3/plugins/fill-AN-AC.c:57: undefined reference tobcf_update_info'
/usr/local/bin/bcftools-1.3/plugins/fill-AN-AC.c:57:(.text+0x11d): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `bcf_update_info'
collect2: error: ld returned 1 exit status
Makefile:125: recipe for target 'plugins/fill-AN-AC.so' failed
make: *** [plugins/fill-AN-AC.so] Error 1

@jmarshall
Copy link
Member

Yes, Bob. Those are the same errors as originally reported. They mean you can't build these plugins on Cygwin.

@tpibob
Copy link

tpibob commented Feb 1, 2016

OK thanks John

@dvklopfenstein
Copy link

fyi... I am also having this same error upon installation:

% make plugins

gcc -fPIC -shared -g -Wall -Wc++-compat -O2 -I. -I../htslib -DPLUGINPATH="/usr/local/libexec/bcftools" -o plugins/fill-AN-AC.so version.c plugins/fill-AN-AC.c
version.c:1:0: warning: -fPIC ignored for target (all code is position independent)
/* version.c -- report version numbers for plugins.
^
plugins/fill-AN-AC.c:1:0: warning: -fPIC ignored for target (all code is position independent)
/* plugins/fill-AN-AC.c -- fills AN and AC INFO fields.
^
/tmp/ccbvprL7.o: In function version': /cygdrive/c/Users/note2/Data/git/bcftools/version.c:35: undefined reference tohts_version'
/cygdrive/c/Users/note2/Data/git/bcftools/version.c:35:(.text+0x13): relocation truncated to fit: R_X86_64_PC32 against undefined symbol hts_version' /tmp/ccnc7G5f.o: In functioninit':
/cygdrive/c/Users/note2/Data/git/bcftools/plugins/fill-AN-AC.c:43: undefined reference to bcf_hdr_append' /cygdrive/c/Users/note2/Data/git/bcftools/plugins/fill-AN-AC.c:43:(.text+0x2d): relocation truncated to fit: R_X86_64_PC32 against undefined symbolbcf_hdr_append'
/cygdrive/c/Users/note2/Data/git/bcftools/plugins/fill-AN-AC.c:44: undefined reference to bcf_hdr_append' /cygdrive/c/Users/note2/Data/git/bcftools/plugins/fill-AN-AC.c:44:(.text+0x40): relocation truncated to fit: R_X86_64_PC32 against undefined symbolbcf_hdr_append'
/tmp/ccnc7G5f.o: In function process': /cygdrive/c/Users/note2/Data/git/bcftools/plugins/fill-AN-AC.c:51: undefined reference tobcf_calc_ac'
/cygdrive/c/Users/note2/Data/git/bcftools/plugins/fill-AN-AC.c:51:(.text+0x80): relocation truncated to fit: R_X86_64_PC32 against undefined symbol bcf_calc_ac' /cygdrive/c/Users/note2/Data/git/bcftools/plugins/fill-AN-AC.c:56: undefined reference tobcf_update_info'
/cygdrive/c/Users/note2/Data/git/bcftools/plugins/fill-AN-AC.c:56:(.text+0xe7): relocation truncated to fit: R_X86_64_PC32 against undefined symbol bcf_update_info' /cygdrive/c/Users/note2/Data/git/bcftools/plugins/fill-AN-AC.c:57: undefined reference tobcf_update_info'
/cygdrive/c/Users/note2/Data/git/bcftools/plugins/fill-AN-AC.c:57:(.text+0x11b): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `bcf_update_info'
collect2: error: ld returned 1 exit status
Makefile:125: recipe for target 'plugins/fill-AN-AC.so' failed
make: *** [plugins/fill-AN-AC.so] Error 1

@dvklopfenstein
Copy link

htslib just added support for Cygwin.
bcttools plugins for Cygwin needs the htslib Cygwin dll.
So might one of your contributors now consider adding Cygwin dll support for bcftools plugins?

With the recent checkin from https://github.com/jmarshall the Cygwin dll can now be created.

Here is the commit which adds Cygwin support for htslib

samtools/htslib@2cddfb3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants