Infinite loop in eglibc-2.18 cross build for private port

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Infinite loop in eglibc-2.18 cross build for private port

Konstantin Vladimirov
Hi,

I am working on private port for eglibc-2.18, cross-build (host system
is x86, target system is private)

I detected strange behavior in build system -- if build was
interrupted (say by Ctrl+C) and then again started (and only in this
case, regular rebuild works ok), then it loops infinitely on generated
headers, like tlsdesc.h (it may loop on any, depending on time when
Ctrl-C is pressed, say on tcb-offsets.h).

Scheme is (skipping long paths, gcc arguments and sed magic lines):

1) make[2]: Entering directory `eglibc-2.18/libc/csu'
2) /usr/bin/install -c -m 644 ../include/limits.h ...
3) gawk -f ../scripts/gen-as-const.awk tlsdesc.sym \
    | gcc -S -o tlsdesc.hT3 ... -x c -  -MD -MP  -MF tlsdesc.h.dT -MT
tlsdesc.h.d tlsdesc.h
4) sed -n 's/...' tlsdesc.hT3 > tlsdesc.hT
5) rm -f tlsdesc.hT3
6) sed -e 's@ ... ' -e 's@  ...' tlsdesc.h.dT > tlsdesc.h.dT2
7) rm -f tlsdesc.h.dT
8) mv -f tlsdesc.h.dT2 tlsdesc.h.d
9) mv -f tlsdesc.hT tlsdesc.h
10) make[2]: Leaving directory `eglibc-2.18/libc/csu'

after that build system enters csu folder again and those 10 steps
repeats again and again.

On step 10, tlsdesc.h looks meaningful and filled with correct information.

I really stuck in attempts to find this bug. I suppose something wrong
in my port, but I can not even imagine what can I do to reveal such
problems.

If anyone faced similar problems and has an experience like this, any
help, or even advice "where to look" will be appreciated.

---
With best regards, Konstantin
Reply | Threaded
Open this post in threaded view
|

Re: Infinite loop in eglibc-2.18 cross build for private port

Carlos O'Donell-2
On Fri, Apr 25, 2014 at 8:58 AM, Konstantin Vladimirov
<[hidden email]> wrote:
> I am working on private port for eglibc-2.18, cross-build (host system
> is x86, target system is private)
>
> I detected strange behavior in build system -- if build was
> interrupted (say by Ctrl+C) and then again started (and only in this
> case, regular rebuild works ok), then it loops infinitely on generated
> headers, like tlsdesc.h (it may loop on any, depending on time when
> Ctrl-C is pressed, say on tcb-offsets.h).

I've never seen anything like this. The subsequent question is: Who
cares? Just clean the build and start again? Your x86* based
cross-build environment should be so fast that it doesn't matter.

The bug in question could be a make bug, could be a flawed target we
fixed in a later release, or just about anything. The only solution is
brute-force debug the make output in verbose mode and see why the
target is circular.

Cheers,
Carlos.