Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

bpo-41916: allow cross-compiled python to have -pthread set for CXX#22525

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
gpshead merged 1 commit intopython:mainfromvirtuald:allow-cxx-pthread-override
Jan 5, 2023

Conversation

virtuald
Copy link
Contributor

@virtualdvirtuald commentedOct 3, 2020
edited by bedevere-bot
Loading

When cross-compiling, the compile/run test for -pthread always fails so -pthread will never be automatically set without an override from the cache. ac_cv_pthread can already be overridden, so do the same thing for ac_cv_cxx_thread.

I've validated that my cross-compiled python has the variables set now when configured via:

   ./configure --host=$TARGET_HOST --build=$BUILD_HOST --prefix=$PREFIX \        --disable-ipv6 --enable-unicode=ucs4 \        ac_cv_file__dev_ptmx=no ac_cv_file__dev_ptc=no \        ac_cv_have_long_long_format=yes \        ac_cv_pthread_is_default=no ac_cv_pthread=yes ac_cv_cxx_thread=yes; \

I now get as expected:

>>> import pprint, distutils.sysconfig>>> pprint.pprint({i: distutils.sysconfig.get_config_vars(i)[0] for i in ('CC', 'CXX', 'LDSHARED')}){'CC': 'arm-frc2020-linux-gnueabi-gcc -pthread', 'CXX': 'arm-frc2020-linux-gnueabi-c++ -pthread', 'LDSHARED': 'arm-frc2020-linux-gnueabi-gcc -pthread -shared'}

I haven't yet checked to see if it all works quite yet, will do later today.

https://bugs.python.org/issue41916

rchildre3 reacted with hooray emoji
@virtuald
Copy link
ContributorAuthor

Some testing indicates that this worked without issues. Given that the tests all seem to pass on CI, I think this is good to go.

@virtuald
Copy link
ContributorAuthor

I have confirmed that this does fix the issues I was running into, and my cross compiled packages seem to be fine.

Copy link
Member

@FFY00FFY00 left a comment

Choose a reason for hiding this comment

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

This fix looks correct.@jaraco could you have a look?

@virtuald
Copy link
ContributorAuthor

I've been using it to build python 3.9.x and more recently python 3.10.x without any issues.

@FFY00
Copy link
Member

Perhaps, just add a news item to make it quicker to merge. I think the code is good, it is just missing a news entry.

@kumaraditya303
Copy link
Contributor

You can usehttps://blurb-it.herokuapp.com/ to add a news fragment.

@virtualdvirtualdforce-pushed theallow-cxx-pthread-override branch from6ff346a to0fdc88dCompareMarch 4, 2022 15:48
@jaraco
Copy link
Member

I'm afraid I don't have a lot of experience with this aspect of CPython. Perhaps@ambv could review or suggest a reviewer?

@virtuald
Copy link
ContributorAuthor

virtuald commentedApr 4, 2022
edited by bedevere-bot
Loading

FWIW, I've been usingthe patch to cross-compile python for use in CI since I've made the patch.

@virtuald
Copy link
ContributorAuthor

Rebased on main; integrated changes that were made in#29485

@virtuald
Copy link
ContributorAuthor

@tiran seems to make a lot of changes to configure.ac, perhaps they might be a better reviewer for this?

When cross-compiling, the compile/run test for -pthread always fails so -pthreadwill never be automatically set without an override from the cache. ac_cv_pthreadcan already be overridden, so do the same thing for ac_cv_cxx_thread.
@virtualdvirtualdforce-pushed theallow-cxx-pthread-override branch from77af732 tofefd3d2CompareOctober 14, 2022 06:06
@FFY00
Copy link
Member

FFY00 commentedOct 18, 2022
edited
Loading

@tiran, do have time to have a quick look at this PR? Thanks!

@ericsnowcurrently
Copy link
Member

IIRC,@gpshead has some interest in cross-compilation and@erlend-aasland has experience with the configure script.

auscompgeek reacted with hooray emojiauscompgeek reacted with heart emoji

@gpsheadgpshead merged commitcc87487 intopython:mainJan 5, 2023
@virtualdvirtualdmannequin mentioned this pull requestJan 5, 2023
@virtualdvirtuald deleted the allow-cxx-pthread-override branchJanuary 6, 2023 02:36
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@gpsheadgpsheadgpshead approved these changes

@FFY00FFY00FFY00 approved these changes

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

9 participants
@virtuald@FFY00@kumaraditya303@jaraco@ericsnowcurrently@gpshead@the-knights-who-say-ni@ezio-melotti@bedevere-bot

[8]ページ先頭

©2009-2025 Movatter.jp