Skip to content

run-make with target wasm32-unknown-unknown has hard-to-diagnose errors #109132

@pnkfelix

Description

@pnkfelix

I tried this code:

# config.toml

[build]
target = ["x86_64-unknown-linux-gnu","wasm32-unknown-unknown"]

Bootstrap invocation:

% python x.py build    --stage 1   library/std  && python x.py test    --stage 1    tests/run-make

I expected to see this happen: the test suite runs and gives me successes or failures relevant to my Rust project source, or gives me diagnostics that tell me about unsatisified dependencies.

Instead, this happened: Mysterious run-make test failures like "rust-lld not found" or "foo.js not found"


Each of the failures are easy to work around.

E.g. rust-lld can be satisfied by adding:

[rust]
lld = true

to the config.toml.

And the foo.js not found problem is addressed by setting:

[build]
nodejs = "node"

(and ensuring that node is indeed installed).

(The latter is hard to understand without looking at the Makefiles in question; it originates because the Makefile is blindly using $(NODE) as the first element in a shell command, and if $(NODE) expands to an empty string or whitespace, then the next argument is interpreted as the program for the shell to execute. Thus, foo.js not found (as a program to run).)


So, workarounds exists, but the overall experience is pretty bad in terms of running the run-make tests. This is perhaps to be expected given that wasm is a tier-2 target. It might be worth considering adding a prerequisite to the relevant wasm run-make tests that does a trivial dummy run of the basics, and if it fails, spits out an error telling the developer what changes they should make if they want to do run-make tests with this target enabled.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-testsuiteArea: The testsuite used to check the correctness of rustcC-enhancementCategory: An issue proposing an enhancement or a PR with one.T-bootstrapRelevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions