popucui / bsmap

Automatically exported from code.google.com/p/bsmap
0 stars 0 forks source link

compile error #10

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. make
2.
3.

What is the expected output? What do you see instead?

g++ -DMAXHITS=100 -DTHREAD -funroll-loops -Lsamtools -Isamtools -O3   
-DREAD_144 -c align.cpp -o align.o
align.cpp: In member function ‘void SingleAlign::s_OutHit(int, int, bit8_t, 
Hit*, int, RefSeq&, std::string&)’:
align.cpp:574:213: warning: format ‘%d’ expects argument of type ‘int’, 
but argument 7 has type ‘std::basic_string<char>::size_type {aka long 
unsigned int}’ [-Wformat]
g++ -DMAXHITS=100 -DTHREAD -funroll-loops -Lsamtools -Isamtools -O3   
-DREAD_144 -c dbseq.cpp -o dbseq.o
g++ -DMAXHITS=100 -DTHREAD -funroll-loops -Lsamtools -Isamtools -O3   
-DREAD_144 -c main.cpp -o main.o
main.cpp: In function ‘int main(int, char**)’:
main.cpp:465:49: warning: ignoring return value of ‘char* realpath(const 
char*, char*)’, declared with attribute warn_unused_result [-Wunused-result]
main.cpp:468:18: warning: ignoring return value of ‘int system(const 
char*)’, declared with attribute warn_unused_result [-Wunused-result]
g++ -DMAXHITS=100 -DTHREAD -funroll-loops -Lsamtools -Isamtools -O3   
-DREAD_144 -c pairs.cpp -o pairs.o
pairs.cpp: In member function ‘void PairAlign::s_OutHitPair(PairHit, int, 
RefSeq&, std::string&)’:
pairs.cpp:323:185: warning: format ‘%d’ expects argument of type ‘int’, 
but argument 7 has type ‘std::basic_string<char>::size_type {aka long 
unsigned int}’ [-Wformat]
pairs.cpp:380:185: warning: format ‘%d’ expects argument of type ‘int’, 
but argument 7 has type ‘std::basic_string<char>::size_type {aka long 
unsigned int}’ [-Wformat]
pairs.cpp: In member function ‘void PairAlign::s_OutHitUnpair(int, int, int, 
int, int, Hit, int, Hit, RefSeq&, std::string&)’:
pairs.cpp:453:177: warning: format ‘%d’ expects argument of type ‘int’, 
but argument 7 has type ‘std::basic_string<char>::size_type {aka long 
unsigned int}’ [-Wformat]
pairs.cpp:458:217: warning: format ‘%d’ expects argument of type ‘int’, 
but argument 7 has type ‘std::basic_string<char>::size_type {aka long 
unsigned int}’ [-Wformat]
g++ -DMAXHITS=100 -DTHREAD -funroll-loops -Lsamtools -Isamtools -O3   
-DREAD_144 -c param.cpp -o param.o
g++ -DMAXHITS=100 -DTHREAD -funroll-loops -Lsamtools -Isamtools -O3   
-DREAD_144 -c reads.cpp -o reads.o
g++ -DMAXHITS=100 -DTHREAD -funroll-loops -Lsamtools -Isamtools -O3   
-DREAD_144 -c utilities.cpp -o utilities.o
(cd samtools; make)
make[1]: Entering directory `/home/comp/twlab/dli/bsmap-2.5/samtools'
make[2]: Entering directory `/home/comp/twlab/dli/bsmap-2.5/samtools'
gcc -c -g -Wall -O2  -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE -D_CURSES_LIB=0  
bgzf.c -o bgzf.o
bgzf.c: In function ‘bgzf_close’:
bgzf.c:593:8: warning: variable ‘count’ set but not used 
[-Wunused-but-set-variable]
gcc -c -g -Wall -O2  -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE -D_CURSES_LIB=0  
kstring.c -o kstring.o
gcc -c -g -Wall -O2  -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE -D_CURSES_LIB=0  
bam_aux.c -o bam_aux.o
gcc -c -g -Wall -O2  -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE -D_CURSES_LIB=0  
bam.c -o bam.o
gcc -c -g -Wall -O2  -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE -D_CURSES_LIB=0  
bam_import.c -o bam_import.o
gcc -c -g -Wall -O2  -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE -D_CURSES_LIB=0  
sam.c -o sam.o
gcc -c -g -Wall -O2  -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE -D_CURSES_LIB=0  
bam_index.c -o bam_index.o
bam_index.c: In function ‘bam_index_load_core’:
bam_index.c:276:7: warning: ignoring return value of ‘fread’, declared with 
attribute warn_unused_result [-Wunused-result]
bam_index.c:283:7: warning: ignoring return value of ‘fread’, declared with 
attribute warn_unused_result [-Wunused-result]
bam_index.c:296:8: warning: ignoring return value of ‘fread’, declared with 
attribute warn_unused_result [-Wunused-result]
bam_index.c:299:9: warning: ignoring return value of ‘fread’, declared with 
attribute warn_unused_result [-Wunused-result]
bam_index.c:303:9: warning: ignoring return value of ‘fread’, declared with 
attribute warn_unused_result [-Wunused-result]
bam_index.c:307:9: warning: ignoring return value of ‘fread’, declared with 
attribute warn_unused_result [-Wunused-result]
bam_index.c:317:8: warning: ignoring return value of ‘fread’, declared with 
attribute warn_unused_result [-Wunused-result]
bam_index.c:321:8: warning: ignoring return value of ‘fread’, declared with 
attribute warn_unused_result [-Wunused-result]
gcc -c -g -Wall -O2  -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE -D_CURSES_LIB=0  
bam_pileup.c -o bam_pileup.o
gcc -c -g -Wall -O2  -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE -D_CURSES_LIB=0  
bam_lpileup.c -o bam_lpileup.o
gcc -c -g -Wall -O2  -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE -D_CURSES_LIB=0  
bam_md.c -o bam_md.o
gcc -c -g -Wall -O2  -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE -D_CURSES_LIB=0  
glf.c -o glf.o
gcc -c -g -Wall -O2  -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE -D_CURSES_LIB=0  
razf.c -o razf.o
razf.c: In function ‘razf_close’:
razf.c:804:9: warning: ignoring return value of ‘write’, declared with 
attribute warn_unused_result [-Wunused-result]
razf.c:805:9: warning: ignoring return value of ‘write’, declared with 
attribute warn_unused_result [-Wunused-result]
razf.c:808:9: warning: ignoring return value of ‘write’, declared with 
attribute warn_unused_result [-Wunused-result]
razf.c:810:9: warning: ignoring return value of ‘write’, declared with 
attribute warn_unused_result [-Wunused-result]
razf.c: In function ‘razf_end_flush’:
razf.c:258:9: warning: ignoring return value of ‘write’, declared with 
attribute warn_unused_result [-Wunused-result]
razf.c: In function ‘_razf_write’:
razf.c:201:8: warning: ignoring return value of ‘write’, declared with 
attribute warn_unused_result [-Wunused-result]
razf.c: In function ‘save_zindex’:
razf.c:96:17: warning: ignoring return value of ‘write’, declared with 
attribute warn_unused_result [-Wunused-result]
razf.c:99:8: warning: ignoring return value of ‘write’, declared with 
attribute warn_unused_result [-Wunused-result]
razf.c:106:7: warning: ignoring return value of ‘write’, declared with 
attribute warn_unused_result [-Wunused-result]
razf.c:107:7: warning: ignoring return value of ‘write’, declared with 
attribute warn_unused_result [-Wunused-result]
razf.c: In function ‘razf_flush’:
razf.c:221:8: warning: ignoring return value of ‘write’, declared with 
attribute warn_unused_result [-Wunused-result]
razf.c:234:9: warning: ignoring return value of ‘write’, declared with 
attribute warn_unused_result [-Wunused-result]
gcc -c -g -Wall -O2  -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE -D_CURSES_LIB=0  
faidx.c -o faidx.o
gcc -c -g -Wall -O2  -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE -D_CURSES_LIB=0  
knetfile.c -o knetfile.o
knetfile.c: In function ‘khttp_connect_file’:
knetfile.c:418:2: warning: ignoring return value of ‘write’, declared with 
attribute warn_unused_result [-Wunused-result]
knetfile.c: In function ‘kftp_send_cmd’:
knetfile.c:239:2: warning: ignoring return value of ‘write’, declared with 
attribute warn_unused_result [-Wunused-result]
gcc -c -g -Wall -O2  -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE -D_CURSES_LIB=0  
bam_sort.c -o bam_sort.o
gcc -c -g -Wall -O2  -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE -D_CURSES_LIB=0  
sam_header.c -o sam_header.o
ar -cru libbam.a bgzf.o kstring.o bam_aux.o bam.o bam_import.o sam.o 
bam_index.o bam_pileup.o bam_lpileup.o bam_md.o glf.o razf.o faidx.o knetfile.o 
bam_sort.o sam_header.o
gcc -c -g -Wall -O2  -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE -D_CURSES_LIB=0  
bam_tview.c -o bam_tview.o
bam_tview.c:409:2: warning: #warning "No curses library is available; tview is 
disabled." [-Wcpp]
gcc -c -g -Wall -O2  -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE -D_CURSES_LIB=0  
bam_maqcns.c -o bam_maqcns.o
gcc -c -g -Wall -O2  -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE -D_CURSES_LIB=0  
bam_plcmd.c -o bam_plcmd.o
gcc -c -g -Wall -O2  -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE -D_CURSES_LIB=0  
sam_view.c -o sam_view.o
gcc -c -g -Wall -O2  -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE -D_CURSES_LIB=0  
bam_rmdup.c -o bam_rmdup.o
gcc -c -g -Wall -O2  -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE -D_CURSES_LIB=0  
bam_rmdupse.c -o bam_rmdupse.o
gcc -c -g -Wall -O2  -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE -D_CURSES_LIB=0  
bam_mate.c -o bam_mate.o
gcc -c -g -Wall -O2  -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE -D_CURSES_LIB=0  
bam_stat.c -o bam_stat.o
gcc -c -g -Wall -O2  -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE -D_CURSES_LIB=0  
bam_color.c -o bam_color.o
gcc -c -g -Wall -O2  -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE -D_CURSES_LIB=0  
bamtk.c -o bamtk.o
gcc -c -g -Wall -O2  -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE -D_CURSES_LIB=0  
kaln.c -o kaln.o
gcc -g -Wall -O2  -o samtools bam_tview.o bam_maqcns.o bam_plcmd.o sam_view.o 
bam_rmdup.o bam_rmdupse.o bam_mate.o bam_stat.o bam_color.o bamtk.o kaln.o -lm  
 -lz -L. -lbam
./libbam.a(bgzf.o): In function `deflate_block':
/home/comp/twlab/dli/bsmap-2.5/samtools/bgzf.c:274: undefined reference to 
`deflate'
/home/comp/twlab/dli/bsmap-2.5/samtools/bgzf.c:276: undefined reference to 
`deflateEnd'
/home/comp/twlab/dli/bsmap-2.5/samtools/bgzf.c:268: undefined reference to 
`deflateInit2_'
/home/comp/twlab/dli/bsmap-2.5/samtools/bgzf.c:292: undefined reference to 
`deflateEnd'
/home/comp/twlab/dli/bsmap-2.5/samtools/bgzf.c:308: undefined reference to 
`crc32'
/home/comp/twlab/dli/bsmap-2.5/samtools/bgzf.c:309: undefined reference to 
`crc32'
./libbam.a(bgzf.o): In function `inflate_block':
/home/comp/twlab/dli/bsmap-2.5/samtools/bgzf.c:342: undefined reference to 
`inflateInit2_'
/home/comp/twlab/dli/bsmap-2.5/samtools/bgzf.c:347: undefined reference to 
`inflate'
/home/comp/twlab/dli/bsmap-2.5/samtools/bgzf.c:353: undefined reference to 
`inflateEnd'
/home/comp/twlab/dli/bsmap-2.5/samtools/bgzf.c:349: undefined reference to 
`inflateEnd'
./libbam.a(bam_import.o): In function `ks_getuntil':
/home/comp/twlab/dli/bsmap-2.5/samtools/bam_import.c:17: undefined reference to 
`gzread'
./libbam.a(bam_import.o): In function `__bam_get_lines':
/home/comp/twlab/dli/bsmap-2.5/samtools/bam_import.c:76: undefined reference to 
`gzdopen'
/home/comp/twlab/dli/bsmap-2.5/samtools/bam_import.c:92: undefined reference to 
`gzclose'
/home/comp/twlab/dli/bsmap-2.5/samtools/bam_import.c:76: undefined reference to 
`gzopen64'
./libbam.a(bam_import.o): In function `sam_header_read2':
/home/comp/twlab/dli/bsmap-2.5/samtools/bam_import.c:126: undefined reference 
to `gzdopen'
./libbam.a(bam_import.o): In function `ks_getc':
/home/comp/twlab/dli/bsmap-2.5/samtools/bam_import.c:17: undefined reference to 
`gzread'
./libbam.a(bam_import.o): In function `sam_header_read2':
/home/comp/twlab/dli/bsmap-2.5/samtools/bam_import.c:143: undefined reference 
to `gzclose'
/home/comp/twlab/dli/bsmap-2.5/samtools/bam_import.c:126: undefined reference 
to `gzopen64'
./libbam.a(bam_import.o): In function `sam_open':
/home/comp/twlab/dli/bsmap-2.5/samtools/bam_import.c:422: undefined reference 
to `gzdopen'
/home/comp/twlab/dli/bsmap-2.5/samtools/bam_import.c:422: undefined reference 
to `gzopen64'
./libbam.a(bam_import.o): In function `sam_close':
/home/comp/twlab/dli/bsmap-2.5/samtools/bam_import.c:435: undefined reference 
to `gzclose'
./libbam.a(razf.o): In function `_razf_write':
/home/comp/twlab/dli/bsmap-2.5/samtools/razf.c:197: undefined reference to 
`deflate'
./libbam.a(razf.o): In function `razf_open_w':
/home/comp/twlab/dli/bsmap-2.5/samtools/razf.c:170: undefined reference to 
`deflateInit2_'
/home/comp/twlab/dli/bsmap-2.5/samtools/razf.c:186: undefined reference to 
`deflateSetHeader'
./libbam.a(razf.o): In function `razf_open_r':
/home/comp/twlab/dli/bsmap-2.5/samtools/razf.c:389: undefined reference to 
`inflateInit2_'
/home/comp/twlab/dli/bsmap-2.5/samtools/razf.c:390: undefined reference to 
`inflateEnd'
./libbam.a(razf.o): In function `_razf_read':
/home/comp/twlab/dli/bsmap-2.5/samtools/razf.c:602: undefined reference to 
`inflate'
./libbam.a(razf.o): In function `razf_flush':
/home/comp/twlab/dli/bsmap-2.5/samtools/razf.c:230: undefined reference to 
`deflate'
./libbam.a(razf.o): In function `_razf_reset_read':
/home/comp/twlab/dli/bsmap-2.5/samtools/razf.c:709: undefined reference to 
`inflateReset'
/home/comp/twlab/dli/bsmap-2.5/samtools/razf.c:709: undefined reference to 
`inflateReset'
./libbam.a(razf.o): In function `razf_close':
/home/comp/twlab/dli/bsmap-2.5/samtools/razf.c:826: undefined reference to 
`inflateEnd'
./libbam.a(razf.o): In function `razf_end_flush':
/home/comp/twlab/dli/bsmap-2.5/samtools/razf.c:254: undefined reference to 
`deflate'
./libbam.a(razf.o): In function `razf_close':
/home/comp/twlab/dli/bsmap-2.5/samtools/razf.c:800: undefined reference to 
`deflateEnd'
collect2: ld returned 1 exit status
make[2]: *** [samtools] Error 1
make[2]: Leaving directory `/home/comp/twlab/dli/bsmap-2.5/samtools'
make[1]: *** [all-recur] Error 1
make[1]: Leaving directory `/home/comp/twlab/dli/bsmap-2.5/samtools'
make: *** [bsmap] Error 2

What version of the product are you using? On what operating system?
Ubuntu 11.10

Please provide any additional information below.

Original issue reported on code.google.com by lid...@gmail.com on 31 Mar 2012 at 10:23

GoogleCodeExporter commented 8 years ago
bsmap 2.5, sorry forget the version info
thanks

Original comment by lid...@gmail.com on 31 Mar 2012 at 10:25

GoogleCodeExporter commented 8 years ago
add 

#include<stdio.h>
#include<stdlib.h>
#include<algorithm>

to the .cpp or .h files not work for me :-(

Original comment by lid...@gmail.com on 31 Mar 2012 at 10:30

GoogleCodeExporter commented 8 years ago
Hi,

You seem to have the similar kind of errors I have faced. I solved this issue 
earlier. You can visit the solution at 
http://code.google.com/p/bsmap/issues/detail?id=7 (issue number 7).

All the best!

Original comment by kalyan...@gmail.com on 19 Jun 2012 at 10:18

GoogleCodeExporter commented 8 years ago
Yes, that works.
Thank you, Kalyan :)

Original comment by lid...@gmail.com on 19 Jun 2012 at 2:17