Repository navigation
Fix build with GCC 14: drop const from vector_of_kll_sketches k_ and d_ - #71
Merged
Merged
Conversation
The copy and move assignment operators assign to k_ and d_, which are
declared const. GCC 14 rejects this even though the templates are not
instantiated ("assignment of read-only member"), so the package cannot
be built from source on toolchains that ship GCC 14, such as the Debian
trixie based python:3.14 images. Making the members non-const keeps the
assignment operators well-formed without changing behaviour.
leerho
approved these changes
Oct 10, 2026
Member
There was a problem hiding this comment.
- What's broken: the package currently can't be built from source with GCC 14, which is the default compiler on Debian trixie and the python:3.14 Docker images (#65). The Python 5.3.0 release is the one that delivers the CVE fixes, so it should build anywhere.
- The change is tiny: two members of vector_of_kll_sketches stop being const, and nothing behaves differently.
- The contributor's description matches GCC 14's stricter checking of templates.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The copy and move assignment operators of
vector_of_kll_sketchesassign tok_andd_, which are declaredconst. GCC 14 rejects this even though the templates are never instantiated:As a result, the package cannot be built from source on any toolchain that ships GCC 14. That includes the Debian trixie based
python:3.14images, which is the failure reported in #65. It will probably also affect the Python 3.14 wheel builds proposed in #69. The root cause is the compiler version, not Python 3.14 itself.This change makes the two members non-const, which keeps both assignment operators well-formed. There is no behaviour change.
I checked it on
python:3.14-slim(Python 3.14.7, GCC 14.2.0), on both linux/amd64 and linux/aarch64:tdigest_doublesketches serialized by this build are byte-identical to those from the official 5.2.0 wheel on Python 3.12, for the same input.Fixes #65.