From patchwork Thu Jun 28 17:47:45 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Burton X-Patchwork-Id: 140467 Delivered-To: patch@linaro.org Received: by 2002:a2e:9754:0:0:0:0:0 with SMTP id f20-v6csp2470099ljj; Thu, 28 Jun 2018 10:47:52 -0700 (PDT) X-Google-Smtp-Source: ADUXVKIfhYshjKC7XFmUFgVO1DPvAdaUdzPPkV1i7vun3lNIh7iz0K18KlRhJ76z8d/iIvR2KyJC X-Received: by 2002:a17:902:8549:: with SMTP id d9-v6mr11470722plo.81.1530208072239; Thu, 28 Jun 2018 10:47:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530208072; cv=none; d=google.com; s=arc-20160816; b=sTmgzau9/7aF2TNhnGBqmNslH6UZd9DvSF8DpG5ufi5SS9d7jeZ3Sl7ZRW7LTeVI16 swPthVSkeTidRD4wPYFDKwNbi1svN1+YT7Iy0nVDVy9cBXY+0HtfG1tEx20ZDv0fQ+9C ZZx8Dq03jeiHV+pINvj2ad8d0+2NeGISTls05kS0My4RqhIYzQlwQCAJxgZR+cUcReid LX4DJndbQnuhXTTCMM+8pJD68Aa8LGE+2eED0apE/ZlJTwyKbxM5uEGy6RpuaQSLh7tT iZgGA+SocHqju27xqsAAoFns0BoRF19t9S12RdsLEbg1L5EgKOxySHXa7ppY9Vs5z2EP uSKA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:sender:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:message-id:date:to:from:dkim-signature :delivered-to:arc-authentication-results; bh=gkfh3haE9GnKUNRaimjnI2S1srDVCBGKSfIvYxXkgVc=; b=tfkpEKqSP9d7H0aQBwz82vFliRniNYuXwHiyrpfnDVXczzvZqW3fgMMVrcSID6l7Lh s17GyZyHttHfLHoUwmjMuB7MnyueZkpPQHHpA0PKRjYU5fDafyj9FhwRfVUC09OQ9Yal h1b2QmkWRk9myNM3vS09k+xWCgMA5fJd1sEGuGJmz4cwrUtCVS8ziP6UchMsBQPu9zZz e9vTrCL6r8z1isR45zci8lqJCt8wotkYAlp4yeU8DgvIxxiMyt4xo79F+s0KcfxyxyKN IupCGPEzjJVZf4c8XQL4OGQhPlOPgFf5+nQi/AUQqt1xNx8iUlebBGaJT3/WPJH6XeIQ nIxg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@intel-com.20150623.gappssmtp.com header.s=20150623 header.b=RT7mTTQT; spf=pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-core-bounces@lists.openembedded.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from mail.openembedded.org (mail.openembedded.org. [140.211.169.62]) by mx.google.com with ESMTP id q23-v6si6921832pll.42.2018.06.28.10.47.51; Thu, 28 Jun 2018 10:47:52 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) client-ip=140.211.169.62; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@intel-com.20150623.gappssmtp.com header.s=20150623 header.b=RT7mTTQT; spf=pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-core-bounces@lists.openembedded.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from layers.openembedded.org (localhost [127.0.0.1]) by mail.openembedded.org (Postfix) with ESMTP id 5FF4274B83; Thu, 28 Jun 2018 17:47:49 +0000 (UTC) X-Original-To: openembedded-core@lists.openembedded.org Delivered-To: openembedded-core@lists.openembedded.org Received: from mail-wm0-f66.google.com (mail-wm0-f66.google.com [74.125.82.66]) by mail.openembedded.org (Postfix) with ESMTP id C32BC74813 for ; Thu, 28 Jun 2018 17:47:47 +0000 (UTC) Received: by mail-wm0-f66.google.com with SMTP id n17-v6so9431299wmh.2 for ; Thu, 28 Jun 2018 10:47:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel-com.20150623.gappssmtp.com; s=20150623; h=from:to:subject:date:message-id; bh=UkBEDgClvr0K3MfhVUjGeJiZqEVwtzqbPXpRXDJh/N8=; b=RT7mTTQTbuJ2qcDLk7onRHZVGq75xuGwbyWyh5jfEgHrRDWZxRgK3voMsFiJH7tp9+ XCte1PxzXasPldpp5n0OOMF9bq7eAJzVSbQvFS9iUrunIF5mpdXvrNemnHug74kK3yFc eEz/qA/sXD7+oETAPIAviughYro/iMWi7zvMof6UAh4iWv5o0TkK6fk3b/ZCyqwOw2Ve B3Us5kG7t7ySZ4a/7kVnD1p+xKUGNKEkuUnqNu4QIc475MeRXXKR5z6PpWCVX12QW7ZT rUsLkZTqDE8VMpxpuLzxtF/yYEdaadhvFGxkcotmVo3FiR61lJ0lk2NxnDQ1gfSl1lIS oEIw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id; bh=UkBEDgClvr0K3MfhVUjGeJiZqEVwtzqbPXpRXDJh/N8=; b=ok2ddexlAIenU3J2GeKGRTSnyFqLpxKX2wngyT0nbMjX1BMiVo20yR7T9Tmm9bABqu Xd5JrmfW5gQJIG5uBSTSHfrLyC5uiB0P5HOJZ7zDeMPjzCFN/1Ej6XN9V3e74wZ3q/Nk p3+iwdtxq5nSS/A/9oJ/dtGNtvW325Ngl2DSeLoSeJE2cuYAmyRje31y1xLnA2O3Ozxt BXH7r2N5Oiyb1YUJlSIroSoKZIfr6l2iOEFP54NQyyq9AvcfXbNLZ/kofv2ihjh/GlgF 4omvBvKMCS8qIXINxU71o2rg540me0hq8kjf5Dso5nMY6q+0ZvIGe9piHaYGFVIiVGjO pJsQ== X-Gm-Message-State: APt69E2wVKTRAhpr2b3REd7CaMnAPEBGstW7KmkLmt3BClueD+D8tj8p kg2tq59xuMtCXwDgt+1hZwV+oYUG X-Received: by 2002:a1c:7e8c:: with SMTP id z134-v6mr8869731wmc.156.1530208067897; Thu, 28 Jun 2018 10:47:47 -0700 (PDT) Received: from flashheart.burtonini.com (35.106.2.81.in-addr.arpa. [81.2.106.35]) by smtp.gmail.com with ESMTPSA id j5-v6sm6953509wrq.91.2018.06.28.10.47.46 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 28 Jun 2018 10:47:47 -0700 (PDT) From: Ross Burton To: openembedded-core@lists.openembedded.org Date: Thu, 28 Jun 2018 18:47:45 +0100 Message-Id: <20180628174745.14657-1-ross.burton@intel.com> X-Mailer: git-send-email 2.11.0 Subject: [OE-core] [PATCH] libsdl2: fix build race X-BeenThere: openembedded-core@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Patches and discussions about the oe-core layer List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: openembedded-core-bounces@lists.openembedded.org Errors-To: openembedded-core-bounces@lists.openembedded.org There's an occasional build race from headers being generated in parallel with other files which include the headers being compiled. Solve this by adding more dependencies. [ YOCTO #12815 ] Signed-off-by: Ross Burton --- .../libsdl2/libsdl2/more-gen-depends.patch | 47 ++++++++++++++++++++++ meta/recipes-graphics/libsdl2/libsdl2_2.0.8.bb | 4 +- 2 files changed, 49 insertions(+), 2 deletions(-) create mode 100644 meta/recipes-graphics/libsdl2/libsdl2/more-gen-depends.patch -- 2.11.0 -- _______________________________________________ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core diff --git a/meta/recipes-graphics/libsdl2/libsdl2/more-gen-depends.patch b/meta/recipes-graphics/libsdl2/libsdl2/more-gen-depends.patch new file mode 100644 index 00000000000..29076bf6cb2 --- /dev/null +++ b/meta/recipes-graphics/libsdl2/libsdl2/more-gen-depends.patch @@ -0,0 +1,47 @@ +Many source files include e.g. wayland-protocols.h which should be found in the +sysroot but SDL wants to build its own headers from the XML definitions. + +However the rules to generate those headers are only dependencies of the +top-level libSDL2.la object so can be built in parallel with the rest of the +objects, which can lead to interesting errors if the header is parsed by the +compiler whilst it's being written by another process: + +| gen/wayland-client-protocol.h:3: error: unterminated #ifndef +| #ifndef WAYLAND_CLIENT_PROTOCOL_H + +Solve this by adding more dependencies so the generated files are built before +the primary objects. + +Upstream-Status: Pending +Signed-off-by: Ross Burton + +diff --git a/configure.in b/data/poky-tmp/master/work/corei7-64-poky-linux/libsdl2/2.0.8-r0/SDL2-2.0.8/configure.in +index 1c7e79338..ba07a4a4e 100644 +--- a/configure.in ++++ b/data/poky-tmp/master/work/corei7-64-poky-linux/libsdl2/2.0.8-r0/SDL2-2.0.8/configure.in +@@ -4011,7 +4011,7 @@ DEPENDS=`echo $SOURCES | tr ' ' '\n'` + for EXT in asm cc m c S; do + OBJECTS=`echo "$OBJECTS" | sed 's,[[^ ]]*/\([[^ ]]*\)\.'$EXT',$(objects)/\1.lo,g'` + DEPENDS=`echo "$DEPENDS" | sed "s,^\\([[^ ]]*\\)/\\([[^ ]]*\\)\\.$EXT\\$,\\\\ +-\\$(objects)/\\2.lo: \\1/\\2.$EXT\\\\ ++\\$(objects)/\\2.lo: \\1/\\2.$EXT \\$(GEN_OBJECTS)\\\\ + \\$(RUN_CMD_CC)\\$(LIBTOOL) --tag=CC --mode=compile \\$(CC) \\$(CFLAGS) \\$(EXTRA_CFLAGS) $DEPENDENCY_TRACKING_OPTIONS -c \\$< -o \\$@,g"` + done + +@@ -4028,14 +4028,14 @@ SDLMAIN_OBJECTS=`echo $SDLMAIN_SOURCES` + SDLMAIN_DEPENDS=`echo $SDLMAIN_SOURCES` + SDLMAIN_OBJECTS=`echo "$SDLMAIN_OBJECTS" | sed 's,[[^ ]]*/\([[^ ]]*\)\.c,$(objects)/\1.lo,g'` + SDLMAIN_DEPENDS=`echo "$SDLMAIN_DEPENDS" | sed "s,\\([[^ ]]*\\)/\\([[^ ]]*\\)\\.c,\\\\ +-\\$(objects)/\\2.lo: \\1/\\2.c\\\\ ++\\$(objects)/\\2.lo: \\1/\\2.c \\$(GEN_OBJECTS)\\\\ + \\$(RUN_CMD_CC)\\$(LIBTOOL) --tag=CC --mode=compile \\$(CC) \\$(CFLAGS) \\$(EXTRA_CFLAGS) $DEPENDENCY_TRACKING_OPTIONS -c \\$< -o \\$@,g"` + + SDLTEST_OBJECTS=`echo $SDLTEST_SOURCES` + SDLTEST_DEPENDS=`echo $SDLTEST_SOURCES` + SDLTEST_OBJECTS=`echo "$SDLTEST_OBJECTS" | sed 's,[[^ ]]*/\([[^ ]]*\)\.c,$(objects)/\1.lo,g'` + SDLTEST_DEPENDS=`echo "$SDLTEST_DEPENDS" | sed "s,\\([[^ ]]*\\)/\\([[^ ]]*\\)\\.c,\\\\ +-\\$(objects)/\\2.lo: \\1/\\2.c\\\\ ++\\$(objects)/\\2.lo: \\1/\\2.c\\\\ \\$(GEN_OBJECTS)\\\\ + \\$(RUN_CMD_CC)\\$(LIBTOOL) --tag=CC --mode=compile \\$(CC) \\$(CFLAGS) \\$(EXTRA_CFLAGS) $DEPENDENCY_TRACKING_OPTIONS -c \\$< -o \\$@,g"` + + # Set runtime shared library paths as needed diff --git a/meta/recipes-graphics/libsdl2/libsdl2_2.0.8.bb b/meta/recipes-graphics/libsdl2/libsdl2_2.0.8.bb index 6966dc5c348..accea38aaa3 100644 --- a/meta/recipes-graphics/libsdl2/libsdl2_2.0.8.bb +++ b/meta/recipes-graphics/libsdl2/libsdl2_2.0.8.bb @@ -12,8 +12,8 @@ LIC_FILES_CHKSUM = "file://COPYING.txt;md5=02ee26814dd044bd7838ae24e05b880f" PROVIDES = "virtual/libsdl2" -SRC_URI = " \ - http://www.libsdl.org/release/SDL2-${PV}.tar.gz \ +SRC_URI = "http://www.libsdl.org/release/SDL2-${PV}.tar.gz \ + file://more-gen-depends.patch \ " S = "${WORKDIR}/SDL2-${PV}"