-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
make -jN: unpack_snapshot's cleaning can interfere with libuv build products #8865
Comments
part of #8058 |
Potential fix, following the idea/proposal (2) from the description:
It works by setting up an order-only dependency of the libmorestack.a cp recipe on the same target that drives the snapshot download+clean+unpack process. Its an ugly hack (which could maybe be made a little bit less ugly by introducing some well-chosen names such as |
(the above is on a feasible track, but it is not complete. i might have a PR ready in a while though; want to finish a test of it first this time.) |
I might have been wrong to use an order-only dependency here. I'm not sure. I am trying to figure out if the use of an order-only dependency is what injected #9531 (It should be safe to change the dependency into a normal dependency, since the recipe |
(but honestly I'm still not sure why that distinction would cause #9531 ... I'm still inspecting.) |
Hmm, the definition of |
see PR #9542 |
Strip `clippy::` prefix from search strings changelog: none closes: rust-lang#8865 r? `@xFrednet`
On Mac OS X, when I run
time remake --trace -j8
from a clean checkout, three things can occur in parallel:get-snapshot.py
, which is largely consumed by downloading the snapshotIn particular, libmorestack.a is first built as part of libuv and then copied into
x86_64-apple-darwin/stage0/lib/rustc/x86_64-apple-darwin/lib/libmorestack.a
But part of what
get-snapshot.py
does is to clean out the target area of the unpacking before doing the current unpacking. (I added that code for fixing #3225 .)And in a sequential build, this cleaning step usually happens before the libuv building steps; but for a parallel build, the steps can be reordered.
The reason the re-ordering matters is: It looks like the net that get-snapshot.py is a bit too broad, and it ends up deleting the
libmorestack.a
that it had copied over, among other things:So, to fix this, either:
Anyway, I've become sort of the local make guru, so I'll see what I can do about this. It probably only affects people who do
make -jK
for large/interesting K, and the problem often goes away on subsequent runs of make once the prior run's intermediate build products are in place.The text was updated successfully, but these errors were encountered: