Compilation failure with GCC 15

Aperta Adatta ai principianti
#499 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
82/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Tranquilla
Stack tecnologico
cpp
Ambito
compilers

Direzione di ricerca

Inizia con fi/include/reverse_purge_hash_map.hpp e i relativi includes, quindi riproduci il problema usando la build di datasketches-postgresql con GCC 15 descritta nell’issue. Verifica se altri header del progetto dipendono dalla disponibilità transitiva di . Il lavoro è completato quando gli header interessati vengono compilati correttamente con GCC 15 senza gli errori segnalati relativi agli interi a larghezza fissa.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Description:

datasketches-cpp 5.1.0 fails to compile under GCC 15 due to a documented libstdc++ change that removed transitive includes of <cstdint>. Several internal libstdc++ headers (bits/align.h, bits/atomic_base.h, bits/atomic_wait.h) no longer include <stdint.h>, so fixed-width integer types like uint8_t, uint16_t, uint32_t, and uint64_t are no longer available unless explicitly included.

fi/include/reverse_purge_hash_map.hpp uses these types throughout (template defaults, member variables, function parameters, constants) but never directly includes <cstdint>. Under GCC 14 and earlier these types were available transitively; under GCC 15 they are not, causing a cascade of compilation errors.

This is the same class of breakage that affected Node.js, Godot, PowerDNS, and many other projects after GCC 15 shipped.

First error:

reverse_purge_hash_map.hpp:38:16: error: 'uint64_t' does not name a type
   38 |   typename V = uint64_t,
      |                ^~~~~~~~
reverse_purge_hash_map.hpp:25:1: note: 'uint64_t' is defined in header '<cstdint>';
  this is probably fixable by adding '#include <cstdint>'

Reproducer:

Build datasketches-postgresql 1.7.0 (which uses datasketches-cpp 5.1.0) on any platform with GCC 15:

FROM timescale/timescaledb:2.26.1-pg16  # Alpine 3.23, GCC 15.2.0
# standard datasketches-postgresql build steps...
# Fails at: make

Suggested fix:

Add #include <cstdint> to fi/include/reverse_purge_hash_map.hpp (after the existing #include <iterator> on line 24). There may be other headers in the project with the same issue.

Environment:

  • GCC 15.2.0 / libstdc++ (Alpine 3.23)
  • datasketches-cpp 5.1.0
  • datasketches-postgresql 1.7.0
  • PostgreSQL 16
Lingua principale
C++
Stelle
273
Fork
88
Merge medio
1g 19h
PR unite (30g)
9

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di apache/datasketches-cpp

Tutte le issue di apache/datasketches-cpp

Issue simili

Altre issue su C++

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.