Compilation failure with GCC 15

Aberta Para iniciantes
#499 0 comentários 0 reações 0 responsáveis Ver no GitHub

Ninguém assumiu esta issue ainda.

Avaliação

Dificuldade
2/5
Tempo estimado
1-3 horas
Facilidade para iniciantes
82/100
Tipo de issue
Bug
Clareza
Claramente especificada
Status de atividade
Pouca atividade
Stack de tecnologia
cpp
Domínio
compilers

Direção de pesquisa

Comece por fi/include/reverse_purge_hash_map.hpp e seus includes e, em seguida, reproduza a falha usando o build do datasketches-postgresql com GCC 15 descrito na issue. Verifique se outros headers do projeto dependem da disponibilidade transitiva de . Considera-se concluído quando os headers relevantes compilarem com sucesso no GCC 15 sem os erros reportados de inteiros de largura fixa.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

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
Linguagem predominante
C++
Estrelas
273
Forks
88
Merge médio
1d 19h
PRs com merge (30d)
9

Guia de contribuição

Abrir o guia de contribuição

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de apache/datasketches-cpp

Todas as issues de apache/datasketches-cpp

Issues semelhantes

Mais issues de C++

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.