apache / apache/datasketches-cpp

Compilation failure with GCC 15

未关闭 适合新手
#499 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
C++
星标
273
派生
88
平均合并
2 天 2 小时
30 天内合并 PR
8

描述

**Description:**

datasketches-cpp 5.1.0 fails to compile under GCC 15 due to a [documented libstdc++ change](https://gcc.gnu.org/gcc-15/porting_to.html#header-dep-changes) that removed transitive includes of ``. Several internal libstdc++ headers (`bits/align.h`, `bits/atomic_base.h`, `bits/atomic_wait.h`) no longer include ``, 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 ``. 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](https://github.com/nodejs/node/pull/56740), [Godot](https://github.com/godotengine/godot/pull/102022), [PowerDNS](https://github.com/PowerDNS/pdns/pull/15520), and [many other projects](https://gcc.gnu.org/gcc-15/changes.html) 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 '';
this is probably fixable by adding '#include '
```

**Reproducer:**

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

```dockerfile
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 ` to `fi/include/reverse_purge_hash_map.hpp` (after the existing `#include ` 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

贡献指南

打开贡献指南

调研方向

Start with fi/include/reverse_purge_hash_map.hpp and its includes, then reproduce the failure using the GCC 15 datasketches-postgresql build described in the issue. Check whether other project headers rely on transitive availability. Done means the relevant headers compile successfully under GCC 15 without the reported fixed-width integer errors.

由索引模型根据 Issue 内容生成。

评估

技术栈
cpp
领域
compilers
Issue 类型
缺陷
难度
2/5
预计耗时
1-3 小时
活跃度
冷清
描述清晰度
描述清楚
新手友好度
82/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。