blasr (pacbio) installation on fedora box

I wanted to use blasr tool for Pacbio mapping and had difficulties in using or installing the tool. I first use a local installation of the tool on the provided cluster and it look like the installation was quite old. I then use a bioconda version. The latest version (5.3) was not working on my system (missing library) and this was reported. The previous version worked (5.2) but was missing a needed configuration flag. So, I decided to follow the instructions from pacbio to install a local version. That was not straightforward but finally got it to work. My platform is Fedora 23 and the instructions were given for ubuntu or centos 6.

First, download the source code:

git clone
cd pitchfork
make PREFIX=/tmp/mybuild blasr

This command installs zlib, bzip2, boost and hdf5 to start with.
The first issue arised from an error in the compilation of the hdf5 dependency due to missing iostream in the compilation of the hdf5 library

H5 Attribute.cpp fatal error iostream.h no such file

The solution was to edit the Makefile in workspace/hdf5-1.8.16/c++
and to comment this line (adding a # character in front))


Come back to the main pitchfork directory, type the make command again (see above). Another failure due to similar compilation error related to the namespace occured. Again, I edited the Makefile in
workspace/hdf5-1.8.16/c++/test/Makefile and commented the same line.

Next, I got a linking issue

/usr/bin/ld: cannot find -lstd++

This was solved by installing the stdc++ static library. I figure out the solution by typing:

ld -lstdc++

to see that none of the standard path could find the library despite the presence of the /usr/lib/

yum install libstdc++-static

Again, type

make hdf5 PREFIX=/tmp/mybuild

I got

ptableTest.cpp:20:19: error: expected namespace-name before ‘;’ token
 using namespace H5;
Makefile:745: recipe for target 'ptableTest.o' failed
make[5]: *** [ptableTest.o] Error 1

so again, needed to find the culprit: a Makefile and it was in
In workspace/hdf5-1.8.16/c++/hl/test/Makefile . Again comment the same line as shown above.

Back to blasr, the make then failed when trying to install ncurses.

Here I tried a different strategy and tried to use the packages installed with my conda environement. To do so, I edited the and added:


Then, same issue with samtools, so added


Then, there was an error in the ./bin/pitchfork module due to a Python 3 issue (I had already switch all print “” to print(“”). Here, the issue was

ptableTest.cpp:20:19: error: expected namespace-name before ‘;token
 using namespace H5;
Makefile:745: recipe for target 'ptableTest.o' failed
make[5]: *** [ptableTest.o] Error 1

Just replace _out[0] with str(_out[0])

Then, blasr compiles successfully…time to run it; The executable seems to be in workspace/blasr/blasr:

./workspace/blasr/blasr: error while loading shared libraries: cannot open shared object file: No such file or directory

Here, you need to add a bunch of path to your LD_LIBRARY_PATH:

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$PF/blasr_libcpp/hdf/
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$PF/blasr_libcpp/alignment
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$PF//blasr_libcpp/pbdata
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$PF/pbbam/build/lib/
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$PF/hdf5-1.8.16/c++/src/.libs/
Please follow and like us:
This entry was posted in biology and tagged , . Bookmark the permalink.

Leave a Reply

Your email address will not be published.