Ensembl / Bio-DB-HTS

Git repo for Bio::DB::HTS module on CPAN, providing Perl links into HTSlib
Apache License 2.0
24 stars 16 forks source link

Tests fail with htslib 1.11 #94

Closed keiranmraine closed 3 years ago

keiranmraine commented 3 years ago

Worked okay with 1.10.2 but no longer installs with htslib 1.11:

c_tests/02_bam_access_tests.c:32:19: error: conflicting types for ‘kputsn’
   32 | static inline int kputsn(const char *p, int l, kstring_t *s)
      |                   ^~~~~~
In file included from /install_tmp/tmp_htslib/htslib/hts.h:37,
                 from /install_tmp/tmp_htslib/htslib/sam.h:31,
                 from ./bam_access.h:26,
                 from c_tests/02_bam_access_tests.c:22:
/install_tmp/tmp_htslib/htslib/kstring.h:224:19: note: previous definition of ‘kputsn’ was here
  224 | static inline int kputsn(const char *p, size_t l, kstring_t *s)
      |                   ^~~~~~
c_tests/02_bam_access_tests.c:46:19: error: redefinition of ‘kputs’
   46 | static inline int kputs(const char *p, kstring_t *s)
      |                   ^~~~~
In file included from /install_tmp/tmp_htslib/htslib/hts.h:37,
                 from /install_tmp/tmp_htslib/htslib/sam.h:31,
                 from ./bam_access.h:26,
                 from c_tests/02_bam_access_tests.c:22:
/install_tmp/tmp_htslib/htslib/kstring.h:235:19: note: previous definition of ‘kputs’ was here
  235 | static inline int kputs(const char *p, kstring_t *s)
      |                   ^~~~~
c_tests/02_bam_access_tests.c: In function ‘test_bam_access_parse_header’:
c_tests/02_bam_access_tests.c:103:16: warning: unused variable ‘grp_stats’ [-Wunused-variable]
  103 |  stats_rd_t*** grp_stats;
      |                ^~~~~~~~~
c_tests/02_bam_access_tests.c:102:6: warning: unused variable ‘grps_size’ [-Wunused-variable]
  102 |  int grps_size = 0;
      |      ^~~~~~~~~
make: *** [<builtin>: c_tests/02_bam_access_tests] Error 1
jmarshall commented 3 years ago

These errors are not from Bio-DB-HTS.

They are from _PCAP-core/c/c_tests/02_bam_accesstests.c, which contains its own now-outdated copies of kputsn() etc.

keiranmraine commented 3 years ago

Thanks @jmarshall, not sure how I missed that.