Data Integrator
|
Compiling Dintor on Mac OS X is a bit complicated and deserves some more information presented in this document.
Things get a lot easier, if there are some package managers around. We highly recommend the following:
Most of the Perl programs can be installed with cpanm
from perlbrew. We have tested Dintor on Perl 5.10 (long time ago), 5.14 (as of 2019) and 5.28 (as of 2019, too). For example, Class::InsideOut is installed with cpanm
as follows:
cpanm install Class::InsideOut
Few packages cannot be installed via cpanm
, either they are not available or cause problems during compilation. These are listed here.
As of writing this (2019-01-31), Fink's openssl library did not allow flawless compilation of Net::SSLeay, which is one of IO::Socket::SSL's dependencies. cpanm
has an experimental option for passing building arguments, –configure-args
, as otherwise the library located in /sw
is not found. This and switching to GCC5 allows compilation, forcing installation as one or two unit tests fail:
cpanm install --force IO::Socket::SSL \ --configure-args='CC="env MACOSX_DEPLOYMENT_TARGET=10.4 gcc-fsf-5" INC="-I/sw/include" LDFLAGS="-L/sw/lib" LD="env MACOSX_DEPLOYMENT_TARGET=10.4 gcc-fsf-5 -L/sw/lib"'
Notice the MACOSX_DEPLOYMENT_TARGET=10.4
, which tells OSX to build binaries compatible with 10.4 and higher. Perl 5.28 by default has this set to 10.3, it probably also works with the variable set to this value. This can be found by looking at the output of perl -V
This Perl module needs htslib
from SAMTools, see Compiling C programs for Ensembl API below for more information.
The linker command has an option -Wl,-rpath,/sw/lib
, which is incompatible with Perl's MACOSX_DEPLOYMENT_TARGET=10.3
. According to an error message of the compiler this option is available only for 10.5 and higher. Compiling with 10.5 as shown above gives binary compatibility issues with Perl and libraries during runtime. So my solution is to provide a crafted cc
command that removes this option from the build process that is handled deeply in Perl:
Be sure you are using the right Perl version, perl –version
Unset the default compiler: unset CC
Create a bash script $HOME/cc
and make it executable:
#!/bin/bash new=$(sed -E 's/-Wl,-rpath,\/sw\/lib//' <<<"$@") clang $new
Make it first in PATH
shell environment variable: export PATH="$HOME:$PATH"
cpanm install –force Bio::DB::HTS
Again, we –force
installation, as there were two issues with a memory reallocation that was not allocated before. This is indeed worrying, but the Dintor code passed all unit tests with this Perl code.
Tabix is part of the SAMTools suite, and has been integrated there. Even though the source code is mainted actively, we did not find the necessary Tabix.pm
Perl module. Therefore, we remain with the pretty old tabix tool from git, tabix.git. The following shows installation for Perl 5.28
perlbrew use 5.28 git clone https://github.com/samtools/tabix.git tabix-git cd tabix-git make all cd perl perl Makefile.PL PREFIX="$HOME/perl5/perlbrew/perls/perl-5.28.1" make make install
There are some warnings, but they can be ignored. Ultimately, the binary tabix-git/tabix
must be copied to some directory in the search path.
The Dintor website hosts all necessary Ensembl Perl APIs in a file, ensembl-api.tgz
. It also includes instructions for compilation of the small C programs that do the linkage disequilibrium calculations, which need htslib
installed on the system. Using Fink on Mac OS X, this is accomplished by
sudo fink install libhts2-dev libhts2-shlibs
and on Linux these packages are called libhts2
and libhts2-dev
.