Skip to content
Prev 12055 / 12125 Next

[R-pkg-devel] gcc-san fail with s2 package

? Tue, 3 Feb 2026 14:34:14 +0300
"Elias T. Krainski" <eliaskrainski at gmail.com> ?????:
Very annoying situation to be in. g++ fails to compile these source
files because of the -fsanitize=undefined flag. This is reproducible in
the rocker/r-devel-san container, or by hand in a Debian testing
installation.

This is probably a compiler bug, although it could also be a bug in the
libabsl-dev version distributed in Debian testing. If you have the
time, try reducing the example to a minimal file that fails to compile
with constexpr-related errors when -fsanitize=undefined is added, then
reporting it to the GCC developers, or at least asking in the #gcc
channel on libera.chat. I can try to find the time to help with this
later, but not right now.

's2' developers seem to be aware of this [*], but there isn't much to
fix in the package source code.

[*] https://github.com/r-spatial/s2/issues/270#issuecomment-2881978818