Bug 201781 - [patch] sysutils/screen parallel build can fail
Summary: [patch] sysutils/screen parallel build can fail
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Cy Schubert
URL:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2015-07-23 05:34 UTC by Don Lewis
Modified: 2015-11-16 16:11 UTC (History)
0 users

See Also:
bugzilla: maintainer-feedback? (cy)


Attachments
patch to add missing dependencies to unbreak parallel build (1.86 KB, patch)
2015-07-23 05:34 UTC, Don Lewis
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Don Lewis freebsd_committer freebsd_triage 2015-07-23 05:34:59 UTC
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.
Comment 1 commit-hook freebsd_committer freebsd_triage 2015-11-16 16:11:03 UTC
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
Comment 2 Dmitry Marakasov freebsd_committer freebsd_triage 2015-11-16 16:11:21 UTC
Tested by adding sleeps to targets generating .h files, works well. Committed, thank you!