Docker Community Forums

Share and learn in the Docker community.

Docker unable to build, apparently missing lperl?

Dockerfile here, I know it’s quite messy, quite a beginner and am pulling bits and pieces from other projects so let me know if I’m doing something dangerously wrong!

Docker build fail log here. It’s quite long but I think these are the critical errors (near the end):

gcc -rdynamic -pthread -o bcftools main.o vcfindex.o tabix.o vcfstats.o vcfisec.o vcfmerge.o vcfquery.o vcffilter.o filter.o vcfsom.o vcfnorm.o vcfgtcheck.o vcfview.o vcfannotate.o vcfroh.o vcfconcat.o vcfcall.o mcall.o vcmp.o gvcf.o reheader.o convert.o vcfconvert.o tsv2vcf.o vcfcnv.o HMM.o consensus.o ploidy.o bin.o hclust.o version.o regidx.o smpl_ilist.o csq.o vcfbuf.o mpileup.o bam2bcf.o bam2bcf_indel.o bam_sample.o vcfsort.o cols.o ccall.o em.o prob1.o kmin.o polysomy.o peakfit.o vcfplugin.o ../htslib/libhts.a -lz -lm -lbz2 -llzma -lcurl -lm -lz -ldl -ldl -lgsl -lgslcblas -Wl,-E -fstack-protector-strong -L/usr/local/lib -L/usr/lib/x86_64-linux-gnu/perl/5.24/CORE -lperl -ldl -lm -lpthread -lc -lcrypt
/
usr
/
bin
/
ld
:
cannot
find
-
lperl
collect2: error: ld returned 1 exit status
Makefile:203: recipe for target 'bcftools' failed
make: *** [bcftools] Error 1

This is most likely the offending line (39) in Dockerfile:

RUN git clone git://github.com/samtools/bcftools.git && cd bcftools && autoheader && autoconf && ./configure --enable-libgsl --enable-perl-filters && make && cd /

bcftools github here
And also I have installed libperl-dev and zlib1g-dev at the start (line 14, 15). Other parts of the Dockerfile and failed build log seems to be interacting with perl just fine.

Does anyone know what might be going wrong here?
Thanks in advance!

Not sure what the problem was in the end, but I have removed ./configure --enable-libgsl --enable-perl-filters since they were labelled as ‘optional’ by its authors, and the build could proceed from this point.