Closed akhst7 closed 2 weeks ago
Hi @akhst7, thanks for the question. This error message is coming while BPCells is trying several different options to find the required HDF5 library. Failures in this part are expected, and will lead BPCells to re-try finding HDF5 from another source. For the awk one-liner, it looks like there is a typo in the error message, but not in the underlying code in the configure
script (code link)
My guess for what you need to do is just run brew install hdf5
prior to installation to make sure you have the hdf5 dependency.
If that doesn't work, here are the steps I'd recommend quoted from the README (though you can just follow up with the error logs in this issue - no need to file a new one)
For a more verbose set of information, run Sys.setenv(BPCELLS_DEBUG_INSTALL="true") prior to remotes::install_github("bnprks/BPCells/r"). If you still can't solve the issue with that additional information, feel free to file a Github issue, being sure to use a collapsible section for the verbose installation log.
@bnprks,
hdf5
is already installed by brew (see below). Looking at the configure script, if this awk line fails, these two variables won't be filled, HDF5_CFLAGS="" HDF5_LIBS=""
. I guess I can manually supply these in the configure script or my env and see what.
Also, are you planning to provide a BPCells v0.2 binary for M series Mac anytime soon ?
Sorry I forgot to post the config output. It is as follows;
Interestingly, the config picks Apple's clang not Brew's clang.
clang -v [13:01:56]
Homebrew clang version 19.1.2
Target: arm64-apple-darwin24.1.0
Thread model: posix
InstalledDir: /opt/homebrew/Cellar/llvm/19.1.2/bin
Hi @akhst7, thanks for the follow-up information!
For binary mac builds (and several other OS options), I've had BPCells hosted for a while on r-universe, though I see that hasn't made it properly to be listed in the README file. At any rate, it should be a one-liner install: install.packages('BPCells', repos = c('https://bnprks.r-universe.dev', 'https://cloud.r-project.org'))
As for the error that you're getting, it looks like BPCells is picking up some bad linker flags from your LDFLAGS
environment variable (The line starting with + ENV_LDFLAGS='-L/opt/homebrew/opt/llvm/lib
). This includes -lunwind
which is causing all of the test compilations to fail with ld: library 'unwind' not found
.
If you want to build BPCells from source, you'll need to modify that environment variable so it doesn't cause compilations to fail. The easiest way would probably be to clear it within the R session itself, e.g. via Sys.unsetenv("LDFLAGS")
prior to the remotes::install_github("bnprks/BPCells/r")
call.
Hope that helps!
-Ben
P.S. The HDF5_CFLAGS
and HDF5_LIBS
are still being handled correctly as best as I can tell. Throughout the configure script they get filled with several different attempts to find flags that will allow a test hdf5 program to compile without errors. Though in this case your LDFLAGS
environment variable seems to be causing errors with all compilations regardless of the HDF5 setup.
Hi Ben,
I am still having the same issue but I will toy with a configure script to see what. I will try the binary but I wish the configure script would accept a custom Makervers
rather than etc/Makevers
.
Thanks.
Aki
Hi,
I tried to update BPCells to 0.2 and run into a few compilation error and a following is the first error;
This awk one liner,
h5cc -showconfig | awk -F: '/FLAGS|Extra libraries:/ {printf(%s , $2)}
gives an following error;I think this should be
h5cc -showconfig | awk -F: '/FLAGS|Extra libraries:/ {printf(
"%s/n", $2)}
.My system is as follows;