make[1]: Entering directory `/var/tmp/portage/net-dialup/rp-l2tp-0.4-r3/work/rp-l2tp-0.4/handlers' x86_64-pc-linux-gnu-gcc -O2 -march=native -pipe -fomit-frame-pointer -I.. -I../libevent -I../../libevent -Wall -Wl,-O1 -Wl,--as-needed -shared -o sync-pppd.so pty.o sync-pppd.o x86_64-pc-linux-gnu-gcc -O2 -march=native -pipe -fomit-frame-pointer -I.. -I../libevent -I../../libevent -Wall -Wl,-O1 -Wl,--as-needed -shared -o cmd.so cmd.o dstring.o dstring.o: file not recognized: File truncated collect2: error: ld returned 1 exit status make[1]: *** [cmd.so] Error 1 Reproducible: Always
Created attachment 418740 [details] build.log
It works for me. Since I don't see your emerge --info, I cannot test your scenario.
Created attachment 418748 [details, diff] Proposed patch on upstream Makefile The upstream Makefile looks severly broken. Notice in the build log that two make processes work independently in /handlers.
if you suppose it's broken, please report upstream.
upstream looks dead (and the Makefile fixes already in the tree also don't seem to be reported).
Ok, assigning to maintainer.
Works sometimes, fails randomly, for example: cmd-control.c: In function ‘main’: cmd-control.c:105:2: warning: ignoring return value of ‘write’, declared with attribute warn_unused_result [-Wunused-result] write(1, buf, n); ^ cmd-control.c: In function ‘send_cmd’: cmd-control.c:71:5: warning: ignoring return value of ‘writev’, declared with attribute warn_unused_result [-Wunused-result] writev(fd, v, 2); ^ cmd.o: file not recognized: File truncated collect2: error: ld returned 1 exit status make[1]: *** [cmd.so] Error 1 make[1]: Leaving directory `/var/tmp/portage/net-dialup/rp-l2tp-0.4-r3/work/rp-l2tp-0.4/handlers' make: *** [l2tpd] Error 2 make: *** Waiting for unfinished jobs.... Parallel build issue?
20 MAKEOPTS=-j4 builds: 6 OK, 14 NOK 20 MAKEOPTS=-j1 builds: 20 OK, 0 NOK
Still present with -r4 (I have no idea what the difference with -r3 is).
But, does the patch fix the problem?
[master a7305139e77] net-dialup/rp-l2tp: Fix parallel build (#567744 by Felix Janda) 3 files changed, 30 insertions(+), 16 deletions(-) create mode 100644 net-dialup/rp-l2tp/files/rp-l2tp-0.4-parallel-build.patch