View Single Post
Old 12-15-2015, 07:29 PM   #10
shangjin
Junior Member
 
Location: Hong Kong

Join Date: Dec 2015
Posts: 1
Default

Quote:
Originally Posted by swNGS View Post
How I fixed it... Basically it was that the sym-link to the binaries folder had to be in the root of the dwgsim folder to allow it to compile. Once that was done, the samtools binaries can be deleted.
I also have a similar problems with yours.
I renamed samtools-1.2 as samtools, and placed it in the root of the dwgsim folder. Then I type make. But I got this error.

make[1]: Entering directory `/newdisk/genome/velvet_1.2.10/MetaVelvetSLv1.0/dwgsim/samtools'
gcc -g -Wall -O3 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_USE_KNETFILE -DPACKAGE_VERSION="0.1.11" -I. -c -o bam_index.o bam_index.c
bam_index.c:27:24: error: htslib/hts.h: No such file or directory
bam_index.c:28:24: error: htslib/sam.h: No such file or directory
bam_index.c:29:26: error: htslib/khash.h: No such file or directory
bam_index.c: In function ‘bam_index’:
bam_index.c:75: warning: implicit declaration of function ‘bam_index_build’
bam_index.c: In function ‘bam_idxstats’:
bam_index.c:81: error: ‘hts_idx_t’ undeclared (first use in this function)
bam_index.c:81: error: (Each undeclared identifier is reported only once
bam_index.c:81: error: for each function it appears in.)
bam_index.c:81: error: ‘idx’ undeclared (first use in this function)
bam_index.c:82: error: ‘bam_hdr_t’ undeclared (first use in this function)
bam_index.c:82: error: ‘header’ undeclared (first use in this function)
bam_index.c:83: error: ‘samFile’ undeclared (first use in this function)
bam_index.c:83: error: ‘fp’ undeclared (first use in this function)
bam_index.c:89: warning: implicit declaration of function ‘sam_open’
bam_index.c:91: warning: implicit declaration of function ‘sam_hdr_read’
bam_index.c:92: warning: implicit declaration of function ‘sam_index_load’
bam_index.c:101: warning: implicit declaration of function ‘hts_idx_get_stat’
bam_index.c:105: warning: implicit declaration of function ‘hts_idx_get_n_no_coor’
bam_index.c:106: warning: implicit declaration of function ‘bam_hdr_destroy’
bam_index.c:107: warning: implicit declaration of function ‘hts_idx_destroy’
bam_index.c:108: warning: implicit declaration of function ‘sam_close’
make[1]: *** [bam_index.o] Error 1
make[1]: Leaving directory `/newdisk/genome/velvet_1.2.10/MetaVelvetSLv1.0/dwgsim/samtools'
make: *** [all-recur] Error 1
[root@localhost dwgsim]# make clean
make[1]: Entering directory `/newdisk/genome/velvet_1.2.10/MetaVelvetSLv1.0/dwgsim/samtools'
make[1]: *** No rule to make target `cleanlocal'. Stop.
make[1]: Leaving directory `/newdisk/genome/velvet_1.2.10/MetaVelvetSLv1.0/dwgsim/samtools'
make: *** [cleanlocal-recur] Error 1
[root@localhost dwgsim]# make
make[1]: Entering directory `/newdisk/genome/velvet_1.2.10/MetaVelvetSLv1.0/dwgsim/samtools'
gcc -g -Wall -O3 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_USE_KNETFILE -DPACKAGE_VERSION="0.1.11" -I. -c -o bam_index.o bam_index.c
bam_index.c:27:24: error: htslib/hts.h: No such file or directory
bam_index.c:28:24: error: htslib/sam.h: No such file or directory
bam_index.c:29:26: error: htslib/khash.h: No such file or directory
bam_index.c: In function ‘bam_index’:
bam_index.c:75: warning: implicit declaration of function ‘bam_index_build’
bam_index.c: In function ‘bam_idxstats’:
bam_index.c:81: error: ‘hts_idx_t’ undeclared (first use in this function)
bam_index.c:81: error: (Each undeclared identifier is reported only once
bam_index.c:81: error: for each function it appears in.)
bam_index.c:81: error: ‘idx’ undeclared (first use in this function)
bam_index.c:82: error: ‘bam_hdr_t’ undeclared (first use in this function)
bam_index.c:82: error: ‘header’ undeclared (first use in this function)
bam_index.c:83: error: ‘samFile’ undeclared (first use in this function)
bam_index.c:83: error: ‘fp’ undeclared (first use in this function)
bam_index.c:89: warning: implicit declaration of function ‘sam_open’
bam_index.c:91: warning: implicit declaration of function ‘sam_hdr_read’
bam_index.c:92: warning: implicit declaration of function ‘sam_index_load’
bam_index.c:101: warning: implicit declaration of function ‘hts_idx_get_stat’
bam_index.c:105: warning: implicit declaration of function ‘hts_idx_get_n_no_coor’
bam_index.c:106: warning: implicit declaration of function ‘bam_hdr_destroy’
bam_index.c:107: warning: implicit declaration of function ‘hts_idx_destroy’
bam_index.c:108: warning: implicit declaration of function ‘sam_close’
make[1]: *** [bam_index.o] Error 1
make[1]: Leaving directory `/newdisk/genome/velvet_1.2.10/MetaVelvetSLv1.0/dwgsim/samtools'
make: *** [all-recur] Error 1

###############################################
Then I checked the samtools folder. There is a folder named htslib-1.2.1. Within this folder, there a folder named htslib. The problem is that I found the files hts.h, sam.h, and khash.h. I don't understand why it reported that there are no these files.

Thank you very much for your suggestion.
shangjin is offline   Reply With Quote