python / python/cpython

Compiling 3.13 in MSYS2/UCRT64 causes a type error for _PyTime_AsTime_t

オープン
#121,427 コメント 5 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

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

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. 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

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。