Skip to content

Build fails due to htslib code #70

@caldodge

Description

@caldodge

Building popscle with gcc 9.4. It fails with the following messages:

In file included from /home/dodgec/xiss-64708/popscle-0.1-beta/hts_utils.h:42:0,
from /home/dodgec/xiss-64708/popscle-0.1-beta/hts_utils.cpp:24:
/home/dodgec/xiss-64708/popscle-0.1-beta/hts_utils.cpp: In function ‘char* faidx_fetch_uc_seq(const faidx_t*, const char*, int, int, int*)’:
/home/dodgec/xiss-64708/popscle-0.1-beta/hts_utils.cpp:51:25: error: invalid use of incomplete type ‘const faidx_t {aka const struct faidx_t}’
iter = kh_get(s, fai->hash, c_name);
^
/hpc/apps/htslib/1.18/include/htslib/khash.h:511:42: note: in definition of macro ‘kh_get’
#define kh_get(name, h, k) kh_get_##name(h, k)
^
In file included from /home/dodgec/xiss-64708/popscle-0.1-beta/hts_utils.h:47:0,
from /home/dodgec/xiss-64708/popscle-0.1-beta/hts_utils.cpp:24:
/hpc/apps/htslib/1.18/include/htslib/faidx.h:69:8: error: forward declaration of ‘const faidx_t {aka const struct faidx_t}’
struct faidx_t;
^
In file included from /home/dodgec/xiss-64708/popscle-0.1-beta/hts_utils.h:42:0,
from /home/dodgec/xiss-64708/popscle-0.1-beta/hts_utils.cpp:24:
/home/dodgec/xiss-64708/popscle-0.1-beta/hts_utils.cpp:52:26: error: invalid use of incomplete type ‘const faidx_t {aka const struct faidx_t}’
if(iter == kh_end(fai->hash)) return 0;
^
/hpc/apps/htslib/1.18/include/htslib/khash.h:563:21: note: in definition of macro ‘kh_end’
#define kh_end(h) ((h)->n_buckets)
^
In file included from /home/dodgec/xiss-64708/popscle-0.1-beta/hts_utils.h:47:0,
from /home/dodgec/xiss-64708/popscle-0.1-beta/hts_utils.cpp:24:
/hpc/apps/htslib/1.18/include/htslib/faidx.h:69:8: error: forward declaration of ‘const faidx_t {aka const struct faidx_t}’
struct faidx_t;
^
In file included from /home/dodgec/xiss-64708/popscle-0.1-beta/hts_utils.h:42:0,
from /home/dodgec/xiss-64708/popscle-0.1-beta/hts_utils.cpp:24:
/home/dodgec/xiss-64708/popscle-0.1-beta/hts_utils.cpp:53:23: error: invalid use of incomplete type ‘const faidx_t {aka const struct faidx_t}’
val = kh_value(fai->hash, iter);
^
/hpc/apps/htslib/1.18/include/htslib/khash.h:549:26: note: in definition of macro ‘kh_value’
#define kh_value(h, x) ((h)->vals[x])
^
In file included from /home/dodgec/xiss-64708/popscle-0.1-beta/hts_utils.h:47:0,
from /home/dodgec/xiss-64708/popscle-0.1-beta/hts_utils.cpp:24:
/hpc/apps/htslib/1.18/include/htslib/faidx.h:69:8: error: forward declaration of ‘const faidx_t {aka const struct faidx_t}’
struct faidx_t;
^
/home/dodgec/xiss-64708/popscle-0.1-beta/hts_utils.cpp:61:29: error: invalid use of incomplete type ‘const faidx_t {aka const struct faidx_t}’
int ret = bgzf_useek(fai->bgzf, val.offset + p_beg_i / val.line_blen * val.line_len + p_beg_i % val.line_blen, SEEK_SET);
^
In file included from /home/dodgec/xiss-64708/popscle-0.1-beta/hts_utils.h:47:0,
from /home/dodgec/xiss-64708/popscle-0.1-beta/hts_utils.cpp:24:
/hpc/apps/htslib/1.18/include/htslib/faidx.h:69:8: error: forward declaration of ‘const faidx_t {aka const struct faidx_t}’
struct faidx_t;
^
/home/dodgec/xiss-64708/popscle-0.1-beta/hts_utils.cpp:70:29: error: invalid use of incomplete type ‘const faidx_t {aka const struct faidx_t}’
while ( (c=bgzf_getc(fai->bgzf))>=0 && l < p_end_i - p_beg_i + 1)
^
In file included from /home/dodgec/xiss-64708/popscle-0.1-beta/hts_utils.h:47:0,
from /home/dodgec/xiss-64708/popscle-0.1-beta/hts_utils.cpp:24:
/hpc/apps/htslib/1.18/include/htslib/faidx.h:69:8: error: forward declaration of ‘const faidx_t {aka const struct faidx_t}’
struct faidx_t;
^
make[2]: *** [CMakeFiles/popscle.dir/hts_utils.cpp.o] Error 1
make[1]: *** [CMakeFiles/popscle.dir/all] Error 2
make: *** [all] Error 2

This also happened with htslib 1.17. Does this mean htslib needed some special flags during build?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions