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

Rust building ignores Makefile job control #19045

Closed
chrysn opened this issue Dec 12, 2022 · 2 comments · Fixed by #19203
Closed

Rust building ignores Makefile job control #19045

chrysn opened this issue Dec 12, 2022 · 2 comments · Fixed by #19203
Assignees

Comments

@chrysn
Copy link
Member

chrysn commented Dec 12, 2022

Description

@maribu has observed that Rust behaves badly w/rt job numbers; @kaspar030 pointed me toward Make's job servers.

Even though cargo should (and is tested to) adhere to make's job server protocol, a simple test shows it's not.

Simplified to reproduce the issue

This does not directly depend on RIOT, and is probably best tested in a temporary directory

$ cat Makefile
all:
	cargo install cargo-crev -j2
$ make -j100

This happily builds two crates at a time, while according to the above-mentioned tests, it should show an error message that its own -j2 is ignored because it's running under a Make job server.

Next steps

Find out why it doesn't work; possibly try running the cargo test manually 1:1, and maybe just report as bug in cargo (but I'm not confident enough it's not something in our setup to do that right now).

@chrysn chrysn self-assigned this Dec 12, 2022
@kaspar030
Copy link
Contributor

I tracked this down to GNU make using a different method since 4.4. jobserver-rs issue.

@kaspar030
Copy link
Contributor

(it might be that our build system also misses the "+" prefix for cargo calls)

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

Successfully merging a pull request may close this issue.

3 participants