- Package:
- src:s2geometry
- Source:
- src:s2geometry
- Submitter:
- Benjamin Barenblat
- Date:
- 2025-08-11 15:23:39 UTC
- Severity:
- normal
- Tags:
s2geometry's CMakeLists.txt includes # s2geometry needs to use the same C++ standard that absl used to avoid # undefined symbol errors since ABSL_HAVE_STD_STRING_VIEW etc will # end up defined differently. There is probably a better way to achieve # this than assuming what absl used. set(CMAKE_CXX_STANDARD 11) set(CMAKE_CXX_STANDARD_REQUIRED ON) # No compiler-specific extensions, i.e. -std=c++11, not -std=gnu++11. set(CMAKE_CXX_EXTENSIONS OFF) to pass -std=c++11 to GCC. This causes s2geometry's build to fail when built against Abseil 20230802 (currently in experimental), since that release of Abseil requires C++14 or later. Fortunately, this entire stanza is unnecessary for Debian. Debian's Abseil packages are patched to ensure that these preprocessor symbols will be defined the same way regardless of the standard used during compilation. In fact, Abseil 20220623.1, as deployed to bookworm/trixie/sid right now, is built in C++14 mode. An upgrade to s2geometry commit 30f70725a4cc76da9cf77c394092e479027eb8ac or later will fix the build with Abseil 20230802. If you’d prefer not to do an upgrade, simply removing this entire stanza fixes the issue as well.
This is fixed in the next release 0.11.1. However, I fail to build a package (due to my unexperience I guess). When I try to build a package from https://salsa.debian.org/DebianOnMobile-team/s2geometry I get the error: CMake Error at CMakeLists.txt:204 (target_link_libraries): Target "s2" links to: absl::check but the target was not found. Possible reasons include: * There is a typo in the target name. * A find_package call is missing for an IMPORTED target. * An ALIAS target is missing. So something seems to be missing in the abseil library that it depends on. I am a bit at a loss about how to fix this. With a working package I could upload a new version...
Hello, http://debomatic-amd64.debian.net/distribution#unstable/s2geometry/0.11.1-1/buildlog Looks like now that newer abseil is in sid, this issue is gone (maybe the cmake was fixed in abseil side) (however, one test looks failing) 78: [ RUN ] S2PolygonTestBase.Area 111: .........WARNING: All log messages before absl::InitializeLog() is called are written to STDERR 111: F0000 00:00:1712046075.956008 1262963 s2edge_distances.cc:405] Check failed: tolerance.radians() > 0 (0 vs. 0) 111: *** Check failure stack trace: *** 110/111 Test #111: s2geometry_test ................................Subprocess aborted***Exception: 1.52 sec ...................................................................Index terms/doc: 13.00, Query terms/doc: 0.00 G.