Skip to content

clear out CFLAGS from the environement#21033

Merged
JukkaL merged 1 commit intopython:masterfrom
mr-c:clear-cflags
Mar 18, 2026
Merged

clear out CFLAGS from the environement#21033
JukkaL merged 1 commit intopython:masterfrom
mr-c:clear-cflags

Conversation

@mr-c
Copy link
Contributor

@mr-c mr-c commented Mar 17, 2026

While packaging from Debian we set

CFLAGS=-g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/build/package/package=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection

This causes the following test failures:

FAILED mypyc/test/test_run.py::TestRun::run-i64.test::testI64GlueMethodsAndInheritance - data: /build/package/package/mypyc/test-data/run-i64.test:1338:
FAILED mypyc/test/test_run.py::TestRun::run-bools.test::testBoolOps - data: /build/package/package/mypyc/test-data/run-bools.test:17:
FAILED mypyc/test/test_run.py::TestRun::run-i64.test::testI64ErrorValuesAndUndefined - data: /build/package/package/mypyc/test-data/run-i64.test:519:
FAILED mypyc/test/test_run.py::TestRun::run-i64.test::testI64BasicOps - data: /build/package/package/mypyc/test-data/run-i64.test:1:
FAILED mypyc/test/test_run.py::TestRun::run-i64.test::testI64DefaultArgValues - data: /build/package/package/mypyc/test-data/run-i64.test:906:

All with the same underlying error:

python3.13: /usr/include/python3.13/object.h:352: Py_SIZE: Assertion `ob->ob_type != &PyLong_Type' failed.

Therefor this PR clears CFLAGS environement variable while running the mypyc data driven test cases.

While packaging from Debian we set

CFLAGS=-g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/build/package/package=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection

This causes the following test failures:

FAILED mypyc/test/test_run.py::TestRun::run-i64.test::testI64GlueMethodsAndInheritance - data: /build/package/package/mypyc/test-data/run-i64.test:1338:
FAILED mypyc/test/test_run.py::TestRun::run-bools.test::testBoolOps - data: /build/package/package/mypyc/test-data/run-bools.test:17:
FAILED mypyc/test/test_run.py::TestRun::run-i64.test::testI64ErrorValuesAndUndefined - data: /build/package/package/mypyc/test-data/run-i64.test:519:
FAILED mypyc/test/test_run.py::TestRun::run-i64.test::testI64BasicOps - data: /build/package/package/mypyc/test-data/run-i64.test:1:
FAILED mypyc/test/test_run.py::TestRun::run-i64.test::testI64DefaultArgValues - data: /build/package/package/mypyc/test-data/run-i64.test:906:

All with the same underlying error:
python3.13: /usr/include/python3.13/object.h:352: Py_SIZE: Assertion `ob->ob_type != &PyLong_Type' failed.
@JukkaL JukkaL merged commit 4d6c417 into python:master Mar 18, 2026
17 checks passed
@mr-c mr-c deleted the clear-cflags branch March 18, 2026 13:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants