public inbox for crossgcc@sourceware.org
 help / color / mirror / Atom feed
From: Johannes Stezenbach <js@sig21.net>
To: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: crossgcc@sourceware.org
Subject: Re: [PATCH 0 of 1] Alternative debug-shell implementation
Date: Tue, 30 Oct 2012 10:55:00 -0000	[thread overview]
Message-ID: <20121030105531.GC8303@sig21.net> (raw)
In-Reply-To: <201210261943.38088.yann.morin.1998@free.fr>

Hi Yann,

On Fri, Oct 26, 2012 at 07:43:37PM +0200, Yann E. MORIN wrote:
> On Friday 26 October 2012 Johannes Stezenbach wrote:
> > Another issue is that "1  fixed, continue with next build command"
> > doesn't seem to work since the exit status isn't cleared
> > and CT_DoExecLog() fails again.  Maybe we need something like
> > "${CT_BUILD_DIR}/repeat" for the "continue" case?
> 
> I'll double check, but I remember it to work for me...
> I even added this code to test retry/resume/abort:
>     CT_DoExecLog DEBUG false false-01
>     CT_DoExecLog DEBUG false false-02
>     CT_DoExecLog DEBUG false false-03
> 
> And I was able to either retry/resume/abort.

It doesn't seem to work as intended, but I've had no time to
debug it yet.  Here's output from one build failure where
I tried to continue with "exit 1".  As you can see, the build
stopped a few more times where I also used "exit 1".  At one
point I decided to give up with "exit 3" which caused a few
strange errors and then the build continued to the end!?

Maybe you can make sense of it.

Here are the two errors from the longer log below:

  scripts/functions: line 401: stop-: syntax error: operand expected (error token is "-")

    399 CT_EndStep() {
    400     local stop=$(CT_DoDate +%s%N)
    401     local duration=$(printf "%032d" $((stop-${CT_STEP_START[${CT_STEP_COUNT}]})) |sed -r -e 's/([[:digit:]]{2})[[:digit:]]{7}$/\.\1/; s/^0+//; s/^\./0\./;')

  scripts/functions: line 199: [: -le: unary operator expected
    168 CT_DoLog() {
    ...
    199               if [ ${cur_l} -le ${max_level} ]; then

Even though it's not fully working yet the debug shell is
still very useful for me.  Saved me a lot of time. :-)


Thanks
Johannes


(note the build was running on some ancient RedHat machine
so the actual build error is not so interesting for you)

[INFO ]  Installing C library
[EXTRA]    Configuring C library
[EXTRA]    Building C library
[EXTRA]    Installing C library
[EXTRA]    Building and installing the C library manual
[ERROR]    make[3]: *** [/tmp/toolchain-eglibc-201210/bld/.build/arm-unknown-linux-gnueabi/build/build-libc-final/manual/libc.pdf]
 Error 1
[ERROR]    make[2]: *** [pdf] Error 2
[ERROR]    make[1]: *** [pdf] Error 2
[ERROR]
[ERROR]  >>
[ERROR]  >>  Build failed in step 'Installing C library'
[ERROR]  >>        called in step '(top-level)'
[ERROR]  >>
[ERROR]  >>  Error happened in: CT_DoExecLog[scripts/functions@257]
[ERROR]  >>        called from: do_libc_backend_once[scripts/build/libc/glibc-eglibc.sh-common@455]
[ERROR]  >>        called from: do_libc_backend[scripts/build/libc/glibc-eglibc.sh-common@143]
[ERROR]  >>        called from: do_libc[scripts/build/libc/glibc-eglibc.sh-common@65]
[ERROR]  >>        called from: main[scripts/crosstool-NG.sh@609]


Current command:
  'make' 'pdf' 'html'
exited with error code: 2
Please fix it up and finish by exiting the shell with one of these values:
    1  fixed, continue with next build command
    2  repeat this build command
    3  abort build

ct-ng:/tmp/toolchain-eglibc-201210/bld/.build/arm-unknown-linux-gnueabi/build/build-libc-final> 'make' 'pdf' 'html'
... (snipped)
ct-ng:/tmp/toolchain-eglibc-201210/bld/.build/arm-unknown-linux-gnueabi/build/build-libc-final> exit 1
exit

Continuing past the failed command.

[ERROR]
[ERROR]  >>
[ERROR]  >>  Build failed in step 'Installing C library'
[ERROR]  >>        called in step '(top-level)'
[ERROR]  >>
[ERROR]  >>  Error happened in: CT_DoExecLog[scripts/functions@216]
[ERROR]  >>        called from: do_libc_backend_once[scripts/build/libc/glibc-eglibc.sh-common@455]
[ERROR]  >>        called from: do_libc_backend[scripts/build/libc/glibc-eglibc.sh-common@143]
[ERROR]  >>        called from: do_libc[scripts/build/libc/glibc-eglibc.sh-common@65]
[ERROR]  >>        called from: main[scripts/crosstool-NG.sh@609]
         /

Current command (unknown), exited with error code: 2
Please fix it up and finish by exiting the shell with one of these values:
    1  fixed, continue with next build command
    3  abort build

ct-ng:/tmp/toolchain-eglibc-201210/bld/.build/arm-unknown-linux-gnueabi/build/build-libc-final> exit 1
exit

Continuing past the failed command.

[ERROR]
[ERROR]  >>
[ERROR]  >>  Build failed in step '(top-level)'
[ERROR]  >>
[ERROR]  >>  Error happened in: CT_DoExecLog[scripts/functions@268]
[ERROR]  >>        called from: do_libc_backend_once[scripts/build/libc/glibc-eglibc.sh-common@455]
[ERROR]  >>        called from: do_libc_backend[scripts/build/libc/glibc-eglibc.sh-common@143]
[ERROR]  >>        called from: do_libc[scripts/build/libc/glibc-eglibc.sh-common@65]
[ERROR]  >>        called from: main[scripts/crosstool-NG.sh@609]
         /

Current command (unknown), exited with error code: 1
Please fix it up and finish by exiting the shell with one of these values:
    1  fixed, continue with next build command
    3  abort build

ct-ng:/tmp/toolchain-eglibc-201210/bld/.build/arm-unknown-linux-gnueabi/build/build-libc-final> exit 1
exit

Continuing past the failed command.

[ERROR]
[ERROR]  >>
[ERROR]  >>  Build failed in step '(top-level)'
[ERROR]  >>
[ERROR]  >>  Error happened in: do_libc_backend_once[scripts/build/libc/glibc-eglibc.sh-common@91]
[ERROR]  >>        called from: do_libc_backend[scripts/build/libc/glibc-eglibc.sh-common@143]
[ERROR]  >>        called from: do_libc[scripts/build/libc/glibc-eglibc.sh-common@65]
[ERROR]  >>        called from: main[scripts/crosstool-NG.sh@609]
         /

Current command (unknown), exited with error code: 1
Please fix it up and finish by exiting the shell with one of these values:
    1  fixed, continue with next build command
    3  abort build

ct-ng:/tmp/toolchain-eglibc-201210/bld/.build/arm-unknown-linux-gnueabi/build/build-libc-final> exit 1
exit

Continuing past the failed command.

[EXTRA]  Configuring C library localedef
[EXTRA]  Building C library localedef
[ERROR]  glibc/locale/programs/../../intl/l10nflist.c:328: error: 'locale_t' undeclared (first use in this function)
[ERROR]  glibc/locale/programs/../../intl/l10nflist.c:328: error: (Each undeclared identifier is reported only once
[ERROR]  glibc/locale/programs/../../intl/l10nflist.c:328: error: for each function it appears in.)
[ERROR]  glibc/locale/programs/../../intl/l10nflist.c:328: error: expected ';' before 'locale'
[ERROR]  make[1]: *** [locarchive.o] Error 1
[ERROR]  |
[ERROR]  >>
[ERROR]  >>  Build failed in step '(top-level)'
[ERROR]  >>
[ERROR]  >>  Error happened in: CT_DoExecLog[scripts/functions@257]
[ERROR]  >>        called from: do_libc_locales[scripts/build/libc/eglibc.sh@153]
[ERROR]  >>        called from: do_libc_backend_once[scripts/build/libc/glibc-eglibc.sh-common@469]
[ERROR]  >>        called from: do_libc_backend[scripts/build/libc/glibc-eglibc.sh-common@143]
[ERROR]  >>        called from: do_libc[scripts/build/libc/glibc-eglibc.sh-common@65]
[ERROR]  >>        called from: main[scripts/crosstool-NG.sh@609]
         /

Current command:
  'make' '-j3'
exited with error code: 2
Please fix it up and finish by exiting the shell with one of these values:
    1  fixed, continue with next build command
    2  repeat this build command
    3  abort build

ct-ng:/tmp/toolchain-eglibc-201210/bld/.build/arm-unknown-linux-gnueabi/build/build-localedef> make
... (snipped)
ct-ng:/tmp/toolchain-eglibc-201210/bld/.build/arm-unknown-linux-gnueabi/build/build-localedef> exit 1
exit

Continuing past the failed command.

[ERROR]
[ERROR]  >>
[ERROR]  >>  Build failed in step '(top-level)'
[ERROR]  >>
[ERROR]  >>  Error happened in: CT_DoExecLog[scripts/functions@216]
[ERROR]  >>        called from: do_libc_locales[scripts/build/libc/eglibc.sh@153]
[ERROR]  >>        called from: do_libc_backend_once[scripts/build/libc/glibc-eglibc.sh-common@469]
[ERROR]  >>        called from: do_libc_backend[scripts/build/libc/glibc-eglibc.sh-common@143]
[ERROR]  >>        called from: do_libc[scripts/build/libc/glibc-eglibc.sh-common@65]
[ERROR]  >>        called from: main[scripts/crosstool-NG.sh@609]
         /

Current command (unknown), exited with error code: 2
Please fix it up and finish by exiting the shell with one of these values:
    1  fixed, continue with next build command
    3  abort build

ct-ng:/tmp/toolchain-eglibc-201210/bld/.build/arm-unknown-linux-gnueabi/build/build-localedef> exit 1
exit

Continuing past the failed command.

[ERROR]
[ERROR]  >>
[ERROR]  >>  Build failed in step '(top-level)'
[ERROR]  >>
[ERROR]  >>  Error happened in: CT_DoExecLog[scripts/functions@268]
[ERROR]  >>        called from: do_libc_locales[scripts/build/libc/eglibc.sh@153]
[ERROR]  >>        called from: do_libc_backend_once[scripts/build/libc/glibc-eglibc.sh-common@469]
[ERROR]  >>        called from: do_libc_backend[scripts/build/libc/glibc-eglibc.sh-common@143]
[ERROR]  >>        called from: do_libc[scripts/build/libc/glibc-eglibc.sh-common@65]
[ERROR]  >>        called from: main[scripts/crosstool-NG.sh@609]
         /

Current command (unknown), exited with error code: 1
Please fix it up and finish by exiting the shell with one of these values:
    1  fixed, continue with next build command
    3  abort build

ct-ng:/tmp/toolchain-eglibc-201210/bld/.build/arm-unknown-linux-gnueabi/build/build-localedef> exit 1
exit

Continuing past the failed command.

[ERROR]
[ERROR]  >>
[ERROR]  >>  Build failed in step '(top-level)'
[ERROR]  >>
[ERROR]  >>  Error happened in: do_libc_locales[scripts/build/libc/eglibc.sh@91]
[ERROR]  >>        called from: do_libc_backend_once[scripts/build/libc/glibc-eglibc.sh-common@469]
[ERROR]  >>        called from: do_libc_backend[scripts/build/libc/glibc-eglibc.sh-common@143]
[ERROR]  >>        called from: do_libc[scripts/build/libc/glibc-eglibc.sh-common@65]
[ERROR]  >>        called from: main[scripts/crosstool-NG.sh@609]
         /

Current command (unknown), exited with error code: 1
Please fix it up and finish by exiting the shell with one of these values:
    1  fixed, continue with next build command
    3  abort build

ct-ng:/tmp/toolchain-eglibc-201210/bld/.build/arm-unknown-linux-gnueabi/build/build-localedef> exit 1
exit

Continuing past the failed command.

[EXTRA]  Installing C library locales
[111:18] | /tmp/toolchain-eglibc-201210/tools/lib/ct-ng.hg+unknown-20121029.232826/scripts/functions: line 401: stop-: syntax error: operand expected (error token is "-")
[ERROR]
[ERROR]  >>
[ERROR]  >>  Build failed in step '(top-level)'
[ERROR]  >>
[ERROR]  >>  Error happened in: CT_EndStep[scripts/functions@401]
[ERROR]  >>        called from: do_libc_backend[scripts/build/libc/glibc-eglibc.sh-common@175]
[ERROR]  >>        called from: do_libc[scripts/build/libc/glibc-eglibc.sh-common@65]
[ERROR]  >>        called from: main[scripts/crosstool-NG.sh@609]
         /

Current command (unknown), exited with error code: 1
Please fix it up and finish by exiting the shell with one of these values:
    1  fixed, continue with next build command
    3  abort build

ct-ng:/tmp/toolchain-eglibc-201210/bld> less /tmp/toolchain-eglibc-201210/tools/lib/ct-ng.hg+unknown-20121029.232826/scripts/funct
ions
ct-ng:/tmp/toolchain-eglibc-201210/bld> exit 3
exit
/tmp/toolchain-eglibc-201210/tools/lib/ct-ng.hg+unknown-20121029.232826/scripts/functions: line 199: [: -le: unary operator expect
ed
[133:35] / /tmp/toolchain-eglibc-201210/tools/lib/ct-ng.hg+unknown-20121029.232826/scripts/functions: line 199: [: -le: unary oper
ator expected
[133:35] / /tmp/toolchain-eglibc-201210/tools/lib/ct-ng.hg+unknown-20121029.232826/scripts/functions: line 199: [: -le: unary oper
ator expected
[133:35] / /tmp/toolchain-eglibc-201210/tools/lib/ct-ng.hg+unknown-20121029.232826/scripts/functions: line 199: [: -le: unary oper
ator expected
[133:35] / /tmp/toolchain-eglibc-201210/tools/lib/ct-ng.hg+unknown-20121029.232826/scripts/functions: line 199: [: -le: unary oper
ator expected
[133:35] / /tmp/toolchain-eglibc-201210/tools/lib/ct-ng.hg+unknown-20121029.232826/scripts/functions: line 199: [: -le: unary oper
ator expected
[133:35] / /tmp/toolchain-eglibc-201210/tools/lib/ct-ng.hg+unknown-20121029.232826/scripts/functions: line 199: [: -le: unary oper
ator expected
[133:35] / /tmp/toolchain-eglibc-201210/tools/lib/ct-ng.hg+unknown-20121029.232826/scripts/functions: line 199: [: -le: unary oper
ator expected
[INFO ]  =================================================================
[INFO ]  Installing final compiler
[EXTRA]    Configuring final compiler
[EXTRA]    Building final compiler
...
[INFO ]  Build completed at 20121030.015413


--
For unsubscribe information see http://sourceware.org/lists.html#faq

  parent reply	other threads:[~2012-10-30 10:55 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-15 15:31 [PATCH] ct-ng build debug shell Johannes Stezenbach
2012-10-15 19:56 ` [PATCH 0 of 1] Alternative debug-shell implementation Yann E. MORIN
2012-10-15 19:56   ` [PATCH 1 of 1] scripts: add option to start an interactive debug shell Yann E. MORIN
2012-10-15 20:05     ` Yann E. MORIN
2012-10-16 10:25   ` [PATCH 0 of 1] Alternative debug-shell implementation Johannes Stezenbach
2012-10-16 18:53     ` Yann E. MORIN
2012-10-17 10:15       ` Johannes Stezenbach
2012-10-17 11:13         ` Johannes Stezenbach
2012-10-17 11:20           ` Yann E. MORIN
2012-10-17 11:38         ` Yann E. MORIN
2012-10-17 13:54           ` Johannes Stezenbach
2012-10-26 12:42           ` Johannes Stezenbach
2012-10-26 17:43             ` Yann E. MORIN
2012-10-30 10:22               ` [PATCH] fix endless loop in debug-shell with IO redirection Johannes Stezenbach
2012-10-31  0:09                 ` scripts/functions: " Yann E. MORIN
2012-10-30 10:36               ` [PATCH] use patch -i instead of " Johannes Stezenbach
2012-10-31  0:09                 ` scripts/functions: " Yann E. MORIN
2012-10-30 10:55               ` Johannes Stezenbach [this message]
2012-10-15 21:45 ` [PATCH 0 of 1] Alternate debug-shell implementation, v2 Yann E. MORIN
2012-10-15 21:45   ` [PATCH 1 of 1] scripts: add option to start an interactive debug shell Yann E. MORIN

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20121030105531.GC8303@sig21.net \
    --to=js@sig21.net \
    --cc=crossgcc@sourceware.org \
    --cc=yann.morin.1998@free.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).