Blasr Installation Qs & As - pb-cdunn/blasr GitHub Wiki
What if Blasr failed to compile because of the hdf5 errors, such as:
H5Cpp.h: No such file or directory
Answer
These errors are usually due to the fact that hdf5 headers and library are not installed or not found. You may want to:
-
Download and compile hdf5 library
Blasr supports hdf5 1.8.4, 1.8.11 and 1.8.12, which can be downloaded from [http://www.hdfgroup.org/downloads/index.html]. We recommend to install hdf5 from strach (i.e., source code), instead of using the shared library directly. Do:
cd PATH_TO_YOUR_HDF5 # for example $ cd /home/you/hdf5-1.8.12/ ./configure && make
-
Compile blasr with a specific installation of hdf5:
You can install hdf5 to any path that you want, e.g.,
cd PATH_TO_YOUR_HDF5 ./configure --prefix=/home/you/anypath/ && make && make install
and then export the following paths before compile blasr.
cd PATH_TO_YOUR_BLASR export HDF5_INCLUDE=/home/you/anypath/include export HDF5_LIB=/home/you/anypath/lib ./configure.py --no-pbbam --sub make init-submodule make all make install # TODO: double-check this.
See travis.sh.
What if Blasr failed to compile because of libz errors, such as:
In function H5Z_init_interface':H5Z.c:(.text+0x257): undefined reference toSZ_encoder_enabled'
Answer
This is usually due to the fact that the libz library is not found or linked. One possibility is that libz is not installed, which happens rarely; a more common reason is that, in some systems, in order to link a statically compiled program with libz, '-lsz' needs to be used instead of '-lz'. So you may want to pass one or more of these to ./configure.py
:
LIBZ_LIB
LIBZ_LIBFLAGS
LIBZ_INCLUDE
What if blasr failed to run with the following message:
blasr: error while loading shared libraries: libhdf5_cpp.so.8: cannot open shared object file: No such file or directory
####Answer
This happens when you pass --shared
to ./configure.py
.
You may try the following:
# Export path_to_your_HDF5_lib to environment variable LD_LIBRARY_PATH
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:path_to_your_hdf5_lib
# Temporarily export path_to_your_HDF5_lib every time you run blasr
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:path_to_your_hdf5_lib ./blasr
# Permanently copy hdf5 *.so files to system LD_LIBRARY_PATH (e.g., /usr/lib)
# Echo to find your system LD_LIBRARY_PATH
echo $LD_LIBRARY_PATH
# Then copy hdf5 *.so files to your system LD_LIBRARY_PATH