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

Installation issue - hts_utils #50

Open
achernom opened this issue Nov 3, 2021 · 1 comment
Open

Installation issue - hts_utils #50

achernom opened this issue Nov 3, 2021 · 1 comment

Comments

@achernom
Copy link

achernom commented Nov 3, 2021

I get error during compilation time for hts_utils.cpp. I tried with utslib 1.10.2 and 1.14.
Could you please provide me a hint about how to solve these issues?
I am including an excerpt of the error messages I received:

/home/ariel/Downloads/popscle/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/ariel/Downloads/popscle/hts_utils.h:47:0,
from /home/ariel/Downloads/popscle/hts_utils.cpp:24:
/usr/local/include/htslib/faidx.h:69:8: note: forward declaration of ‘faidx_t {aka struct faidx_t}’
struct faidx_t;
^~~~~~~
CMakeFiles/popscle.dir/build.make:470: recipe for target 'CMakeFiles/popscle.dir/hts_utils.cpp.o' failed
make[2]: *** [CMakeFiles/popscle.dir/hts_utils.cpp.o] Error 1
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/popscle.dir/all' failed
make[1]: *** [CMakeFiles/popscle.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2

@achernom
Copy link
Author

achernom commented Nov 3, 2021

I found that, despite I specified HTS DIRS via
cmake -DHTS_INCLUDE_DIRS=../../htslib-1.10.2/ -DHTS_LIBRARIES=../../htslib-1.10.2/libhts.a ..
somehow the compilation process considered a system level directory at /usr/include/htslib.
Once I fixed that, I could compile with version htslib-1.10.2 (but not with 1.14 :-( )

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