HINGE
HINGE copied to clipboard
How can I edit ./utils/build.sh so that it 'sees' hdf5.h while running?
I am trying to install HINGE on a new machine with ./utils/build.sh. It almost works without obvious errors, but fails to detect or use hdf5.h (which on this computer is at /usr/include/hdf5/serial/hdf5.h).
How can I edit the ./utils/build.sh script so that it will correctly detect and use hdf5.h in this location? Alternatively, is there some bash-shell VARIABLE=/usr/include/hdf5/serial/hdf5.h that I can create and export before running ./utils/build.sh, and that will make things work?
Have you tried exporting CPATH=/usr/include/hdf5/serial/hdf5.h:$CPATH
?
That has fixed this issue for me in the past.
I did try that (to be more precise, I tried adding the following commands before running "./utils/build.sh"):
CPATH="/usr/include/hdf5/serial" ; # $CPATH is empty by default on this system
export CPATH ;
That seemed to almost work -- much of the compilation ran without obvious error messages. However, there was one error message:
/usr/bin/ld: cannot find -lhdf5
collect2: error: ld returned 1 exit status
Makefile:13: recipe for target 'dextract' failed
make: *** [dextract] Error 1
Given the complexity and interdependency of modern bioinformatics software, I'm pretty sure a failure to compile dextract' will make the whole HINGE assembler unreliable.
So, what extra command should I be using to make ./utils/build.sh 'see' -lhdf5 via /usr/bin/ld?
Are you extracting .h5
files to get your reads? If not you do not really need DExtractor.
You can just comment out the following two lines from the build.sh file in utils/
cd $pwd/thirdparty/DEXTRACTOR make -j 8
DExtractor is a third party software that we use to extract .fasta
files from .h5
files.
Commenting out DEXTRACTOR certainly does eliminate that particular error. Assuming that it really is used for absolutely nothing but getting input reads from *.h5 before starting to use HINGE, then this is a not unreasonable solution (although it would still be nice to know how to point ./utils/build.sh at the correct -lhd5 for /usr/bin/ld ...)
The CPATH
setting is necessary to find the hdf5 headers if they're not on the standard header search path. You need to also set LIBRARY_PATH
to search the folder containing libhdf5.so
on your system if it's similarly not on the standard search path. The latter will take care of the cannot find -lhdf5
error