Open BoxWong opened 1 month ago
Hi Xin,
Thank you for reaching out, and I'm sorry to hear you're having trouble installing BPCells. The error message you're encountering indicates that the compiler is unable to compile a program using C++17's std::filesystem features. This usually happens if the compiler doesn't fully support C++17 or if R isn't properly configured to use the correct compiler. Additionally, there shouldn't be a need to add in -std=c++17 (but adding it in shouldn't break compilation) within your flags as this is done within our configure file. Let's try to do some additional work to diagnose why compilation isn't working for you.
Sys.setenv(BPCELLS_DEBUG_INSTALL=TRUE)
before installing to get additional debugging information printed out.pkgbuild::check_build_tools(debug = TRUE)
to see if your cpp build tools are being properly recognized within R.<path_to_compiler> --version
and ensure that the version works with C++17. GCC versions above 7 should have all the features required to pass checks within the BPCells configure file.<path_to_g++> r/tools/cxx17_filesystem.cc -std=c++17 -o r/tools/cxx17_filesystem; r/tools/cxx17_filesystem
from the root directory of BPCells, and ensure that "test/path.txt"
is being printed out. That is what is being checked to produce the error message you are seeing.Best,
Immanuel
Hi bnprks,
I'm trying to install BPCells on a linux server, but I got the following error:
Testing C++17 filesystem feature support...
Unable to compile program with C++17 std::filesystem. Please install a newer compiler version and set CC and CXX in ~/.R/Makevars ERROR: configuration failed for package ‘BPCells’
I looked it up and found it may be due to the version of C++ compiler, then I created the ~/.R/Makevars file and changed the setting of compiler in the file: CC = /data/wangxin/software/miniconda3/bin/gcc CXX = /data/wangxin/software/miniconda3/bin/g++ CXXFLAGS += -std=c++17 CXX11FLAGS += -std=c++17
I restarted R and tried installing again, but I still got the same error. Would you have any solution for this?
Thanks, Xin