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

gh-118039: Fix config.cache key on WASI #118137

Merged
merged 3 commits into from
Apr 23, 2024

Conversation

nineteendo
Copy link
Contributor

@nineteendo nineteendo commented Apr 21, 2024

We need to include the current python version in the config.cache key.

-build_wasi_reusable-Linux--24168b7150a51bf2d84cf11b0c1766713f3008fec4733f0682c1e541e1764fc1
+build_wasi_reusable-Linux--24168b7150a51bf2d84cf11b0c1766713f3008fec4733f0682c1e541e1764fc1-/opt/hostedtoolcache/Python/3.12.3/x64

Otherwise the build can fail with an error like this:

configure: loading cache config.cache
configure: error: `PKG_CONFIG_PATH' has changed since the previous run:
configure:   former value:  `/opt/hostedtoolcache/Python/3.12.2/x64/lib/pkgconfig'
configure:   current value: `/opt/hostedtoolcache/Python/3.12.3/x64/lib/pkgconfig'
configure: error: in `/home/runner/work/cpython/cpython/cross-build/build':
configure: error: changes in the environment can compromise the build
configure: error: run `make distclean' and/or `rm config.cache'
	    and start over

@nineteendo nineteendo marked this pull request as ready for review April 21, 2024 19:56
@nineteendo
Copy link
Contributor Author

Could someone add the skip news label? Thank you.

@hugovk
Copy link
Member

hugovk commented Apr 21, 2024

Do we need it for all these five files? Some of them build their own Python and don't use actions/setup-python.

@nineteendo nineteendo marked this pull request as draft April 21, 2024 20:40
@nineteendo
Copy link
Contributor Author

Ah, I see. I've added a comment to clarify why we need them for actions/setup-python.

@nineteendo nineteendo marked this pull request as ready for review April 21, 2024 21:05
@nineteendo
Copy link
Contributor Author

I think that explains why it only failed on WASI.

@nineteendo nineteendo changed the title gh-118039: Fix config.cache key gh-118039: Fix config.cache key on WASI Apr 21, 2024
@hugovk hugovk added the needs backport to 3.12 bug and security fixes label Apr 22, 2024
Copy link
Member

@hugovk hugovk left a comment

Choose a reason for hiding this comment

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

Thank you!

(cc @erlend-aasland in case you wanted to check)

@hugovk hugovk merged commit 456c29c into python:main Apr 23, 2024
38 checks passed
@miss-islington-app

This comment was marked as outdated.

@miss-islington-app

This comment was marked as outdated.

@hugovk hugovk removed the needs backport to 3.12 bug and security fixes label Apr 23, 2024
@hugovk hugovk removed their assignment Apr 23, 2024
@hugovk
Copy link
Member

hugovk commented Apr 23, 2024

Backport: we don't have .github/workflows/reusable-wasi.yml in 3.12, and the only change would be to add the comment to .github/workflows/build.yml, so I think we can skip that.

Thank you @nineteendo! 🚀

@nineteendo nineteendo deleted the fix-config.cache-key branch April 23, 2024 08:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants