Created attachment 159106 [details] patch to add missing dependencies to unbreak parallel build I experienced this build failure on FreeBSD 11.0-CURRENT when running a parallel build under poudriere: =======================<phase: build >============================ ===> Building for screen-4.3.1_1 gmake[1]: Entering directory '/wrkdirs/usr/ports/sysutils/screen/work/screen-4.3.1' CPP="cpp -DETCSCREENRC='"/usr/local/etc/screenrc"' -DSCREENENCODINGS='"/usr/local/share/screen/utf8encodings"'" srcdir=. sh ./osdef.sh AWK=/usr/bin/awk CC="cc -O2 -pipe -DCOLORS256 -fstack-protector -fno-strict-aliasing" srcdir=. sh ./comm.sh AWK=/usr/bin/awk srcdir=. sh ./term.sh sh ./tty.sh tty.c cc -c -I. -I. -DETCSCREENRC='"/usr/local/etc/screenrc"' -DSCREENENCODINGS='"/usr/local/share/screen/utf8encodings"' -DHAVE_CONFIG_H -DGIT_REV=\""`git describe --always 2>/dev/null`"\" \ -O2 -pipe -DCOLORS256 -fstack-protector -fno-strict-aliasing putenv.c cc -c -I. -I. -DETCSCREENRC='"/usr/local/etc/screenrc"' -DSCREENENCODINGS='"/usr/local/share/screen/utf8encodings"' -DHAVE_CONFIG_H -DGIT_REV=\""`git describe --always 2>/dev/null`"\" \ -O2 -pipe -DCOLORS256 -fstack-protector -fno-strict-aliasing list_generic.c cc -c -I. -I. -DETCSCREENRC='"/usr/local/etc/screenrc"' -DSCREENENCODINGS='"/usr/local/share/screen/utf8encodings"' -DHAVE_CONFIG_H -DGIT_REV=\""`git describe --always 2>/dev/null`"\" \ -O2 -pipe -DCOLORS256 -fstack-protector -fno-strict-aliasing list_display.c cc -c -I. -I. -DETCSCREENRC='"/usr/local/etc/screenrc"' -DSCREENENCODINGS='"/usr/local/share/screen/utf8encodings"' -DHAVE_CONFIG_H -DGIT_REV=\""`git describe --always 2>/dev/null`"\" \ -O2 -pipe -DCOLORS256 -fstack-protector -fno-strict-aliasing list_window.c cc -c -I. -I. -DETCSCREENRC='"/usr/local/etc/screenrc"' -DSCREENENCODINGS='"/usr/local/share/screen/utf8encodings"' -DHAVE_CONFIG_H -DGIT_REV=\""`git describe --always 2>/dev/null`"\" \ -O2 -pipe -DCOLORS256 -fstack-protector -fno-strict-aliasing term.c cc -c -I. -I. -DETCSCREENRC='"/usr/local/etc/screenrc"' -DSCREENENCODINGS='"/usr/local/share/screen/utf8encodings"' -DHAVE_CONFIG_H -DGIT_REV=\""`git describe --always 2>/dev/null`"\" \ -O2 -pipe -DCOLORS256 -fstack-protector -fno-strict-aliasing kmapdef.c list_window.c:121:12: error: use of undeclared identifier 'RC_KILL' act.nr = RC_KILL; ^ cc -c -I. -I. -DETCSCREENRC='"/usr/local/etc/screenrc"' -DSCREENENCODINGS='"/usr/local/share/screen/utf8encodings"' -DHAVE_CONFIG_H -DGIT_REV=\""`git describe --always 2>/dev/null`"\" \ -O2 -pipe -DCOLORS256 -fstack-protector -fno-strict-aliasing screen.c cc -c -I. -I. -DETCSCREENRC='"/usr/local/etc/screenrc"' -DSCREENENCODINGS='"/usr/local/share/screen/utf8encodings"' -DHAVE_CONFIG_H -DGIT_REV=\""`git describe --always 2>/dev/null`"\" \ -O2 -pipe -DCOLORS256 -fstack-protector -fno-strict-aliasing ansi.c 1 error generated. Makefile:82: recipe for target 'list_window.o' failed gmake[1]: *** [list_window.o] Error 1 gmake[1]: *** Waiting for unfinished jobs.... gmake[1]: Leaving directory '/wrkdirs/usr/ports/sysutils/screen/work/screen-4.3.1' ===> Compilation failed unexpectedly. The problem is that the RC_KILL symbol is defined in comm.h, but this is a generated header that is not listed as a dependency of list_window.o in the Makefile. When doing a parallel build it is possible that list_window.c may get compiled before comm.h is fully baked. The attached patch adds this and other missing dependencies to the Makefile.
A commit references this bug: Author: amdmi3 Date: Mon Nov 16 16:10:35 UTC 2015 New revision: 401774 URL: https://svnweb.freebsd.org/changeset/ports/401774 Log: - Add missing file dependencies to fix threaded build, remove MAKE_JOBS_UNSAFE PR: 201781 Submitted by: truckman Approved by: maintainer timeout (cy, 3.5 months) Changes: head/sysutils/screen/Makefile head/sysutils/screen/files/patch-Makefile.in
Tested by adding sleeps to targets generating .h files, works well. Committed, thank you!