Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Install was not friendly when HDF5 was not installed via RPM in standard location #84

Open
kgweiss opened this issue Apr 12, 2024 · 1 comment

Comments

@kgweiss
Copy link

kgweiss commented Apr 12, 2024

Greetings,

One of my users requested help installing BPCells on our cluster. We use LMOD modules to manage our software. The install configure for BPCells was having a difficult time finding my HDF5 installation. We used the .R/Makevars file and were able to install BPCells after providing the following compiler flags:

CFLAGS=-I/path/to/hdf5/install/include
CXXFLAGS=-I/path/to/hdf5/install/include
LDFLAGS=-L/path/to/hdf5/install/lib
HDF5_CFLAGS=-I/path/to/hdf5/install/include
HDF5_LIBS=/path/to/hdf5/install/lib
LD_LIBRARY_PATH=/path/to/hdf5/install/lib
INCLUDE=/path/to/hdf5/install/include

FYI, we are using HDF5 version 1.10.8 and GCC version 10.3.0.

Just wanted to pass this along in case other users encounter install issues.

Cheers,
Ken

@bnprks
Copy link
Owner

bnprks commented Apr 12, 2024

Hi Ken, thanks for the report! I'll also link #44 here, which might have some useful related discussion. One of the issues in that thread was that LD_LIBRARY_PATH on their cluster setup had more than one hdf5 version present which caused dynamic linking errors. The configure file has the logic for finding hdf5 versions.

In most cases I've seen, hdf5 issues are caused by some slightly non-standard setup on the user's end, such as a conda environment messing with library path resolution. Running Sys.setenv(BPCELLS_DEBUG_INSTALL="true") before installation will help print out what test-compilation commands are being run with any errors that are popping up.

But in the event of issues, your approach of modifying ~/.R/Makevars is a good way to brute-force R finding the correct library paths. Just FYI, I think only setting CFLAGS, CXXFLAGS, and LDFLAGS should be sufficient for BPCells but setting some additional ones as you did probably doesn't hurt.

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

No branches or pull requests

2 participants