Skip to content

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

Merged
hugovk merged 3 commits into
python:mainfrom
nineteendo:fix-config.cache-key
Apr 23, 2024
Merged

gh-118039: Fix config.cache key on WASI#118137
hugovk merged 3 commits into
python:mainfrom
nineteendo:fix-config.cache-key

Conversation

@nineteendo

@nineteendo nineteendo commented Apr 21, 2024

Copy link
Copy Markdown
Contributor

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
Copy Markdown
Contributor Author

Could someone add the skip news label? Thank you.

@hugovk

hugovk commented Apr 21, 2024

Copy link
Copy Markdown
Member

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
Copy Markdown
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
Copy Markdown
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 only security fixes label Apr 22, 2024

@hugovk hugovk left a comment

Copy link
Copy Markdown
Member

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
@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 only security fixes label Apr 23, 2024
@hugovk hugovk removed their assignment Apr 23, 2024
@hugovk

hugovk commented Apr 23, 2024

Copy link
Copy Markdown
Member

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