-
Notifications
You must be signed in to change notification settings - Fork 11
Description
The lz4 submodule build is defined as:
Lines 248 to 253 in daeef8f
| LZ4_OBJS = lz4/lib/liblz4.a criu/liblz4io.a | |
| $(LZ4_OBJS) : | |
| git submodule init | |
| git submodule update | |
| $(Q) env -i PATH=$$PATH make CC=$(CC) CFLAGS="$(CFLAGS)" -C lz4 lib lz4 | |
| $(Q) $(AR) rcs criu/liblz4io.a lz4/programs/lz4io.o |
which is racy if parallel make is used. Since these two targets are independent (as defined), the make considers them to be suitable to run in parallel, so two identical make jobs will simultaneously run in the lz4 directory, stepping on each other toes. The likely result is a cryptic message from the linker in one of the jobs that tries to use an object file (that that job has previously built) while the other jobs starts writing to that same object file and truncates it. (The message is cryptic b/c linker tries to interpret an empty file as a linker script, but by the time you take a look, the other job has done writing out the object file, so it's seemingly back to normal).