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

Build fails due to htslib code #70

Open
caldodge opened this issue Nov 10, 2023 · 1 comment
Open

Build fails due to htslib code #70

caldodge opened this issue Nov 10, 2023 · 1 comment

Comments

@caldodge
Copy link

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?

@caldodge
Copy link
Author

This seems to be version-related. I installed htslib and htslib-devel from EPEL, specified the include directory and library file locations, and Popscle built without a problem.

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

No branches or pull requests

1 participant