Closed
Description
Bug report
Bug description:
Building Python from the main branch on Python fails with the following error:
gcc -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O3 -Wall -std=c11 -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wstrict-prototypes -Werror=implicit-function-declaration -fvisibility=hidden -I./Include/internal -I./Include/internal/mimalloc -I. -I./Include -DPy_BUILD_CORE_BUILTIN -c ./Modules/timemodule.c -o Modules/timemodule.o
In file included from ./Include/Python.h:19,
from ./Modules/timemodule.c:3:
./Modules/timemodule.c: In function ‘time_clockid_converter’:
./Include/pymacro.h:118:13: error: static assertion failed: "sizeof(clk_id) == sizeof(*p)"
118 | static_assert((cond), #cond); \
| ^~~~~~~~~~~~~
./Modules/timemodule.c:203:5: note: in expansion of macro ‘Py_BUILD_ASSERT’
203 | Py_BUILD_ASSERT(sizeof(clk_id) == sizeof(*p));
| ^~~~~~~~~~~~~~~
make: *** [Makefile:3789: Modules/timemodule.o] Error 1
This is because we use int clk_id = PyLong_AsInt(obj);
when it should be a long
on this platform.
CPython versions tested on:
CPython main branch
Operating systems tested on:
Other
Linked PRs
Metadata
Metadata
Assignees
Projects
Status
Done