Skip to content

Error when make install for wasm32-wasip1 #137878

Closed

Description

@oroppas

Bug report

Bug description:

Executing make install in cross-build/wasm32-wasip1 after following the instruction to build WASI target fails. Here're the steps to replicate.

Configure and build (see https://devguide.python.org/getting-started/setup-building/#wasi for the details):

WASI_SDK_PATH=<your_wasi_sdk_install_path> python3 Tools/wasm/wasi build -- --config-cache

where <your_wasi_sdk_install_path> points to WASI SDK installation (https://github.com/WebAssembly/wasi-sdk/releases).

Now attempting make install:

cd cross-build/wasm32-wasip1
make install

ended up with

...
install: cannot stat 'build/lib.wasi-wasm32-3.15/build-details.json': No such file or directory
make: *** [Makefile:2865: libinstall] Error 1

CPython versions tested on:

3.14, 3.15, CPython main branch

Operating systems tested on:

Linux

Activity

  1. emmatyping commented on Aug 18, 2025

    @emmatyping
    Member

    What's the use-case for make installing a WASI build? It seems odd to do so since WASI is targeted towards server edge or embedded in applications. It certainly isn't usable out of the box as a system Python installation. I defer to Brett, but I would say make install is probably not supported for WASI.

  2. added
    pendingThe issue will be closed if no feedback is provided
    on Aug 18, 2025
  3. oroppas commented on Aug 18, 2025

    @oroppas
    Author

    While experimenting componentize-py against the recent version of CPython, I found it convenient to have the WASI target in the installation directory. Following https://github.com/dicej/wasi-wheels, PYTHONPATH must point to the WASI-target installation directory (e.g., https://github.com/dicej/wasi-wheels/blob/main/numpy/build.sh#L16 where CROSS_PREFIX points to https://github.com/dicej/wasi-wheels/blob/main/Makefile#L3).

    python3 Tools/wasm/wasi build -- --config-cache
    

    will have cross-build/wasm32-wasip1 but it was not obvious to which directory PYTHONPATH should point.

  4. brettcannon commented on Aug 18, 2025

    @brettcannon
    Member

    I would say make install is probably not supported for WASI.

    So I have a couple ways to respond to this. 😁

    • You're correct, it's not.
    • It's not, but the error is a bit opaque.
    • It's not supported now, but having it work with --prefix set to some location where the contents get zipped up for distribution may be convenient.

    Pick your answer. 😉

  5. removed
    pendingThe issue will be closed if no feedback is provided
    on Sep 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions