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 · 6 comments
Open

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

johnkerl opened this issue Oct 9, 2024 · 6 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)

@johnkerl
Copy link
Member Author

Re-opening for tracking/visibility as we've got multiple CI/feedstock issues in flight

@johnkerl
Copy link
Member Author

johnkerl commented Jan 7, 2025

This needs to remain open. Currently we have C++20 on main and C++17 on release-1.15, with blocking issues including

@johnkerl
Copy link
Member Author

@jdblischak @XanthosXanthopoulos what are the remaining PRs to merge?

@jdblischak
Copy link
Collaborator

I can only comment on the feedstock perspective. I think we are ready to support C++20. In the pre-check and then actual update PRs for a C++20 supported release, you can follow the instructions I detailed at TileDB-Inc/tiledbsoma-feedstock#246 (comment) to migrate the feedstock to C++20 (you'll also need to run conda smithy rerender afterwards).

Lingering doubts:

@johnkerl
Copy link
Member Author

johnkerl commented Jan 22, 2025

@jdblischak there will be a 1.15.4 today (heads up) with spatial updates but I've no desire to get C++20 mods into it

And for today it will suffice to get PyPI artifacts; Conda 1.15.4 can wait.

@johnkerl
Copy link
Member Author

I can only comment on the feedstock perspective

@jdblischak the feedstock issues were the only remaining blocker -- so we are good

I need to tag a 1.15.4 today, as-is -- I'll follow your above guidance for 1.15.5 or 1.16.0 whichever comes first :)

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

3 participants