[Debian-on-mobile-maintainers] Bug#1059228: build system hard-codes -std=c++11

Benjamin Barenblat bbaren at debian.org
Thu Dec 21 15:36:05 GMT 2023


Source: s2geometry
Version: 0.10.0-6
Severity: normal

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.


More information about the Debian-on-mobile-maintainers mailing list