vibansal / crisp

Code for multi-sample variant calling from sequence data of pooled or unpooled DNA samples
MIT License
19 stars 8 forks source link

Linker error on Linux #33

Open mys721tx opened 1 year ago

mys721tx commented 1 year ago

GCC 12.2.0 is unable to link objects due to multiple definitions of symbols.

build.log

seb-mueller commented 1 year ago

I get the same error. To go around it I tried to downgrade gcc with a conda environment:

conda create -n gcc gcc=11 zlib libzlib ncurses but not luck, I get the following error even though zlib and ncurses are installed:

gcc -g -Wall -O2  -o samtools bam_tview.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 cut_target
.o phase.o bam2depth.o -Lbcftools  libbam.a -lbcf -lcurses  -lm -lz
/home/user/software/conda/envs/gcc/bin/../lib/gcc/x86_64-conda-linux-gnu/11.4.0/../../../../x86_64-conda-linux-gnu/bin/ld: cannot find -lcurses: No such file or directory
/home/user/software/conda/envs/gcc/bin/../lib/gcc/x86_64-conda-linux-gnu/11.4.0/../../../../x86_64-conda-linux-gnu/bin/ld: cannot find -lz: No such file or directory
collect2: error: ld returned 1 exit status
make[1]: *** [Makefile:44: samtools] Error 1
make[1]: Leaving directory '/home/user/software/tmp/crisp/samtools'
make: *** [Makefile:10: all] Error 2

I'm a bit stuck now..

anrongming commented 8 months ago

I have also encountered the same problem, I would like to ask if anyone has solved this problem