grimbough / rhdf5filters

Distributing additional HDF5 compression filters as an R package. Intended to be used with rhdf5, however the compiled filters can also be used with external applications.

Home Page:https://bioconductor.org/packages/rhdf5filters/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

linking flags

kasperdanielhansen opened this issue · comments

I get a

shared -o libH5Zblosc.so H5Zblosc.o \
           libblosc.a -lz
/jhpce/shared/jhpce/core/conda/miniconda3-4.6.14/envs/svnR-4.0.x/bin/../lib/gcc/x86_64-conda_cos6-linux-gnu/7.3.0/../../../../x86_64-conda_cos6-linux-gnu/bin/ld: cannot find -lz
collect2: error: ld returned 1 exit status

All of my libraries are in non-standard locations. This is 100% likely caused by not passing the R settings for LD_FLAGS to the package in makevars.in, and should be fixable by adding a line with LDFLAGS in that file, where all the other make variables are defined. Unfortunately - right now - I don't have time to make a pull request, but I can easily test a fix on my system.

Sorry I wrote LD_FLAGS on time where I meant LDFLAGS. The version with _ is the compiler variable and the version without _ is the R/make variable.

Thanks for the report. Does this work for you?

BiocManager::install('grimbough/rhdf5filters', ref = "ldflags")

Still waiting to test. I was a bit slow over the weekend, and we have just been told our cluster is shut down for cooling / power issues. So it may take a few more days.

No worries. If this doesn't work I'll try and replicate the environment in a VM and get it compiling there.

Using my current installation of Bioc 3.12 (devel) / R-4.0.2-patched (which is a few days out of date for various packages), I get the same old error with

BiocManager::install('grimbough/rhdf5filters')

and the error is gone with

BiocManager::install('grimbough/rhdf5filters', ref = "ldflags")

and I can verify that the linking step includes the required -L flags. So it works, thanks.

BiocManager::install('grimbough/rhdf5filters', ref = "ldflags")

approved here too 👍

Great, thanks for the feedback. I've push those changes to both devel and release on Bioconductor, they should propagate soon. Let me know if there's still an issue in a few days.