Open lconde-ucl opened 3 years ago
Oddly enough, this works in my local (bio)conda but when I set up a fresh environment with Docker I can get it to fail, with this Dockerfile:
FROM ubuntu
RUN apt update && apt install -y wget && mkdir cgpBattenberg
WORKDIR cgpBattenberg
ENV STEP1=unknown
RUN wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh && \
bash Miniconda3-latest-Linux-x86_64.sh -b -p $(pwd)/conda_cgpBattenberg
SHELL ["/bin/bash", "-c"]
RUN source $(pwd)/conda_cgpBattenberg/bin/activate && conda config --add channels defaults && conda config --add channels bioconda && conda config --add channels conda-forge && conda create -n bat -y perl-sanger-cgp-battenberg
RUN source $(pwd)/conda_cgpBattenberg/bin/activate && conda activate bat && battenberg.pl
I see that this recipe was contributed by @chapmanb quite some years ago. You might want to raise this issue with the upstream software maintainers. I see that they make a Docker image available, perhaps that is an alternative here.
@pvanheus I think their docker image does not contain cgpBattenberg as per this comment. Maybe @chapman has any suggestions on how to fix this? Otherwise I'll to install battenberg directly (I was trying cgpBattenberg via bioconda first, as it seemed the easiest way to install battenberg)
lib/Bio/DB/Sam.c: loadable library and perl binaries are mismatched (got handshake key 0xdb00080, needed 0xde00080)
This error indicates that there is a version mismatch between the main Perl executable and an XS module that was compiled for a (significantly) different version.
Sure enough, in the massive pile of packages that is installed when you install perl-sanger-cgp-battenberg, most are Perl 5.26.2 (including the main Perl runtime) but several are built against 5.22.0 — critically perl-bio-db-sam (and also the one that provides PCAP/Cli.pm, as observed).
At some point after perl 5.22.0, perl-bio-db-sam was renamed to perl-bio-samtools (which is a more accurate name matching the upstream name), which provides the same methods and functionality and has been built for 5.26.2.
Many of the bioconda packages in this particular pile have not been rebuilt for years. Ideally the perl-sanger-cgp-battenberg package (or whatever it is that it depends on that brings in perl-bio-db-sam) would be rebuilt with up-to-date dependencies. But in the meantime you should be able to get a working installation by specifying this explicitly with
conda create -n battenbergenv perl-sanger-cgp-battenberg perl-bio-samtools
(and removing any $PERL5LIB
settings that you made to try to get the previous 5.26.2 / 5.22.0 chimera to work), which, for me at least, causes Conda to select an entirely 5.26.2-based set of packages.
@jmarshall Absolutely brilliant, many thanks for the detailed explanation!
Hi,
I downloaded cgpBattemberg via bioconda (perl-sanger-cgp-battenberg, version 1.4.1, built pl5262h779adbc_6) but when I try to run the software (battenberg.pl) it fails with
lib/Bio/DB/Sam.c: loadable library and perl binaries are mismatched (got handshake key 0xdb00080, needed 0xde00080)
errors. Has anybody found the same problem?To replicate the issue, this is what I am doing:
I also tried using the bioconda docker image but as in here the container does not seem to have all the dependencies and fails to find PCAP/Cli.pl
To replicate:
Any help would be greatly appreciated.
Thanks Lucia