-
Notifications
You must be signed in to change notification settings - Fork 460
Description
I got some errors when I was compiling htslib in ubuntu 20; Please help
gcc version gcc (Ubuntu 9.3.0-10ubuntu2) 9.3.0
$ git clone https://github.com/samtools/htslib.git
$ cd htslib
$ autoheader
$ autoconf
$ ./configure
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for ranlib... ranlib
checking for grep that handles long lines and -e... /bin/grep
checking for C compiler warning flags... -Wall
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for special C compiler options needed for large files... no
checking for _FILE_OFFSET_BITS value needed for large files... no
checking shared library type for unknown-Linux... plain .so
checking whether the compiler accepts -fvisibility=hidden... yes
checking how to run the C preprocessor... gcc -E
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for stdlib.h... (cached) yes
checking for unistd.h... (cached) yes
checking for sys/param.h... yes
checking for getpagesize... yes
checking for working mmap... yes
checking for gmtime_r... yes
checking for fsync... yes
checking for drand48... yes
checking for srand48_deterministic... no
checking whether fdatasync is declared... yes
checking for fdatasync... yes
checking for library containing log... -lm
checking for zlib.h... yes
checking for inflate in -lz... yes
checking for library containing recv... none required
checking for bzlib.h... yes
checking for BZ2_bzBuffToBuffCompress in -lbz2... yes
checking for lzma.h... yes
checking for lzma_easy_buffer_encode in -llzma... yes
checking for libdeflate.h... no
checking for libdeflate_deflate_compress in -ldeflate... no
checking for curl_easy_pause in -lcurl... yes
checking for CCHmac... no
checking for library containing HMAC... -lcrypto
checking whether PTHREAD_MUTEX_RECURSIVE is declared... yes
configure: creating ./config.status
config.status: creating config.mk
config.status: creating htslib.pc.tmp
config.status: creating config.h
$ make
gcc -Wall -g -O2 -fvisibility=hidden -I. -c -o kfunc.o kfunc.c
gcc -Wall -g -O2 -fvisibility=hidden -I. -c -o knetfile.o knetfile.c
gcc -Wall -g -O2 -fvisibility=hidden -I. -c -o kstring.o kstring.c
gcc -Wall -g -O2 -fvisibility=hidden -I. -c -o bcf_sr_sort.o bcf_sr_sort.c
gcc -Wall -g -O2 -fvisibility=hidden -I. -c -o bgzf.o bgzf.c
gcc -Wall -g -O2 -fvisibility=hidden -I. -c -o errmod.o errmod.c
gcc -Wall -g -O2 -fvisibility=hidden -I. -c -o faidx.o faidx.c
gcc -Wall -g -O2 -fvisibility=hidden -I. -c -o header.o header.c
gcc -Wall -g -O2 -fvisibility=hidden -I. -c -o hfile.o hfile.c
gcc -Wall -g -O2 -fvisibility=hidden -I. -c -o hfile_net.o hfile_net.c
echo '#define HTS_VERSION_TEXT "1.10.2-71-ge05d8dc"' > version.h
gcc -Wall -g -O2 -fvisibility=hidden -I. -c -o hts.o hts.c
In file included from cram/cram.h:46,
from hts.c:44:
./header.h:232:24: error: unknown type name ‘sam_hdr_t’; did you mean ‘bam_hdr_t’?
232 | int sam_hdr_fill_hrecs(sam_hdr_t *bh);
| ^~~~~~~~~
| bam_hdr_t
./header.h:241:21: error: unknown type name ‘sam_hdr_t’; did you mean ‘bam_hdr_t’?
241 | int sam_hdr_rebuild(sam_hdr_t *bh);
| ^~~~~~~~~
| bam_hdr_t
./header.h:249:1: error: unknown type name ‘sam_hrecs_t’; use ‘struct’ keyword to refer to the type
249 | sam_hrecs_t *sam_hrecs_new(void);
| ^~~~~~~~~~~
| struct
./header.h:255:1: error: unknown type name ‘sam_hrecs_t’; use ‘struct’ keyword to refer to the type
255 | sam_hrecs_t *sam_hrecs_dup(sam_hrecs_t *hrecs);
| ^~~~~~~~~~~
| struct
./header.h:255:28: error: unknown type name ‘sam_hrecs_t’; did you mean ‘sam_hrec_sq_t’?
255 | sam_hrecs_t *sam_hrecs_dup(sam_hrecs_t *hrecs);
| ^~~~~~~~~~~
| sam_hrec_sq_t
./header.h:264:34: error: unknown type name ‘sam_hdr_t’; did you mean ‘bam_hdr_t’?
264 | int sam_hdr_update_target_arrays(sam_hdr_t *bh, const sam_hrecs_t *hrecs,
| ^~~~~~~~~
| bam_hdr_t
./header.h:264:55: error: unknown type name ‘sam_hrecs_t’
264 | int sam_hdr_update_target_arrays(sam_hdr_t *bh, const sam_hrecs_t *hrecs,
| ^~~~~~~~~~~
./header.h:273:34: error: unknown type name ‘sam_hrecs_t’
273 | int sam_hrecs_rebuild_text(const sam_hrecs_t *hrecs, kstring_t *ks);
| ^~~~~~~~~~~
./header.h:281:21: error: unknown type name ‘sam_hrecs_t’; did you mean ‘sam_hrec_sq_t’?
281 | void sam_hrecs_free(sam_hrecs_t *hrecs);
| ^~~~~~~~~~~
| sam_hrec_sq_t
./header.h:290:41: error: unknown type name ‘sam_hrecs_t’; did you mean ‘sam_hrec_sq_t’?
290 | sam_hrec_type_t *sam_hrecs_find_type_id(sam_hrecs_t *hrecs, const char *type,
| ^~~~~~~~~~~
| sam_hrec_sq_t
./header.h:297:26: error: unknown type name ‘sam_hrecs_t’; did you mean ‘sam_hrec_sq_t’?
297 | int sam_hrecs_remove_key(sam_hrecs_t *hrecs,
| ^~~~~~~~~~~
| sam_hrec_sq_t
./header.h:307:34: error: unknown type name ‘sam_hrecs_t’; did you mean ‘sam_hrec_sq_t’?
307 | sam_hrec_rg_t *sam_hrecs_find_rg(sam_hrecs_t *hrecs, const char *rg);
| ^~~~~~~~~~~
| sam_hrec_sq_t
./header.h:310:42: error: unknown type name ‘sam_hrecs_t’; did you mean ‘sam_hrec_sq_t’?
310 | enum sam_sort_order sam_hrecs_sort_order(sam_hrecs_t *hrecs);
| ^~~~~~~~~~~
| sam_hrec_sq_t
./header.h:313:44: error: unknown type name ‘sam_hrecs_t’; did you mean ‘sam_hrec_sq_t’?
313 | enum sam_group_order sam_hrecs_group_order(sam_hrecs_t *hrecs);
| ^~~~~~~~~~~
| sam_hrec_sq_t
In file included from cram/cram.h:47,
from hts.c:44:
cram/cram_structs.h:688:5: error: unknown type name ‘sam_hdr_t’
688 | sam_hdr_t *header;
| ^~~~~~~~~
In file included from cram/cram.h:48,
from hts.c:44:
cram/cram_io.h:672:24: error: unknown type name ‘sam_hdr_t’; did you mean ‘bam_hdr_t’?
672 | int refs2id(refs_t *r, sam_hdr_t *hdr);
| ^~~~~~~~~
| bam_hdr_t
cram/cram_io.h:829:1: error: unknown type name ‘sam_hdr_t’; use ‘struct’ keyword to refer to the type
829 | sam_hdr_t *cram_read_SAM_hdr(cram_fd *fd);
| ^~~~~~~~~
| struct
cram/cram_io.h:837:37: error: unknown type name ‘sam_hdr_t’; did you mean ‘bam_hdr_t’?
837 | int cram_write_SAM_hdr(cram_fd *fd, sam_hdr_t *hdr);
| ^~~~~~~~~
| bam_hdr_t
cram/cram_io.h:930:41: error: unknown type name ‘sam_hdr_t’
930 | int cram_set_header2(cram_fd *fd, const sam_hdr_t *hdr);
| ^~~~~~~~~
In file included from cram/cram.h:50,
from hts.c:44:
cram/cram_decode.h:105:23: error: unknown type name ‘sam_hdr_t’; did you mean ‘bam_hdr_t’?
105 | sam_hdr_t *hdr);
| ^~~~~~~~~
| bam_hdr_t
hts.c: In function ‘hts_close’:
hts.c:1230:5: warning: implicit declaration of function ‘sam_hdr_destroy’; did you mean ‘bam_hdr_destroy’? [-Wimplicit-function-declaration]
1230 | sam_hdr_destroy(fp->bam_header);
| ^~~~~~~~~~~~~~~
| bam_hdr_destroy
make: *** [Makefile:134: hts.o] Error 1