A recent CRAN submission (FORTLS) failed in my gcc-san checks because
pacakge s2 failed to install. Specifically, for my enhanced gcc build
the installation error is
g++-15 -fsanitize=address,undefined,bounds-strict -fno-omit-frame-pointer -std=g
nu++17 -I"/home/hornik/tmp/R-d-gcc-xtra/include" -DNDEBUG -I../src -DSTRICT_R_HE
ADERS -I'/home/hornik/tmp/CRAN_special_gcc-san/Library/Rcpp/include' -I'/home/ho
rnik/tmp/CRAN_special_gcc-san/Library/wk/include' -I/usr/local/include -DUSE_TYP
E_CHECKING_STRICT -D_FORTIFY_SOURCE=3 -pthread -fpic -g -O2 -Wall -pedantic -m
tune=native -Wno-ignored-attributes -Wno-deprecated-declarations -Wno-stringop-
truncation -c s2-cell-union.cpp -o s2-cell-union.o
...
/usr/include/absl/container/internal/raw_hash_set.h:4052:56: in ‘constexpr’ expansion of ‘absl::debian7::container_internal::hash_policy_traits<absl::debian7::container_internal::FlatHashSetPolicy[<s2shapeutil::ShapeEdgeId>](s2shapeutil::ShapeEdgeId), void>::get_hash_slot_fn<absl::debian7::hash_internal::Hash[<s2shapeutil::ShapeEdgeId>](s2shapeutil::ShapeEdgeId) >()’
/usr/include/absl/container/internal/hash_policy_traits.h:163:54: error: ‘(absl::debian7::container_internal::TypeErasedApplyToSlotFn<absl::debian7::hash_internal::Hash[<s2shapeutil::ShapeEdgeId>](s2shapeutil::ShapeEdgeId), s2shapeutil::ShapeEdgeId> == 0)’ is not a constant expression
163 | return policy::template get_hash_slot_fn<Hash>() == nullptr
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~
For my enhanced clang build I can installed but at runtime get
> # binary operations: difference, symmetric difference, intersection and union
> s2_difference(
+ "POLYGON ((0 0, 10 0, 10 10, 0 10, 0 0))",
+ "POLYGON ((5 5, 15 5, 15 15, 5 15, 5 5))",
+ # 32 bit platforms may need to set snap rounding
+ s2_options(snap = s2_snap_level(30))
+ )
/usr/include/absl/container/internal/raw_hash_set.h:991:46: runtime error: load
of null pointer of type 'GenerationType' (aka 'unsigned char')
#0 0x7bf2b780e5d1 in absl::debian7::container_internal::CommonFieldsGenerati
oninfoenabled::generation() const /usr/include/absl/container/internal/raw_hash_
set.h:991:46
#1 0x7bf2b780e5d1 in bool absl::debian7::container_internal::HashSetResizeHe
lper::InitializeSlots<std::allocator<char>, 4ul, true, true, 4ul>(absl::debian7:
:container_internal::CommonFields&, std::allocator<char>, absl::debian7::contain
er_internal::ctrl_t, unsigned long, unsigned long) /usr/include/absl/container/i
nternal/raw_hash_set.h:2070:45
#2 0x7bf2b780dc18 in absl::debian7::container_internal::raw_hash_set<absl::d
ebian7::container_internal::FlatHashSetPolicy<int>, absl::debian7::hash_internal
::Hash<int>, std::equal_to<int>, std::allocator<int>>::resize_impl(absl::debian7
::container_internal::CommonFields&, unsigned long, absl::debian7::container_int
ernal::HashtablezInfoHandle) /usr/include/absl/container/internal/raw_hash_set.h
:3662:23
#3 0x7bf2b77e0845 in absl::debian7::flat_hash_set<int, absl::debian7::hash_i
nternal::Hash<int>, std::equal_to<int>, std::allocator<int>>::flat_hash_set(unsi
gned long, absl::debian7::hash_internal::Hash<int> const&, std::equal_to<int> co
nst&, std::allocator<int> const&) /usr/include/absl/container/flat_hash_set.h:172:15
#4 0x7bf2b77e0845 in s2builder::AddExtraSites(MutableS2ShapeIndex const&) /h
ome/hornik/tmp/CRAN/s2.Rcheck/00_pkg_src/s2/src/s2/s2builder.cc:901:30
etc.
I also tried the effect of getting a newer libabls-dev from
experimental: this now has both gcc-san and clang-san fail to install.
We got this message some weeks ago:
Details
It looks like the
abslversion (system, 20240722) is too new for thes2geometryversion we bundle. A solution would be to use the vendored (bundled) absl, but by default we pick up a system absl if it is new enough (>= 20230802); absl however does not aim for backward compatability ands2geometrywants particular versions of it, not>=some version. I've tried to replaces2geometrywith 0.12.0 bundled with absl 20240116 but get a missing symbol error when linking s2.so (some absl module missing); I had to uncommend (remove) this lines2/src/init.cpp
Line 23 in ad09e15
to get that running; I also tried
s2geometry0.13.1` with the absl it requires (20250814) but that led to other problems, e.g. heres2/src/s2geography/constructor.h
Line 246 in ad09e15
where changing
text()intomessage()didn't resolve the problem.Two issues where I'm hanging now (WIP!):
absl_s2.pclead to the long list of absl modules to link? (this needs to be fixed, somehow, to include all needed modules when upgrading s2geometry and bundled absl)@paleolimbot