Zachariah K Zachariah wrote:
Hello,
I am having some trouble compiling SAMtools on a Solaris10 X86 p latform using gcc compiler version 3.4.6. Using the Makefile I get some link errors and have not been successful in creating the binary or the associated libraries. It seemed to me that it was missing the socket library. I tried adding -lsocket to the compile directive but landed up with no resolution. Here is a transcript of the make command used to build the binary file. I'd sure appreciate some help/pointers from experienced people of this list. Thanks in advance.
Hi, This is a question more suitable for the SAMtools mailing list(s) since it's not specific to Galaxy: http://sourceforge.net/mail/?group_id=246254 That said, I'll try to help answer your question.
root >> make make[1]: Entering directory `/home/zkzac/samtools-0.1.12a' make[2]: Entering directory `/home/zkzac/samtools-0.1.12a'
...
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 bam2bcf.o bam2bcf_indel.o errmod.o sample.o libbam.a -lm -lcurses -lz -Lbcftools -lbcf Undefined first referenced symbol in file socket libbam.a(knetfile.o) setsockopt libbam.a(knetfile.o) connect libbam.a(knetfile.o) getaddrinfo libbam.a(knetfile.o) freeaddrinfo libbam.a(knetfile.o) ld: fatal: Symbol referencing errors. No output written to samtools collect2: ld returned 1 exit status make[1]: *** [samtools] Error 1 make[1]: Leaving directory `/home/zkzac/samtools-0.1.12a' make: *** [all-recur] Error 1
I'm not sure where you added socket to the compilation but it's not present when linking. If it was in the right place, you'd see it in the output of 'gcc -o samtools' as above. I added it to the Makefile like so: samtools:lib-recur $(AOBJS) $(CC) $(CFLAGS) -o $@ $(AOBJS) libbam.a -lm $(LIBPATH) $(LIBCURSES) -lz -Lbcftools -lbcf -lsocket -lnsl Note -lnsl, you probably need that too. Hope this helps, --nate
_______________________________________________ To manage your subscriptions to this and other Galaxy lists, please use the interface at: