Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[c++] Use C++20 #3154

Open
johnkerl opened this issue Oct 9, 2024 · 0 comments
Open

[c++] Use C++20 #3154

johnkerl opened this issue Oct 9, 2024 · 0 comments
Assignees
Labels

Comments

@johnkerl
Copy link
Member

johnkerl commented Oct 9, 2024

Context:

Issues:

using C++ compiler: ‘g++ (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0’
[19](https://github.com/single-cell-data/TileDB-SOMA/actions/runs/11256492779/job/31298502792#step:10:20)using C++20
[20](https://github.com/single-cell-data/TileDB-SOMA/actions/runs/11256492779/job/31298502792#step:10:21)g++ -std=gnu++20 -I"/usr/share/R/include" -DNDEBUG -I. -I../inst/include/ -I/__w/TileDB/TileDB/dist/include -I/usr/local/include -I/usr/local/include/tiledbsoma    -I'/usr/lib/R/site-library/Rcpp/include' -I'/usr/lib/R/site-library/RcppSpdlog/include' -I'/usr/lib/R/site-library/RcppInt64/include' -I'/usr/lib/R/site-library/nanoarrow/include'     -fpic  -g -O2 -ffile-prefix-map=/build/r-base-2y82rL/r-base-4.4.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2   -c RcppExports.cpp -o RcppExports.o
[21]In file included from ./rutilities.h:6,
[22]                 from ../inst/include/tiledbsoma_types.h:25,
[23]                 from RcppExports.cpp:4:
[24]/usr/lib/R/site-library/RcppSpdlog/include/spdl.h: In instantiation of ‘void spdl::trace(const char*, Args&& ...) [with Args = {std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >}]’:
[25]./rutilities.h:43:24:   required from here
[26]/usr/lib/R/site-library/RcppSpdlog/include/spdl.h:34:92:   in ‘constexpr’ expansion of ‘fmt::v10::basic_format_string<char, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >(fmt)’
[27]/usr/lib/R/site-library/RcppSpdlog/include/spdl.h:34:92: error: ‘fmt’ is not a constant expression
[28]   34 |     inline void trace(const char* fmt, Args&&... args ) { RcppSpdlog::log_trace(fmt::format(fmt, std::forward<Args>(args)... ).c_str()); }
[29]      |                                                                                 ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[30]make: *** [/usr/lib/R/etc/Makeconf:204: RcppExports.o] Error 1
[31]ERROR: compilation failed for package ‘tiledbsoma’
[32]* removing ‘/tmp/RtmpCicerS/Rinst1de8576f09f4/tiledbsoma’
[33]      -----------------------------------
[34]ERROR: package installation failed
[35]

I was able to repro this on my Mac. Using latest RcppSpdlog which as of this writing is 0.0.18.

I also tried:

This suggests that we will have a genuine bug report on RcppSpdlog.

Update from googling a bit more: fmtlib/fmt#4179 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants