Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Paebbels opened this issue Jul 6, 2024 · 2 comments
Open
Labels
build The build process and cross-build OS-windows type-bug An unexpected behavior, bug, or error

Comments

@Paebbels
Copy link

Paebbels commented Jul 6, 2024

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: 4aa0c5e (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

@Paebbels Paebbels added the type-bug An unexpected behavior, bug, or error label Jul 6, 2024
@aisk aisk added OS-windows build The build process and cross-build labels Jul 6, 2024
@serhiy-storchaka
Copy link
Member

@vstinner
Copy link
Member

Do you want to propose a PR to fix the issue?

MSYS2 is not platform supported by PEP 11, but if you provide a fix, I can review it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build The build process and cross-build OS-windows type-bug An unexpected behavior, bug, or error
4 participants