Open KatharinaHoff opened 3 years ago
tldr; - probably a version of HTSlib lower than 1.10 is used - see docs/INSTALL.md for help
Please check the compiler call
cc -Wall -O2 -I/usr/include/htslib -I/usr/local/include/htslib/ -c bam2wig.c
In this case, the HTSlib header files are in their default location /usr/ . You can find out the HTSlib version in this case using your package manager or try the following:
`find /usr -name libhts.`
In my case, which reproduced the error, the file /usr/lib/x86_64-linux-gnu/libhts.so.1.7-2 was found, which means that version 1.7 is installed.
I have all kinds of htslib versions lol some are compatible, some are not. I guess this one will be compatible: /usr/lib/x86_64-linux-gnu/libhts.so.1.10.2-3 - but I don't recall whether that was installed via the ubuntu package manager, or manually compiled. (I also have 1.9 and 1.8 in /usr/bin/htslib and /usr/local/lib/)
@KatharinaHoff The fix is:
Download htslib 1.10 and manually compile, "install" locally, put it in your $PATH in bashrc file
Change Lines 33 and 34 in your common.mk file of the Augustus folder (downloaded from GitHub) to where you locally installed the htslib 1.10:
#INCLUDE_PATH_HTSLIB := -I/home/user/Programs/htslib/include
#LIBRARY_PATH_HTSLIB := -L/home/user/Programs/htslib -Wl,-rpath,/home/cbfgws6/Programs/htslib
Change the MakeFile for Bam2Wig (Augustus/auxprogs/bam2wig) on Lines 25 to read where your local htslib 1.10 folder is:
HTSLIB_INSTALL_DIR ?= $(HOME)/Programs/htslib
and Line 40 to read:
INCLUDE_PATH_HTSLIB ?= -I/home/user/Programs/htslib/include/htslib -I/home/user/Programs/htslib/include/htslib
Then follow the Augustus compile instructions and should work (works for Ubuntu 18.04).
I have an Ubuntu 20.04 and followed the package install instructions at https://github.com/Gaius-Augustus/Augustus/blob/master/docs/INSTALL.md#HTSlib bam2wig fails to compile. (Not a problem for me personally, but probably annoying for other users)
Message:
The reference to Readme.md is not very useful, it would make more sense to refer to the install.md - but as stated above, that also doesn't solve the problem, yet.
It would be great if you could fix this for external users, @hmehlan :-) It's a matter of documentation, the libraries don't sit in that homebrew path in common.mk, I think they reside in /usr/local/lib on Ubuntu 20.04