From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7084 invoked by alias); 13 Dec 2011 18:05:48 -0000 Received: (qmail 7071 invoked by uid 22791); 13 Dec 2011 18:05:46 -0000 X-SWARE-Spam-Status: No, hits=-1.5 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from zose-mta11.web4all.fr (HELO zose-mta11.web4all.fr) (178.33.204.87) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 13 Dec 2011 18:05:33 +0000 Received: from localhost (localhost [127.0.0.1]) by zose-mta11.web4all.fr (Postfix) with ESMTP id E216B4609B; Tue, 13 Dec 2011 19:06:19 +0100 (CET) Received: from zose-mta11.web4all.fr ([127.0.0.1]) by localhost (zose-mta11.web4all.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id gINl4M-CkfG6; Tue, 13 Dec 2011 19:06:18 +0100 (CET) Received: from zose-store12.web4all.fr (unknown [178.33.204.49]) by zose-mta11.web4all.fr (Postfix) with ESMTP id 974664605A; Tue, 13 Dec 2011 19:06:18 +0100 (CET) Date: Tue, 13 Dec 2011 18:05:00 -0000 From: =?utf-8?Q?Beno=C3=AEt_Th=C3=A9baudeau?= To: "Yann E. MORIN" Cc: crossgcc@sourceware.org Subject: Broken backtrace Message-ID: In-Reply-To: <64b6c88a-c06e-402d-b3a8-e5b02c39420d@zose-store-12> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-IsSubscribed: yes Mailing-List: contact crossgcc-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: crossgcc-owner@sourceware.org X-SW-Source: 2011-12/txt/msg00046.txt.bz2 Hi Yann, all, I'm not sure if it was already the case with previous Ubuntus, but CT-NG's backtrace is broken at least with Ubuntu 11.10 (using bash): [INFO ] Installing PPL: done in 7912.66s (at 198:02) [INFO ] Saving state to restart at step 'cloog'... [INFO ] =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D [INFO ] Installing CLooG/ppl [ERROR] make[2]: *** [cloog] Error 1 [ERROR] make[1]: *** [check-recursive] Error 1 [ERROR] [ERROR] >> [ERROR] >> Error happened in: main[scripts/crosstool-NG.sh] [ERROR] >> [ERROR] >> For more info on this error, look at the file: 'build.log' [ERROR] >> There is a list of known issues, some with workarounds, in: [ERROR] >> '/Toolchains/crosstool-ng/build/share/doc/ct-ng-hg+defau= lt-69cfd6e0f1d1/B - Known issues.txt' [ERROR] [ERROR] Build failed in step 'Extracting and patching toolchain componen= ts' [ERROR] [ERROR] (elapsed: 198:20.71) The step should have been 'Installing CLooG/ppl', and the calls should have= been backtraced. I've performed some tests, which show that this issue is caused by the foll= owing lines: 14 # Bail out early in subshell, the upper level shell will act acc= ordingly. 15 [ ${BASH_SUBSHELL} -eq 0 ] || exit $ret http://crosstool-ng.org/hg/crosstool-ng/file/096845dbd877/scripts/functions= #l14 The trace should be displayed for the deepest subshell, not for the top one. For this example, I end up with subshells 2 to 0, and the trace variables CT_STEP_COUNT and CT_STEP_MESSAGE are correct only for subshells 2 and 1. F= or subshell 0, these variables are like before do_cloog() is called, i.e. 1 for ${CT_STEP_COUNT}, "" for ${CT_STEP_MESSAGE[1]} and "Extracting and patching toolchain components" for ${CT_STEP_MESSAGE[2]}. CT_OnError() sets CT_STEP_COUNT to 2 before logging ${CT_STEP_MESSAGE[${CT_STEP_COUNT}]}, hen= ce the result. Notes regarding CT_OnError() (nothing to do with this issue): - The step variable (already used in main()) could be defined as local to = be cleaner, even if it does not really matter when exiting. - "offset=3D1" seems to be a spurious line. As to the error itself of my example, I'm testing a patch I've just cooked. Best regards, Beno=C3=AEt Th=C3=A9baudeau -- For unsubscribe information see http://sourceware.org/lists.html#faq