Skip to content

GH-127429: fix sysconfig data generation on cross-builds #127430

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

Merged
merged 12 commits into from
Dec 2, 2024

Conversation

FFY00
Copy link
Member

@FFY00 FFY00 commented Nov 29, 2024

@FFY00
Copy link
Member Author

FFY00 commented Nov 29, 2024

@nascheme, this should fix the JIT tests.

@FFY00
Copy link
Member Author

FFY00 commented Nov 30, 2024

Alright, the tests seem to be passing 😄

@FFY00
Copy link
Member Author

FFY00 commented Nov 30, 2024

Okay, there seems to be an issue still:

======================================================================
ERROR: test_sysconfigdata_json (test.test_sysconfig.TestSysConfig.test_sysconfigdata_json)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/runner/work/cpython/cpython/Lib/test/test_sysconfig.py", line 644, in test_sysconfigdata_json
    with open(json_data_path) as f:
         ~~~~^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: '/home/runner/work/cpython/cpython/build/lib.linux-aarch64-3.14-pydebug/_sysconfig_vars_d_linux_aarch64-linux-gnu.json'
----------------------------------------------------------------------

@FFY00

This comment was marked as outdated.

@FFY00
Copy link
Member Author

FFY00 commented Nov 30, 2024

It seems like _get_pybuilddir was using a runtime check, which reflected the host on cross-builds.

Signed-off-by: Filipe Laíns <[email protected]>
@FFY00
Copy link
Member Author

FFY00 commented Dec 1, 2024

Oh, yay, all tests pass, that wasn't much fun to debug 😅

@FFY00 FFY00 merged commit 2950bc5 into python:main Dec 2, 2024
57 checks passed
@FFY00 FFY00 deleted the gh-127429 branch December 2, 2024 07:12
@miss-islington-app
Copy link

Thanks @FFY00 for the PR 🌮🎉.. I'm working now to backport this PR to: 3.12, 3.13.
🐍🍒⛏🤖

@miss-islington-app
Copy link

Sorry, @FFY00, I could not cleanly backport this to 3.13 due to a conflict.
Please backport using cherry_picker on command line.

cherry_picker 2950bc50af8fc2539e64731359bfb39b335a614d 3.13

@miss-islington-app
Copy link

Sorry, @FFY00, I could not cleanly backport this to 3.12 due to a conflict.
Please backport using cherry_picker on command line.

cherry_picker 2950bc50af8fc2539e64731359bfb39b335a614d 3.12

@hugovk
Copy link
Member

hugovk commented Feb 26, 2025

@FFY00 Triage: please could you make the backports if they're still needed? Otherwise let's remove the labels.

hugovk pushed a commit to hugovk/cpython that referenced this pull request Mar 6, 2025
@@ -161,7 +162,7 @@ def _print_config_dict(d, stream):

def _get_pybuilddir():
pybuilddir = f'build/lib.{get_platform()}-{get_python_version()}'
if hasattr(sys, "gettotalrefcount"):
if get_config_var('Py_DEBUG') == '1':
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

get_config_var('Py_DEBUG') is an int rather than str.

XuehaiPan added a commit to XuehaiPan/cpython that referenced this pull request Apr 1, 2025
@hugovk hugovk removed the needs backport to 3.12 only security fixes label Apr 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs backport to 3.13 bugs and security fixes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants