Skip to content

CI: emscripten pyiodide build failing #26164

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

Closed
charris opened this issue Mar 29, 2024 · 13 comments · Fixed by #26185
Closed

CI: emscripten pyiodide build failing #26164

charris opened this issue Mar 29, 2024 · 13 comments · Fixed by #26185

Comments

@charris
Copy link
Member

charris commented Mar 29, 2024

See https://github.com/numpy/numpy/actions/runs/8473585481/job/23218246517?pr=26160. I was suspicious the setup-python upgrade may have been responsible, but reverting does not fix the failures.

@charris
Copy link
Member Author

charris commented Mar 29, 2024

@hoodmane Any ideas as to the problem?

@rgommers
Copy link
Member

Copying the traceback for searchability:

Run pyodide build -Cbuild-dir=build -Csetup-args="--cross-file=$PWD/tools/ci/emscripten/emscripten.meson.cross" -Csetup-args="-Dblas=none" -Csetup-args="-Dlapack=none"
Downloading xbuild environment                                                  
Installing xbuild environment                                                   

Traceback (most recent call last):
  File "/opt/hostedtoolcache/Python/3.11.3/x64/lib/python3.11/site-packages/pyodide_build/pypabuild.py", line 84, in _runner
    env["BUILD_ENV_SCRIPTS_DIR"] = isolated_build_env._scripts_dir
                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: '_DefaultIsolatedEnv' object has no attribute '_scripts_dir'

This is a generic problem; the same failure is visible on the PyWavelets repo.

@agriyakhetarpal would you be able to investigate this issue?

@agriyakhetarpal
Copy link
Contributor

Thanks, @rgommers – I indeed noticed this and I was going to open an issue today here, someone else got towards doing it first :) I'm happy to investigate further.

@agriyakhetarpal
Copy link
Contributor

I cannot say for sure, but most likely it's coming from the build v1.2 release that came out a few days ago, so adding an upper bound should work as a temporary solution.

@rgommers
Copy link
Member

Sounds good, and sounds like the right diagnosis. Let's add the upper bound first to unbreak things, and then investigate further?

@ngoldbaum
Copy link
Member

It looks like _scipts_dir changed to scripts_dir in pypa/build@f454933.

@agriyakhetarpal
Copy link
Contributor

I'll make a note about this on the Pyodide issue tracker too. Maybe keeping build and other build frontends pinned to a specific version per Pyodide version and therefore Emscripten version (though there are plans to change the latter in pyodide/pyodide#4557) would prevent further breakage.

@agriyakhetarpal
Copy link
Contributor

agriyakhetarpal commented Mar 29, 2024

I have tried a few things, and the _scripts_dir to scripts_dir change did not work as such. I'm unsure how easy it is to patch the xbuildenv that Pyodide downloads from GitHub releases before setting up a build environment. I'm almost sure that the recent build releases broke the workflow, but I'll be looking to figure out now why a new version of build seems to get installed and where, thereby causing conflicts with pyodide build – also, the pypabuild.py file itself uses another file vendor/_pypabuild.py, which makes it all the more confusing as to what is happening.

@hoodmane
Copy link
Contributor

This should be fixed by pyodide/pyodide#4653. I guess pinning build == 1.1 in your requirements files works for existing versions, I don't know if we want to backport a release to 0.25.x @ryanking13?

@agriyakhetarpal
Copy link
Contributor

Thank you for the quick fix, @hoodmane and @ryanking13! I'll patch those changes in when it gets merged.

@hoodmane
Copy link
Contributor

To be clear, it was just @ryanking13 I am just reporting what he did =)

@ryanking13
Copy link
Contributor

Yes, I think we should make a backport release as this will break everywhere. Until that, please pin the build version to < 1.2.0.

@charris
Copy link
Member Author

charris commented Mar 31, 2024

Pyodide 0.25.1 is out, a preliminary PR is at #26185. @agriyakhetarpal I needed to disable the patching, both chunks were failing to apply. Not sure what changed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants