bnprks / BPCells

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

BPcells compilation #13

Closed inofechm closed 1 year ago

inofechm commented 1 year ago

Hi there, I am trying to install BPCells on a high performance compute cluster R version 4.2.2 (2022-10-31) Platform: x86_64-pc-linux-gnu (64-bit) Running under: Ubuntu 18.04.6 LTS

I am running into the error: Unable to compile program with C++17 std::filesystem. Please install a newer compiler version and set CC and CXX in ~/.R/Makevars

I have tried setting my Makevars to CC = /usr/bin/gcc CXX = /usr/bin/g++ -std=c++17 It seems like it should be set up to work: pkgbuild::check_build_tools() Your system is ready to build packages!

The system seems to have c++17 available when I try g++ -std=c++17 Could you advise me anyway to get this installed?

bnprks commented 1 year ago

Thanks for your interest! That error message is one I wrote, and almost certainly means that you'll need to use a different and/or newer gcc version. I believe gcc 9.1 was the first version with full c++17 filesystem library support.

Specifically, it's trying to compile this test program

You can test your gcc version manually by trying to actually compile and run the program as follows:

g++ tools/cxx17_filesystem.cc -std=c++17 -o tools/cxx17_filesystem
tools/cxx17_filesystem

This should print out the text test/path.txt. Getting a newer gcc from conda is probably the easiest in an HPC environment, though at Stanford we have multiple gcc versions on our cluster available through the module load tool

I'll close this for now, but please re-open/comment if you still have installation issues after getting a newer gcc/clang version.