Skip to contentSkip to conversation

More uml build failures on 2.16.19-rc3 and 2.6.18.1

DISCUSSION Mitch 2 participants 2 messages Oct 28, 2006 – Oct 29, 2006 User-mode Linux (UML)

lore
Share & tools
lore

Mitch

author
#0 lore raw

Hi Jeff, all,

Sorry for the dealy but i've been out of the country.

Anyhow i did some investigation and i've figured out the bug.

Essentially if you try to compile a UML kernel on a 2.6.18.1 or above *host* kernel it will fail with the error messages shown (essentially offsetof macro undefined) because between 2.6.18 and 2.6.18.1 that macro in /usr/include/linux/stddef.h is now wrapped in a #ifdef __KERNEL__ . However since UML doesn't build it's sources with that defined we get an undefined macro and a build failure.

So i'm partly right and partly wrong in my statement below. Yes i did compile a guest UML kernel 2.6.18 fine on host kernel of 2.6.18, and i believe i will be able to compile 2.6.18.1 and above also on a host kernel of 2.6.18 but if i change my host kernel to 2.6.18.1 or above all UML guest builds will fail.

Can someone confirm they can build guest UML kernels on a host kernel >= 2.6.18.1 ??

Thanks
M

-------- Original Message --------
Subject: Re: More uml build failures on 2.16.19-rc3 and 2.6.18.1
Date: Wed, 25 Oct 2006 11:41:30 -0400
From: Jeff Dike <[email protected]>
To: Mitch <[email protected]>
CC: [email protected]
References: <[email protected]>

Quoted 1 line · Mitch

I've definetly not done any such change on my machine. Remember with the same compile, same environment, if i go back to 2.6.18 i can build uml fine. If i move to 2.6.18.1 or above it breaks...

You're sure about that? I just looked through the 2.6.18.1 changelog and I see nothing that would cause this.

Quoted 4 lines

I do notice my gcc stddef does have this defined

% grep offsetof /usr/lib/gcc/i686-linux/4.0.3/include/stddef.h #define offsetof(TYPE, MEMBER) __builtin_offsetof (TYPE, MEMBER)

I would do a -E build and make sure that this header, or another one that defines offsetof is getting pulled in.

Jeff

#1 lore raw
Quoted 6 lines · Mitch

Hi Jeff, all,

Sorry for the dealy but i've been out of the country.

Anyhow i did some investigation and i've figured out the bug.

Quoted 8 lines

Essentially if you try to compile a UML kernel on a 2.6.18.1 or above *host* kernel

it will fail with the error messages shown (essentially offsetof macro undefined) because between 2.6.18 and 2.6.18.1 that macro in /usr/include/linux/stddef.h is now wrapped in a #ifdef __KERNEL__ . However since UML doesn't build it's sources with that defined we get an undefined macro and a build failure.

Ok, we have one bug and one mistake on your part:
1) we should include <stddef.h> instead of <linux/stddef.h> in files using host headers (I don't have the error message at hand, so please handle this yourself, Jeff)
2) /usr/include/{linux,asm} being symlinks inside /usr/src/linux/include is an unsupported configuration since ages. #1 is still a valid bug because when a distribution will distribute glibc and kernheaders based on 2.6.18.1+/2.6.19 ones we'll break anyway.

Quoted 11 lines

So i'm partly right and partly wrong in my statement below. Yes i did compile a guest UML kernel 2.6.18 fine on host kernel of 2.6.18, and i believe i will be able to compile 2.6.18.1 and above also on a host kernel of 2.6.18 but if i change my host kernel to 2.6.18.1 or above all UML guest builds will fail.

Can someone confirm they can build guest UML kernels on a host kernel >= 2.6.18.1 ??

Thanks
M

Signature · 5 lines
Inform me of my mistakes, so I can keep imitating Homer Simpson's "Doh!".
Paolo Giarrusso, aka Blaisorblade
http://www.user-mode-linux.org/~blaisorblade
Chiacchiera con i tuoi amici in tempo reale! 
 http://it.yahoo.com/mail_it/foot/*http://it.messenger.yahoo.com