2009-01-12 10:23:36

by Jiri Kosina

[permalink] [raw]
Subject: build breakage -- paravirt_{alloc,free}_ldt

Hi,

with Linus' tree (ae04d14015) doesn't build for me with

arch/x86/kernel/ldt.c: In function 'alloc_ldt':
arch/x86/kernel/ldt.c:55: error: implicit declaration of function 'paravirt_alloc_ldt'
arch/x86/kernel/ldt.c:79: error: implicit declaration of function 'paravirt_free_ldt'

Config on http://www.jikos.cz/jikos/junk/.config

--
Jiri Kosina
SUSE Labs


2009-01-12 10:52:30

by Ingo Molnar

[permalink] [raw]
Subject: Re: build breakage -- paravirt_{alloc,free}_ldt


* Jiri Kosina <[email protected]> wrote:

> Hi,
>
> with Linus' tree (ae04d14015) doesn't build for me with
>
> arch/x86/kernel/ldt.c: In function 'alloc_ldt':
> arch/x86/kernel/ldt.c:55: error: implicit declaration of function 'paravirt_alloc_ldt'
> arch/x86/kernel/ldt.c:79: error: implicit declaration of function 'paravirt_free_ldt'
>
> Config on http://www.jikos.cz/jikos/junk/.config

hm, it builds fine here with your config. Did .28 build fine for you? The
only change to this file since .28 has been Jaswinder's "423a540: x86:
ldt.c fix style problems".

Ingo

2009-01-12 10:57:59

by Jaswinder Singh

[permalink] [raw]
Subject: Re: build breakage -- paravirt_{alloc,free}_ldt

On Mon, Jan 12, 2009 at 4:22 PM, Ingo Molnar <[email protected]> wrote:
>
> * Jiri Kosina <[email protected]> wrote:
>
>> Hi,
>>
>> with Linus' tree (ae04d14015) doesn't build for me with
>>
>> arch/x86/kernel/ldt.c: In function 'alloc_ldt':
>> arch/x86/kernel/ldt.c:55: error: implicit declaration of function 'paravirt_alloc_ldt'
>> arch/x86/kernel/ldt.c:79: error: implicit declaration of function 'paravirt_free_ldt'
>>
>> Config on http://www.jikos.cz/jikos/junk/.config
>
> hm, it builds fine here with your config. Did .28 build fine for you? The
> only change to this file since .28 has been Jaswinder's "423a540: x86:
> ldt.c fix style problems".
>

No, it is not because of my patch but I will check for the solution.

Thanks,
--
JSR

2009-01-12 11:09:10

by Jaswinder Singh

[permalink] [raw]
Subject: Re: build breakage -- paravirt_{alloc,free}_ldt

On Mon, Jan 12, 2009 at 4:27 PM, Jaswinder Singh Rajput
<[email protected]> wrote:
> On Mon, Jan 12, 2009 at 4:22 PM, Ingo Molnar <[email protected]> wrote:
>>
>> * Jiri Kosina <[email protected]> wrote:
>>
>>> Hi,
>>>
>>> with Linus' tree (ae04d14015) doesn't build for me with
>>>
>>> arch/x86/kernel/ldt.c: In function 'alloc_ldt':
>>> arch/x86/kernel/ldt.c:55: error: implicit declaration of function 'paravirt_alloc_ldt'
>>> arch/x86/kernel/ldt.c:79: error: implicit declaration of function 'paravirt_free_ldt'
>>>
>>> Config on http://www.jikos.cz/jikos/junk/.config
>>
>> hm, it builds fine here with your config. Did .28 build fine for you? The
>> only change to this file since .28 has been Jaswinder's "423a540: x86:
>> ldt.c fix style problems".
>>
>
> No, it is not because of my patch but I will check for the solution.
>
>

With your config I am also not getting any error with -tip tree:

CC arch/x86/kernel/dumpstack_64.o
CC arch/x86/kernel/time_64.o
CC arch/x86/kernel/ioport.o
CC arch/x86/kernel/ldt.o
CC arch/x86/kernel/dumpstack.o

Jiri, make clean and also check for -tip tree.

Thanks,
--
JSR

2009-01-12 11:13:06

by Jiri Kosina

[permalink] [raw]
Subject: Re: build breakage -- paravirt_{alloc,free}_ldt

On Mon, 12 Jan 2009, Ingo Molnar wrote:

> > with Linus' tree (ae04d14015) doesn't build for me with
> >
> > arch/x86/kernel/ldt.c: In function 'alloc_ldt':
> > arch/x86/kernel/ldt.c:55: error: implicit declaration of function 'paravirt_alloc_ldt'
> > arch/x86/kernel/ldt.c:79: error: implicit declaration of function 'paravirt_free_ldt'
> >
> > Config on http://www.jikos.cz/jikos/junk/.config
>
> hm, it builds fine here with your config. Did .28 build fine for you? The
> only change to this file since .28 has been Jaswinder's "423a540: x86:
> ldt.c fix style problems".

Puzzled. On one system, I still get this build error even after make
mrpoper (I use this machine to build kernel routinely, so it certainly
didn't happen a few days ago).

But I just tried on different system, and there is builds flawlessly. It's
gcc 4.3.1 vs 4.3.2. I will check a little bit more.

--
Jiri Kosina
SUSE Labs

2009-01-12 11:17:39

by Ingo Molnar

[permalink] [raw]
Subject: Re: build breakage -- paravirt_{alloc,free}_ldt


* Jaswinder Singh Rajput <[email protected]> wrote:

> On Mon, Jan 12, 2009 at 4:27 PM, Jaswinder Singh Rajput
> <[email protected]> wrote:
> > On Mon, Jan 12, 2009 at 4:22 PM, Ingo Molnar <[email protected]> wrote:
> >>
> >> * Jiri Kosina <[email protected]> wrote:
> >>
> >>> Hi,
> >>>
> >>> with Linus' tree (ae04d14015) doesn't build for me with
> >>>
> >>> arch/x86/kernel/ldt.c: In function 'alloc_ldt':
> >>> arch/x86/kernel/ldt.c:55: error: implicit declaration of function 'paravirt_alloc_ldt'
> >>> arch/x86/kernel/ldt.c:79: error: implicit declaration of function 'paravirt_free_ldt'
> >>>
> >>> Config on http://www.jikos.cz/jikos/junk/.config
> >>
> >> hm, it builds fine here with your config. Did .28 build fine for you? The
> >> only change to this file since .28 has been Jaswinder's "423a540: x86:
> >> ldt.c fix style problems".
> >>
> >
> > No, it is not because of my patch but I will check for the solution.
> >
> >
>
> With your config I am also not getting any error with -tip tree:
>
> CC arch/x86/kernel/dumpstack_64.o
> CC arch/x86/kernel/time_64.o
> CC arch/x86/kernel/ioport.o
> CC arch/x86/kernel/ldt.o
> CC arch/x86/kernel/dumpstack.o
>
> Jiri, make clean and also check for -tip tree.

It could be an unclean build tree. Jiri, could you double-check that
you've got the right kernel and if it still triggers, could you
investigate where this build error could come from?

ldt.c includes asm/paravirt.h already, via asm/mmu_context.h, so it should
be picking up the paravirt_alloc/free_ldt() definitions.

Ingo

2009-01-12 11:18:49

by Ingo Molnar

[permalink] [raw]
Subject: Re: build breakage -- paravirt_{alloc,free}_ldt


* Jiri Kosina <[email protected]> wrote:

> On Mon, 12 Jan 2009, Ingo Molnar wrote:
>
> > > with Linus' tree (ae04d14015) doesn't build for me with
> > >
> > > arch/x86/kernel/ldt.c: In function 'alloc_ldt':
> > > arch/x86/kernel/ldt.c:55: error: implicit declaration of function 'paravirt_alloc_ldt'
> > > arch/x86/kernel/ldt.c:79: error: implicit declaration of function 'paravirt_free_ldt'
> > >
> > > Config on http://www.jikos.cz/jikos/junk/.config
> >
> > hm, it builds fine here with your config. Did .28 build fine for you? The
> > only change to this file since .28 has been Jaswinder's "423a540: x86:
> > ldt.c fix style problems".
>
> Puzzled. On one system, I still get this build error even after make
> mrpoper (I use this machine to build kernel routinely, so it certainly
> didn't happen a few days ago).
>
> But I just tried on different system, and there is builds flawlessly.
> It's gcc 4.3.1 vs 4.3.2. I will check a little bit more.

beyond mrproper you might want to try 'git checkout HEAD . -f' as well, to
get a forced checkout of the current working tree. Should there be any
corruption in any of the source code files this will get rid of it.

Ingo

2009-01-12 11:20:01

by Jaswinder Singh

[permalink] [raw]
Subject: Re: build breakage -- paravirt_{alloc,free}_ldt

On Mon, Jan 12, 2009 at 4:42 PM, Jiri Kosina <[email protected]> wrote:
> On Mon, 12 Jan 2009, Ingo Molnar wrote:
>
>> > with Linus' tree (ae04d14015) doesn't build for me with
>> >
>> > arch/x86/kernel/ldt.c: In function 'alloc_ldt':
>> > arch/x86/kernel/ldt.c:55: error: implicit declaration of function 'paravirt_alloc_ldt'
>> > arch/x86/kernel/ldt.c:79: error: implicit declaration of function 'paravirt_free_ldt'
>> >
>> > Config on http://www.jikos.cz/jikos/junk/.config
>>
>> hm, it builds fine here with your config. Did .28 build fine for you? The
>> only change to this file since .28 has been Jaswinder's "423a540: x86:
>> ldt.c fix style problems".
>
> Puzzled. On one system, I still get this build error even after make
> mrpoper (I use this machine to build kernel routinely, so it certainly
> didn't happen a few days ago).
>
> But I just tried on different system, and there is builds flawlessly. It's
> gcc 4.3.1 vs 4.3.2. I will check a little bit more.
>

I am using gcc 4.3.2

Please check 'git diff' if by mistake some thing is gone wrong or
check 'git log'

--
JSR

2009-01-12 11:25:22

by Ingo Molnar

[permalink] [raw]
Subject: Re: build breakage -- paravirt_{alloc,free}_ldt


* Jaswinder Singh Rajput <[email protected]> wrote:

> On Mon, Jan 12, 2009 at 4:42 PM, Jiri Kosina <[email protected]> wrote:
> > On Mon, 12 Jan 2009, Ingo Molnar wrote:
> >
> >> > with Linus' tree (ae04d14015) doesn't build for me with
> >> >
> >> > arch/x86/kernel/ldt.c: In function 'alloc_ldt':
> >> > arch/x86/kernel/ldt.c:55: error: implicit declaration of function 'paravirt_alloc_ldt'
> >> > arch/x86/kernel/ldt.c:79: error: implicit declaration of function 'paravirt_free_ldt'
> >> >
> >> > Config on http://www.jikos.cz/jikos/junk/.config
> >>
> >> hm, it builds fine here with your config. Did .28 build fine for you? The
> >> only change to this file since .28 has been Jaswinder's "423a540: x86:
> >> ldt.c fix style problems".
> >
> > Puzzled. On one system, I still get this build error even after make
> > mrpoper (I use this machine to build kernel routinely, so it certainly
> > didn't happen a few days ago).
> >
> > But I just tried on different system, and there is builds flawlessly. It's
> > gcc 4.3.1 vs 4.3.2. I will check a little bit more.
> >
>
> I am using gcc 4.3.2
>
> Please check 'git diff' if by mistake some thing is gone wrong or check
> 'git log'

That wont show working tree corruption.

Safest is to move away the working tree into a backup directory and check
out the tree again:

cd linux
mkdir ../linux-backup
mv * ../linux-backup

git checkout HEAD .

then, if this solves the build problem, do some forensics by looking at:

diff -rNu ../linux-backup ../linux'

Ingo

2009-01-12 11:35:30

by Jiri Kosina

[permalink] [raw]
Subject: Re: build breakage -- paravirt_{alloc,free}_ldt

On Mon, 12 Jan 2009, Ingo Molnar wrote:

> > Puzzled. On one system, I still get this build error even after make
> > mrpoper (I use this machine to build kernel routinely, so it certainly
> > didn't happen a few days ago).
> > But I just tried on different system, and there is builds flawlessly.
> > It's gcc 4.3.1 vs 4.3.2. I will check a little bit more.
> beyond mrproper you might want to try 'git checkout HEAD . -f' as well, to
> get a forced checkout of the current working tree. Should there be any
> corruption in any of the source code files this will get rid of it.

I did a completely fresh clone instead, and it works since that ...
strange. Anyway sorry for alse alarm.

--
SUSE Labs

2009-01-12 11:36:26

by Jaswinder Singh

[permalink] [raw]
Subject: Re: build breakage -- paravirt_{alloc,free}_ldt

On Mon, Jan 12, 2009 at 4:54 PM, Ingo Molnar <[email protected]> wrote:
>
> * Jaswinder Singh Rajput <[email protected]> wrote:
>
>> On Mon, Jan 12, 2009 at 4:42 PM, Jiri Kosina <[email protected]> wrote:
>> > On Mon, 12 Jan 2009, Ingo Molnar wrote:
>> >
>> >> > with Linus' tree (ae04d14015) doesn't build for me with
>> >> >
>> >> > arch/x86/kernel/ldt.c: In function 'alloc_ldt':
>> >> > arch/x86/kernel/ldt.c:55: error: implicit declaration of function 'paravirt_alloc_ldt'
>> >> > arch/x86/kernel/ldt.c:79: error: implicit declaration of function 'paravirt_free_ldt'
>> >> >
>> >> > Config on http://www.jikos.cz/jikos/junk/.config
>> >>
>> >> hm, it builds fine here with your config. Did .28 build fine for you? The
>> >> only change to this file since .28 has been Jaswinder's "423a540: x86:
>> >> ldt.c fix style problems".
>> >
>> > Puzzled. On one system, I still get this build error even after make
>> > mrpoper (I use this machine to build kernel routinely, so it certainly
>> > didn't happen a few days ago).
>> >
>> > But I just tried on different system, and there is builds flawlessly. It's
>> > gcc 4.3.1 vs 4.3.2. I will check a little bit more.
>> >
>>
>> I am using gcc 4.3.2
>>
>> Please check 'git diff' if by mistake some thing is gone wrong or check
>> 'git log'
>
> That wont show working tree corruption.
>

It works for me for my old 166 MHz pentium machine after crashing the
system, 'git diff' tells which files are broken ;-)

2009-01-12 11:39:42

by Ingo Molnar

[permalink] [raw]
Subject: Re: build breakage -- paravirt_{alloc,free}_ldt


* Jaswinder Singh Rajput <[email protected]> wrote:

> On Mon, Jan 12, 2009 at 4:54 PM, Ingo Molnar <[email protected]> wrote:
> >
> > * Jaswinder Singh Rajput <[email protected]> wrote:
> >
> >> On Mon, Jan 12, 2009 at 4:42 PM, Jiri Kosina <[email protected]> wrote:
> >> > On Mon, 12 Jan 2009, Ingo Molnar wrote:
> >> >
> >> >> > with Linus' tree (ae04d14015) doesn't build for me with
> >> >> >
> >> >> > arch/x86/kernel/ldt.c: In function 'alloc_ldt':
> >> >> > arch/x86/kernel/ldt.c:55: error: implicit declaration of function 'paravirt_alloc_ldt'
> >> >> > arch/x86/kernel/ldt.c:79: error: implicit declaration of function 'paravirt_free_ldt'
> >> >> >
> >> >> > Config on http://www.jikos.cz/jikos/junk/.config
> >> >>
> >> >> hm, it builds fine here with your config. Did .28 build fine for you? The
> >> >> only change to this file since .28 has been Jaswinder's "423a540: x86:
> >> >> ldt.c fix style problems".
> >> >
> >> > Puzzled. On one system, I still get this build error even after make
> >> > mrpoper (I use this machine to build kernel routinely, so it certainly
> >> > didn't happen a few days ago).
> >> >
> >> > But I just tried on different system, and there is builds flawlessly. It's
> >> > gcc 4.3.1 vs 4.3.2. I will check a little bit more.
> >> >
> >>
> >> I am using gcc 4.3.2
> >>
> >> Please check 'git diff' if by mistake some thing is gone wrong or check
> >> 'git log'
> >
> > That wont show working tree corruption.
> >
>
> It works for me for my old 166 MHz pentium machine after crashing the
> system, 'git diff' tells which files are broken ;-)

That's cool from Git :-)

Thinking about it, it might not necessarily detect all corruption patterns
though: git diff is sys_lstat() driven - so if a corruption corrupts a
single block on the filesystem (in a working tree file), git diff wont
know about that.

Ingo

2009-01-12 11:52:19

by Jaswinder Singh

[permalink] [raw]
Subject: Re: build breakage -- paravirt_{alloc,free}_ldt

On Mon, Jan 12, 2009 at 5:09 PM, Ingo Molnar <[email protected]> wrote:
>
> * Jaswinder Singh Rajput <[email protected]> wrote:
>> It works for me for my old 166 MHz pentium machine after crashing the
>> system, 'git diff' tells which files are broken ;-)
>
> That's cool from Git :-)
>
> Thinking about it, it might not necessarily detect all corruption patterns
> though: git diff is sys_lstat() driven - so if a corruption corrupts a
> single block on the filesystem (in a working tree file), git diff wont
> know about that.
>

I face these problems very often when I compile kernel in old 166 MHz
machine system often freezes during compilation and that machine is
having ext2 filesystem after rebooting the system some inodes are
deleted and then I start getting funny errors. So 'git diff' tells me
which files are broken and then 'git reset --hard origin' again
provide me working system :-)

--
JSR