Patchwork [meta-oe,2/2] tcp-wrappers: fix parallel builds

login
register
mail settings
Submitter lumag
Date Sept. 3, 2011, 6:26 p.m.
Message ID <1315074378-3291-2-git-send-email-dbaryshkov@gmail.com>
Download mbox | patch
Permalink /patch/10945/
State Superseded, archived
Headers show

Comments

lumag - Sept. 3, 2011, 6:26 p.m.
Inparallel builds make can try to rebuild a object file while cflags
file is not yet built. Fix that by providing an explicit cflags
dependency on config-check.

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
---
 .../tcp-wrappers-7.6/fix-cflags-dep.patch          |   18 ++++++++++++++++++
 .../tcp-wrappers/tcp-wrappers_7.6.bb               |    1 +
 2 files changed, 19 insertions(+), 0 deletions(-)
 create mode 100644 meta-oe/recipes-support/tcp-wrappers/tcp-wrappers-7.6/fix-cflags-dep.patch
Enrico - Sept. 10, 2011, 8:53 p.m.
On Sat, Sep 3, 2011 at 8:26 PM, Dmitry Eremin-Solenikov
<dbaryshkov@gmail.com> wrote:
> Inparallel builds make can try to rebuild a object file while cflags
> file is not yet built. Fix that by providing an explicit cflags
> dependency on config-check.

Hi,

making a build with today snapshot i got this:


ERROR: Function 'do_compile' failed (see
/mnt/data100/setup-scripts/build/tmp-angstrom_2010_x-eglibc/work/armv7a-angstrom-linux-gnueabi/tcp-wrappers-7.6-r6/temp/log.do_compile.10521
for further information)
ERROR: Logfile of failure stored in:
/mnt/data100/setup-scripts/build/tmp-angstrom_2010_x-eglibc/work/armv7a-angstrom-linux-gnueabi/tcp-wrappers-7.6-r6/temp/log.do_compile.10521
Log data follows:
| + cd /mnt/data100/setup-scripts/build/tmp-angstrom_2010_x-eglibc/work/armv7a-angstrom-linux-gnueabi/tcp-wrappers-7.6-r6/tcp_wrappers_7.6
| + do_compile
| + oe_runmake 'TABLES=-DHOSTS_DENY=\"/etc/hosts.deny\"
-DHOSTS_ALLOW=\"/etc/hosts.allow\"' all
| + '[' xmake = x ']'
| + bbnote make -j2 'CC=arm-angstrom-linux-gnueabi-gcc  -march=armv7-a
-fno-tree-vectorize      -mthumb-interwork -mfloat-abi=softfp
-mfpu=neon -mtune=cortex-a8 -mthumb-interwork -mno-thumb
--sysroot=/mnt/data100/setup-scripts/build/tmp-angstrom_2010_x-eglibc/sysroots/igep0020'
AR=arm-angstrom-linux-gnueabi-ar
RANLIB=arm-angstrom-linux-gnueabi-ranlib REAL_DAEMON_DIR=/usr/sbin
STYLE=-DPROCESS_OPTIONS FACILITY=LOG_DAEMON SEVERITY=LOG_INFO BUGS=
VSYSLOG= RFC931_TIMEOUT=10 ACCESS=-DHOSTS_ACCESS
KILL_OPT=-DKILL_IP_OPTIONS UMASK=-DDAEMON_UMASK=022
NETGROUP=-DNETGROUP LIBS=-lnsl ARFLAGS=rv AUX_OBJ=weak_symbols.o TLI=
COPTS= 'EXTRA_CFLAGS= -O2 -pipe -g -feliminate-unused-debug-types
-DSYS_ERRLIST_DEFINED -DHAVE_STRERROR -DHAVE_WEAKSYMS -D_REENTRANT
-DINET6=1 -Dss_family=__ss_family -Dss_len=__ss_len'
'TABLES=-DHOSTS_DENY=\"/etc/hosts.deny\"
-DHOSTS_ALLOW=\"/etc/hosts.allow\"' all
| + echo 'NOTE: make -j2 CC=arm-angstrom-linux-gnueabi-gcc
-march=armv7-a -fno-tree-vectorize      -mthumb-interwork
-mfloat-abi=softfp -mfpu=neon -mtune=cortex-a8 -mthumb-interwork
-mno-thumb --sysroot=/mnt/data100/setup-scripts/build/tmp-angstrom_2010_x-eglibc/sysroots/igep0020
AR=arm-angstrom-linux-gnueabi-ar
RANLIB=arm-angstrom-linux-gnueabi-ranlib REAL_DAEMON_DIR=/usr/sbin
STYLE=-DPROCESS_OPTIONS FACILITY=LOG_DAEMON SEVERITY=LOG_INFO BUGS=
VSYSLOG= RFC931_TIMEOUT=10 ACCESS=-DHOSTS_ACCESS
KILL_OPT=-DKILL_IP_OPTIONS UMASK=-DDAEMON_UMASK=022
NETGROUP=-DNETGROUP LIBS=-lnsl ARFLAGS=rv AUX_OBJ=weak_symbols.o TLI=
COPTS= EXTRA_CFLAGS= -O2 -pipe -g -feliminate-unused-debug-types
-DSYS_ERRLIST_DEFINED -DHAVE_STRERROR -DHAVE_WEAKSYMS -D_REENTRANT
-DINET6=1 -Dss_family=__ss_family -Dss_len=__ss_len
TABLES=-DHOSTS_DENY=\"/etc/hosts.deny\"
-DHOSTS_ALLOW=\"/etc/hosts.allow\" all'
| NOTE: make -j2 CC=arm-angstrom-linux-gnueabi-gcc  -march=armv7-a
-fno-tree-vectorize      -mthumb-interwork -mfloat-abi=softfp
-mfpu=neon -mtune=cortex-a8 -mthumb-interwork -mno-thumb
--sysroot=/mnt/data100/setup-scripts/build/tmp-angstrom_2010_x-eglibc/sysroots/igep0020
AR=arm-angstrom-linux-gnueabi-ar
RANLIB=arm-angstrom-linux-gnueabi-ranlib REAL_DAEMON_DIR=/usr/sbin
STYLE=-DPROCESS_OPTIONS FACILITY=LOG_DAEMON SEVERITY=LOG_INFO BUGS=
VSYSLOG= RFC931_TIMEOUT=10 ACCESS=-DHOSTS_ACCESS
KILL_OPT=-DKILL_IP_OPTIONS UMASK=-DDAEMON_UMASK=022
NETGROUP=-DNETGROUP LIBS=-lnsl ARFLAGS=rv AUX_OBJ=weak_symbols.o TLI=
COPTS= EXTRA_CFLAGS= -O2 -pipe -g -feliminate-unused-debug-types
-DSYS_ERRLIST_DEFINED -DHAVE_STRERROR -DHAVE_WEAKSYMS -D_REENTRANT
-DINET6=1 -Dss_family=__ss_family -Dss_len=__ss_len
TABLES=-DHOSTS_DENY=\"/etc/hosts.deny\"
-DHOSTS_ALLOW=\"/etc/hosts.allow\" all
| + make -j2 'CC=arm-angstrom-linux-gnueabi-gcc  -march=armv7-a
-fno-tree-vectorize      -mthumb-interwork -mfloat-abi=softfp
-mfpu=neon -mtune=cortex-a8 -mthumb-interwork -mno-thumb
--sysroot=/mnt/data100/setup-scripts/build/tmp-angstrom_2010_x-eglibc/sysroots/igep0020'
AR=arm-angstrom-linux-gnueabi-ar
RANLIB=arm-angstrom-linux-gnueabi-ranlib REAL_DAEMON_DIR=/usr/sbin
STYLE=-DPROCESS_OPTIONS FACILITY=LOG_DAEMON SEVERITY=LOG_INFO BUGS=
VSYSLOG= RFC931_TIMEOUT=10 ACCESS=-DHOSTS_ACCESS
KILL_OPT=-DKILL_IP_OPTIONS UMASK=-DDAEMON_UMASK=022
NETGROUP=-DNETGROUP LIBS=-lnsl ARFLAGS=rv AUX_OBJ=weak_symbols.o TLI=
COPTS= 'EXTRA_CFLAGS= -O2 -pipe -g -feliminate-unused-debug-types
-DSYS_ERRLIST_DEFINED -DHAVE_STRERROR -DHAVE_WEAKSYMS -D_REENTRANT
-DINET6=1 -Dss_family=__ss_family -Dss_len=__ss_len'
'TABLES=-DHOSTS_DENY=\"/etc/hosts.deny\"
-DHOSTS_ALLOW=\"/etc/hosts.allow\"' all
| arm-angstrom-linux-gnueabi-gcc  -march=armv7-a -fno-tree-vectorize
   -mthumb-interwork -mfloat-abi=softfp -mfpu=neon -mtune=cortex-a8
-mthumb-interwork -mno-thumb
--sysroot=/mnt/data100/setup-scripts/build/tmp-angstrom_2010_x-eglibc/sysroots/igep0020
 -DFACILITY=LOG_DAEMON -DHOSTS_ACCESS  -DNETGROUP
-DDAEMON_UMASK=022 -DREAL_DAEMON_DIR=\"/usr/sbin\" -DPROCESS_OPTIONS
-DKILL_IP_OPTIONS -DSEVERITY=LOG_INFO -DRFC931_TIMEOUT=10
-DHOSTS_DENY=\"/etc/hosts.deny\" -DHOSTS_ALLOW=\"/etc/hosts.allow\"
-O2 -pipe -g -feliminate-unused-debug-types -DSYS_ERRLIST_DEFINED
-DHAVE_STRERROR -DHAVE_WEAKSYMS -D_REENTRANT -DINET6=1
-Dss_family=__ss_family -Dss_len=__ss_len    -fPIC -shared
-D_REENTRANT -c hosts_access.c -o shared/hosts_access.o
| Assembler messages:
| Fatal error: can't create shared/hosts_access.o: No such file or directory
| arm-angstrom-linux-gnueabi-gcc  -march=armv7-a -fno-tree-vectorize
   -mthumb-interwork -mfloat-abi=softfp -mfpu=neon -mtune=cortex-a8
-mthumb-interwork -mno-thumb
--sysroot=/mnt/data100/setup-scripts/build/tmp-angstrom_2010_x-eglibc/sysroots/igep0020
 -DFACILITY=LOG_DAEMON -DHOSTS_ACCESS  -DNETGROUP
-DDAEMON_UMASK=022 -DREAL_DAEMON_DIR=\"/usr/sbin\" -DPROCESS_OPTIONS
-DKILL_IP_OPTIONS -DSEVERITY=LOG_INFO -DRFC931_TIMEOUT=10
-DHOSTS_DENY=\"/etc/hosts.deny\" -DHOSTS_ALLOW=\"/etc/hosts.allow\"
-O2 -pipe -g -feliminate-unused-debug-types -DSYS_ERRLIST_DEFINED
-DHAVE_STRERROR -DHAVE_WEAKSYMS -D_REENTRANT -DINET6=1
-Dss_family=__ss_family -Dss_len=__ss_len    -fPIC -shared
-D_REENTRANT -c options.c -o shared/options.o
| options.c: In function 'twist_option':
| options.c:394:13: warning: incompatible implicit declaration of
built-in function 'execl'
| make: *** [shared/hosts_access.o] Error 2
| make: *** Waiting for unfinished jobs....
| + die 'oe_runmake failed'
| + bbfatal 'oe_runmake failed'
| ERROR: Function 'do_compile' failed (see
/mnt/data100/setup-scripts/build/tmp-angstrom_2010_x-eglibc/work/armv7a-angstrom-linux-gnueabi/tcp-wrappers-7.6-r6/temp/log.do_compile.10521
for further information)
| + echo 'ERROR: o
NOTE: package tcp-wrappers-7.6-r6: task do_compile: Failed
ERROR: Task 1368
(/mnt/data100/setup-scripts/sources/meta-openembedded/meta-oe/recipes-support/tcp-wrappers/tcp-wrappers_7.6.bb,
do_compile) failed with exit code '1'

Just restarting the build made it to continue with no errors.

Enrico

Patch

diff --git a/meta-oe/recipes-support/tcp-wrappers/tcp-wrappers-7.6/fix-cflags-dep.patch b/meta-oe/recipes-support/tcp-wrappers/tcp-wrappers-7.6/fix-cflags-dep.patch
new file mode 100644
index 0000000..ef15e9f
--- /dev/null
+++ b/meta-oe/recipes-support/tcp-wrappers/tcp-wrappers-7.6/fix-cflags-dep.patch
@@ -0,0 +1,18 @@ 
+Upstream-Status: Pending
+
+Fix builds failing as there is no direct rule to rebuild cflags
+
+Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
+
+Index: tcp_wrappers_7.6/Makefile
+===================================================================
+--- tcp_wrappers_7.6.orig/Makefile	2011-09-02 03:34:07.000000000 +0400
++++ tcp_wrappers_7.6/Makefile	2011-09-02 03:34:19.000000000 +0400
+@@ -732,6 +732,7 @@
+
+ # Invalidate all object files when the compiler options (CFLAGS) have changed.
+
++cflags: config-check
+ config-check:
+	@set +e; test -n "$(REAL_DAEMON_DIR)" || { make; exit 1; }
+	@set +e; echo $(CFLAGS) >cflags.new ; \
diff --git a/meta-oe/recipes-support/tcp-wrappers/tcp-wrappers_7.6.bb b/meta-oe/recipes-support/tcp-wrappers/tcp-wrappers_7.6.bb
index c92447e..96448a9 100644
--- a/meta-oe/recipes-support/tcp-wrappers/tcp-wrappers_7.6.bb
+++ b/meta-oe/recipes-support/tcp-wrappers/tcp-wrappers_7.6.bb
@@ -29,6 +29,7 @@  SRC_URI = "ftp://ftp.porcupine.org/pub/security/tcp_wrappers_${PV}.tar.gz \
            file://size_t.patch \
            file://tcpdchk_libwrapped.patch \
            file://ldflags.patch \
+           file://fix-cflags-dep.patch \
            \
            file://try-from.8 \
            file://safe_finger.8"