From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from 93-97-173-237.zone5.bethere.co.uk ([93.97.173.237] helo=tim.rpsys.net) by linuxtogo.org with esmtp (Exim 4.72) (envelope-from ) id 1SlipU-0002L7-AC for openembedded-core@lists.openembedded.org; Mon, 02 Jul 2012 17:46:24 +0200 Received: from localhost (localhost [127.0.0.1]) by tim.rpsys.net (8.13.6/8.13.8) with ESMTP id q62FZOvC002368 for ; Mon, 2 Jul 2012 16:35:24 +0100 Received: from tim.rpsys.net ([127.0.0.1]) by localhost (tim.rpsys.net [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 00676-05 for ; Mon, 2 Jul 2012 16:35:19 +0100 (BST) Received: from [192.168.3.10] ([192.168.3.10]) (authenticated bits=0) by tim.rpsys.net (8.13.6/8.13.8) with ESMTP id q62FZGeK002353 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Mon, 2 Jul 2012 16:35:18 +0100 Message-ID: <1341243322.23146.255.camel@ted> From: Richard Purdie To: openembedded-core Date: Mon, 02 Jul 2012 16:35:22 +0100 X-Mailer: Evolution 3.2.2- Mime-Version: 1.0 X-Virus-Scanned: amavisd-new at rpsys.net Subject: [PATCH] autotools.bbclass: When configure fails, dump the config.log files the logs X-BeenThere: openembedded-core@lists.openembedded.org X-Mailman-Version: 2.1.11 Precedence: list Reply-To: Patches and discussions about the oe-core layer List-Id: Patches and discussions about the oe-core layer List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jul 2012 15:46:24 -0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit When configure fails, it usually says "see config.log" yet nobody ever shares the config.log file meaning the person trying to help invariably has to ask for more information. This patch dumps all the config.log files into the main bitbake log files when configure fails, meaning all the information is present to help someone debug such failures. It does make the log rather larger but this is preferable to not having enough information in most cases. [YOCTO #2463] Signed-off-by: Richard Purdie --- diff --git a/meta/classes/autotools.bbclass b/meta/classes/autotools.bbclass index 9b36f3c..02b984d 100644 --- a/meta/classes/autotools.bbclass +++ b/meta/classes/autotools.bbclass @@ -74,7 +74,14 @@ oe_runconf () { cfgscript="${S}/configure" if [ -x "$cfgscript" ] ; then bbnote "Running $cfgscript ${CONFIGUREOPTS} ${EXTRA_OECONF} $@" - ${CACHED_CONFIGUREVARS} $cfgscript ${CONFIGUREOPTS} ${EXTRA_OECONF} "$@" || bbfatal "oe_runconf failed" + set +e + ${CACHED_CONFIGUREVARS} $cfgscript ${CONFIGUREOPTS} ${EXTRA_OECONF} "$@" + if [ "$?" != "0" ]; then + echo "Configure failed. The contents of all config.log files follows to aid debugging" + find ${S} -name config.log -print -exec cat {} \; + bbfatal "oe_runconf failed" + fi + set -e else bbfatal "no configure script found at $cfgscript" fi