Open BusyJay opened 1 year ago
I wonder if this is related to https://github.com/rust-lang/cmake-rs/issues/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
.
When using cmake-rs to build a native library, I can see some errors on some platform:
The problem may be related to https://github.com/alexcrichton/jobserver-rs/issues/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 variableMAKE_GENERATOR=Ninja
for example).