make -j fails for libXCurses
When using parallel build, it randomly fails, because targets are not syncronized.
Add this line to makefile:
$(PDCLIBS) : .WAIT $(SHOFILES)
Ideally, we should add that line somewhere in makefile.in, so that it'll then appear in makefile after you run configure.
I've been trying to replicate this, without success thus far. I assume I'm doing something slightly different from you, but haven't figured out what yet. I've tried running ./configure with both --enable-debug and without, and with varying numbers after -j. I think you'd be most likely to run into the problem with larger numbers of simultaneous jobs, though. I tried running with -j70, thinking that ought to cause just about everything to be built at once and therefore make any synchronization issues obvious. But... so far, I can't break it. Any hints on how to get this to fail?
Any hints on how to get this to fail?
I was able to reproduce on 2 machines with nproc=4 and 12 Make sure you have disabled ccache if it's installed
The problem is .o files are being moved and then restored while making .sho libXCurses.a only waits for .o and if any .sho target is being built at the same time, we may see 'file not found' error.
And of course this line obviously needs to be in makefile.in
Also, I have to say that I have a very poor knowledge about makefiles, and maybe this solution is not perfect.