bnprks / BPCells

Scaling Single Cell Analysis to Millions of Cells
https://bnprks.github.io/BPCells
Other
166 stars 17 forks source link

R-4.4.1 install problems in debian 11 #94

Closed inesHellmann closed 4 months ago

inesHellmann commented 4 months ago

Thank you for providing this package. We think this could be very helpful to us (and our poor server).

The compilation with gcc 10.2.1 runs through without errors, or at least it is able to fix the one error by compiling hwy from scratch -- the final error only comes when trying to load the r-package:

R data * moving datasets to lazyload DB byte-compile and prepare package for lazy loading * help installing help indices * copying figures building package indices installing vignettes testing if installed package can be loaded from temporary location Error: package or namespace load failed for ‘BPCells’ in dyn.load(file, DLLpath = DLLpath, ...): unable to load shared object '/opt/R/4.4.1/lib/R/library/00LOCK-BPCells/00new/BPCells/libs/BPCells.so': libmpi.so.1: cannot open shared object file: No such file or directory

Do have any idea what might have gone wrong?

bnprks commented 4 months ago

Hi @inesHellmann, good question -- compiling from scratch can often run into weird issues that are dependent on the specific setup of each person's server.

In this case, the key part of the message is: libmpi.so.1: cannot open shared object file. This tells me that BPCells was compiled in such a way that it depends on loading the mpi dynamic library (not sure why -- on my copy of BPCells compiled on Ubuntu there's no mpi dependency). This error also suggests that the compiler found an installed libmpi.so.1 file at compile time, but wasn't able to find it again at run time.

First thing I'd try is if you have a conda environment active disable that prior to building the package. Conda sometimes causes me problems with dynamic libraries at build time (though it's fine to have active when using the package later).

As a hack, if you already have a libmpi.so file installed somewhere on your system (or with some version number appended), you can usually get away with adding a symlink named libmpi.so.1 in that same folder pointing to the original .so file. This is usually found in some subfolder of /usr/lib or maybe /usr/local/lib

Two other questions that might be helpful to me:

  1. Did you have to do any manual hwy installation or was it built automatically in the BPCells configure step? If you had to do something manual, could you also share what error you were having and what you did to fix it? (Then I might be able to improve the build script for everyone)
  2. If nothing above helps, try running Sys.setenv(BPCELLS_DEBUG_INSTALL="true") prior to remotes::install_github("bnprks/BPCells"). Please use a collapsible section if you include that output in a future comment. That will give a full log of compilation that might have additional clues on what's going wrong
inesHellmann commented 4 months ago

Hi Ben, problem solved -- oddly there were some really old hdf5 libraries in /usr/local/lib that confused the system. After removing them it works! Our server is now 10 years old, could do with some serious cleaning. Thank you for the quick response and the great package! Best Ines