Compiling 3.13 in MSYS2/UCRT64 causes a type error for _PyTime_AsTime_t
未关闭
还没有人认领这个 Issue。
build
OS-windows
type-bug
- 主要语言
- Python
- 星标
- 77.2k
- 派生
- 35.9k
- PR 合并指标
- PR 指标待抓取
描述
Bug report
Bug description:
Compiling Python 3.13 on MSYS2/UCRT64 causes a type check error for _PyTime_AsTime_t's second parameter.
Python/pytime.c: In function 'pytime_as_timeval_struct':
Python/pytime.c:815:37: error: passing argument 2 of '_PyTime_AsTime_t' from incompatible pointer type [-Wincompatible-pointer-types]
815 | res2 = _PyTime_AsTime_t(tv_sec, &tv->tv_sec);
| ^~~~~~~~~~~
| |
| long int *
Python/pytime.c:245:38: note: expected 'time_t *' {aka 'long long int *'} but argument is of type 'long int *'
245 | _PyTime_AsTime_t(PyTime_t t, time_t *t2)
| ~~~~~~~~^~
How to reproduce:
Environment: MSYS2/UCRT64
Commit: 4aa0c5ec34836a026d06e556784c41e0eeb807b3 (origin/3.13, 3.13)
CXX=g++ ./configure --disable-gil --enable-optimizations --with-lto=full --with-ensurepip=install
make -j16
CPython versions tested on:
- 3.12
- 3.13
Operating systems tested on:
Windows
Linked PRs
- gh-126355
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
从 Python/pytime.c 中的 pytime_as_timeval_struct 和 _PyTime_AsTime_t 开始,然后使用 MSYS2/UCRT64 的 configure 和 make 命令重现报告中的构建。Python 3.13 构建在没有 incompatible-pointer-type 错误的情况下完成即表示完成;应先审查关联的 PR gh-126355。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- c, python
- 领域
- build-system, operating-systems
- Issue 类型
- 缺陷
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100