Skip to content
This repository was archived by the owner on Jul 18, 2023. It is now read-only.

How can I edit ./utils/build.sh so that it 'sees' hdf5.h while running? #145

Open
SchwarzEM opened this issue Feb 13, 2018 · 5 comments
Open

Comments

@SchwarzEM
Copy link

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?

@ilanshom
Copy link
Collaborator

Have you tried exporting CPATH=/usr/include/hdf5/serial/hdf5.h:$CPATH ?
That has fixed this issue for me in the past.

@SchwarzEM
Copy link
Author

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?

@govinda-kamath
Copy link
Collaborator

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.

@SchwarzEM
Copy link
Author

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 ...)

@0xaf1f
Copy link
Contributor

0xaf1f commented Jul 11, 2021

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants