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

jobserver doesn't always work #177

Open
BusyJay opened this issue Feb 21, 2023 · 1 comment
Open

jobserver doesn't always work #177

BusyJay opened this issue Feb 21, 2023 · 1 comment

Comments

@BusyJay
Copy link
Contributor

BusyJay commented Feb 21, 2023

When using cmake-rs to build a native library, I can see some errors on some platform:

make[1]: warning: jobserver unavailable: using -j1.  Add '+' to parent make rule.

The problem may be related to rust-lang/jobserver-rs#47.

This is not an issue with cmake-rs, but cmake-rs can let user to disable jobserver explicitly to get around the problem.

And tikv/grpc-rs# also provides a workaround by setting environment variable CMAKE_BUILD_PARALLEL_LEVEL. And using generator other than make can also get around the problem (setting environment variable MAKE_GENERATOR=Ninja for example).

@Notgnoshi
Copy link

I wonder if this is related to #172?

I expect #172 is caused by the caveat mentioned in https://docs.rs/jobserver/latest/jobserver/struct.Client.html#method.from_env about from_env being unsafe to call twice in the same process if the first invocation returned Some.

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

No branches or pull requests

2 participants