All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: More uml build failures on 2.16.19-rc3 and 2.6.18.1
@ 2006-10-24 21:00 Mitch
  2006-10-25 15:41 ` Jeff Dike
  0 siblings, 1 reply; 8+ messages in thread
From: Mitch @ 2006-10-24 21:00 UTC (permalink / raw)
  To: jdike, linux-kernel

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...

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)

And i notice my compiler has it inbuilt, so maybe this is a gcc 4.0.3 
issue ?

% strings /usr/libexec/gcc/i686-linux/4.0.3/cc1|grep offsetof
offsetof_member_designator
__builtin_offsetof
fold_offsetof_1
-Winvalid-offsetof
Warn about invalid uses of the "offsetof" macro


-------- Original Message --------
Subject: Re: More uml build failures on 2.16.19-rc3 and 2.6.18.1
Date: Tue, 24 Oct 2006 09:20:25 -0400
From: Jeff Dike <jdike@addtoit.com>
To: Mitch <Mitch@0Bits.COM>
CC: linux-kernel@vger.kernel.org
References: <453DC147.2020508@0Bits.COM>

On Tue, Oct 24, 2006 at 11:31:19AM +0400, Mitch wrote:
> I'm still having build failures on 2.6.18.1 and even the latest -rc3
> 
> home /usr/src/sources/kernel/linux-2.6.18% !ma
> make ARCH=um
>   SYMLINK arch/um/include/kern_constants.h
>   CC      arch/um/sys-i386/user-offsets.s
> arch/um/sys-i386/user-offsets.c: In function 'foo':
> arch/um/sys-i386/user-offsets.c:19: warning: implicit declaration of 
> function 'offsetof'

The last time I saw this, someone had replaced the glibc kernel
headers with a link to include/ within a kernel pool.  There, offsetof
is wrapped in #ifdef __KERNEL__, and inaccessible to userspace.

The glibc headers have a usable offsetof, so fix that, and UML should
build.

				Jeff

^ permalink raw reply	[flat|nested] 8+ messages in thread
* Re: More uml build failures on 2.16.19-rc3 and 2.6.18.1
@ 2006-10-28 11:21 Mitch
  2006-10-29 17:57 ` Blaisorblade
  0 siblings, 1 reply; 8+ messages in thread
From: Mitch @ 2006-10-28 11:21 UTC (permalink / raw)
  To: jdike, linux-kernel, blaisorblade, penberg

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 <jdike@addtoit.com>
To: Mitch <Mitch@0Bits.COM>
CC: linux-kernel@vger.kernel.org
References: <453E7F07.9010804@0Bits.COM>

On Wed, Oct 25, 2006 at 01:00:55AM +0400, Mitch wrote:
> 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.

> 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

^ permalink raw reply	[flat|nested] 8+ messages in thread
* Re: More uml build failures on 2.16.19-rc3 and 2.6.18.1
@ 2006-10-24  8:34 Mitch
  0 siblings, 0 replies; 8+ messages in thread
From: Mitch @ 2006-10-24  8:34 UTC (permalink / raw)
  To: penberg, linux-kernel

Maybe my compiler. Anyone building with 4.0.3 ?

home /usr/src/sources/kernel/linux-2.6.18% make ARCH=um CC=gcc\ -v
Using built-in specs.
   SYMLINK arch/um/include/kern_constants.h
   CC      arch/um/sys-i386/user-offsets.s
Using built-in specs.
Target: i686-linux
Configured with: ../gcc-4.0.3/configure --disable-static --prefix=/usr 
--disable-nls --with-system-zlib i686-linux
Thread model: posix
gcc version 4.0.3
  /usr/libexec/gcc/i686-linux/4.0.3/cc1 -quiet -v -Iarch/um/include 
-I/usr/src/sources/kernel/linux-2.6.18/arch/um/include/skas 
-D__arch_um__ -DSUBARCH="i386" -Dvmap=kernel_vmap 
-Din6addr_loopback=kernel_in6addr_loopback -D_FILE_OFFSET_BITS=64 
-D_GNU_SOURCE -D_LARGEFILE64_SOURCE -MD 
arch/um/sys-i386/.user-offsets.s.d arch/um/sys-i386/user-offsets.c 
-quiet -dumpbase user-offsets.c -march=i686 -mpreferred-stack-boundary=2 
-auxbase-strip arch/um/sys-i386/user-offsets.s -Os -Wall -Wundef 
-Wstrict-prototypes -Wno-trigraphs -version -fno-strict-aliasing 
-fno-common -ffreestanding -fverbose-asm -o arch/um/sys-i386/user-offsets.s
ignoring nonexistent directory "/usr/local/include"
ignoring nonexistent directory 
"/usr/lib/gcc/i686-linux/4.0.3/../../../../i686-linux/include"
#include "..." search starts here:
#include <...> search starts here:
  arch/um/include
  /usr/src/sources/kernel/linux-2.6.18/arch/um/include/skas
  /usr/lib/gcc/i686-linux/4.0.3/include
  /usr/include
End of search list.
GNU C version 4.0.3 (i686-linux)
         compiled by GNU C version 3.4.6.
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
arch/um/sys-i386/user-offsets.c: In function 'foo':
arch/um/sys-i386/user-offsets.c:19: warning: implicit declaration of 
function 'offsetof'
arch/um/sys-i386/user-offsets.c:19: error: syntax error before 'struct'
arch/um/sys-i386/user-offsets.c:20: error: syntax error before 'struct'
arch/um/sys-i386/user-offsets.c:21: error: syntax error before 'struct'
arch/um/sys-i386/user-offsets.c:22: error: syntax error before 'struct'
arch/um/sys-i386/user-offsets.c:23: error: syntax error before 'struct'
arch/um/sys-i386/user-offsets.c:24: error: syntax error before 'struct'
arch/um/sys-i386/user-offsets.c:25: error: syntax error before 'struct'
arch/um/sys-i386/user-offsets.c:26: error: syntax error before 'struct'
arch/um/sys-i386/user-offsets.c:27: error: syntax error before 'struct'
arch/um/sys-i386/user-offsets.c:28: error: syntax error before 'struct'
arch/um/sys-i386/user-offsets.c:29: error: syntax error before 'struct'
arch/um/sys-i386/user-offsets.c:30: error: syntax error before 'struct'
arch/um/sys-i386/user-offsets.c:31: error: syntax error before 'struct'
arch/um/sys-i386/user-offsets.c:32: error: syntax error before 'struct'
arch/um/sys-i386/user-offsets.c:33: error: syntax error before 'struct'
arch/um/sys-i386/user-offsets.c:34: error: syntax error before 'struct'
arch/um/sys-i386/user-offsets.c:35: error: syntax error before 'struct'
arch/um/sys-i386/user-offsets.c:36: error: syntax error before 'struct'
arch/um/sys-i386/user-offsets.c:37: error: syntax error before 'struct'
arch/um/sys-i386/user-offsets.c:38: error: syntax error before 'struct'
arch/um/sys-i386/user-offsets.c:39: error: syntax error before 'struct'
arch/um/sys-i386/user-offsets.c:40: error: syntax error before 'struct'
arch/um/sys-i386/user-offsets.c:41: error: syntax error before 'struct'
arch/um/sys-i386/user-offsets.c:42: error: syntax error before 'struct'
arch/um/sys-i386/user-offsets.c:43: error: syntax error before 'struct'
arch/um/sys-i386/user-offsets.c:44: error: syntax error before 'struct'
arch/um/sys-i386/user-offsets.c:45: error: syntax error before 'struct'
arch/um/sys-i386/user-offsets.c:46: error: syntax error before 'struct'
arch/um/sys-i386/user-offsets.c:47: error: syntax error before 'struct'
arch/um/sys-i386/user-offsets.c:48: error: syntax error before 'struct'
make[1]: *** [arch/um/sys-i386/user-offsets.s] Error 1
make: *** [arch/um/sys-i386/user-offsets.s] Error 2
The mail in /var/mail/mitch has been read.
home /usr/src/sources/kernel/linux-2.6.18%




-------- Original Message --------
Subject: Re: [Fwd: Re: More uml build failures on 2.16.19-rc3 and 2.6.18.1]
Date: Tue, 24 Oct 2006 11:31:06 +0300
From: Pekka Enberg <penberg@cs.helsinki.fi>
To: Mitch <Mitch@0bits.com>
CC: linux-kernel@vger.kernel.org, 
user-mode-linux-devel@lists.sourceforge.net
References: <453DCB33.3060607@0Bits.COM>

Hi,

On 10/24/06, Mitch <Mitch@0bits.com> wrote:
> Yup, did do 'make mrproper'. config attached.

Works for me. Perhaps the UML people can figure out what's going on.

                                     Pekka

^ permalink raw reply	[flat|nested] 8+ messages in thread
* More uml build failures on 2.16.19-rc3 and 2.6.18.1
@ 2006-10-24  7:31 Mitch
  2006-10-24  7:41 ` Pekka Enberg
  2006-10-24 13:20 ` Jeff Dike
  0 siblings, 2 replies; 8+ messages in thread
From: Mitch @ 2006-10-24  7:31 UTC (permalink / raw)
  To: linux-kernel

I'm still having build failures on 2.6.18.1 and even the latest -rc3

Anyone ?
M

home /usr/src/sources/kernel/linux-2.6.18% !ma
make ARCH=um
   SYMLINK arch/um/include/kern_constants.h
   CC      arch/um/sys-i386/user-offsets.s
arch/um/sys-i386/user-offsets.c: In function 'foo':
arch/um/sys-i386/user-offsets.c:19: warning: implicit declaration of 
function 'offsetof'
arch/um/sys-i386/user-offsets.c:19: error: syntax error before 'struct'
arch/um/sys-i386/user-offsets.c:20: error: syntax error before 'struct'
arch/um/sys-i386/user-offsets.c:21: error: syntax error before 'struct'
arch/um/sys-i386/user-offsets.c:22: error: syntax error before 'struct'
arch/um/sys-i386/user-offsets.c:23: error: syntax error before 'struct'
arch/um/sys-i386/user-offsets.c:24: error: syntax error before 'struct'
arch/um/sys-i386/user-offsets.c:25: error: syntax error before 'struct'
arch/um/sys-i386/user-offsets.c:26: error: syntax error before 'struct'
arch/um/sys-i386/user-offsets.c:27: error: syntax error before 'struct'
arch/um/sys-i386/user-offsets.c:28: error: syntax error before 'struct'
arch/um/sys-i386/user-offsets.c:29: error: syntax error before 'struct'
arch/um/sys-i386/user-offsets.c:30: error: syntax error before 'struct'
arch/um/sys-i386/user-offsets.c:31: error: syntax error before 'struct'
arch/um/sys-i386/user-offsets.c:32: error: syntax error before 'struct'
arch/um/sys-i386/user-offsets.c:33: error: syntax error before 'struct'
arch/um/sys-i386/user-offsets.c:34: error: syntax error before 'struct'
arch/um/sys-i386/user-offsets.c:35: error: syntax error before 'struct'
arch/um/sys-i386/user-offsets.c:36: error: syntax error before 'struct'
arch/um/sys-i386/user-offsets.c:37: error: syntax error before 'struct'
arch/um/sys-i386/user-offsets.c:38: error: syntax error before 'struct'
arch/um/sys-i386/user-offsets.c:39: error: syntax error before 'struct'
arch/um/sys-i386/user-offsets.c:40: error: syntax error before 'struct'
arch/um/sys-i386/user-offsets.c:41: error: syntax error before 'struct'
arch/um/sys-i386/user-offsets.c:42: error: syntax error before 'struct'
arch/um/sys-i386/user-offsets.c:43: error: syntax error before 'struct'
arch/um/sys-i386/user-offsets.c:44: error: syntax error before 'struct'
arch/um/sys-i386/user-offsets.c:45: error: syntax error before 'struct'
arch/um/sys-i386/user-offsets.c:46: error: syntax error before 'struct'
arch/um/sys-i386/user-offsets.c:47: error: syntax error before 'struct'
arch/um/sys-i386/user-offsets.c:48: error: syntax error before 'struct'
make[1]: *** [arch/um/sys-i386/user-offsets.s] Error 1
make: *** [arch/um/sys-i386/user-offsets.s] Error 2

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2006-10-29 16:58 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-10-24 21:00 More uml build failures on 2.16.19-rc3 and 2.6.18.1 Mitch
2006-10-25 15:41 ` Jeff Dike
  -- strict thread matches above, loose matches on Subject: below --
2006-10-28 11:21 Mitch
2006-10-29 17:57 ` Blaisorblade
2006-10-24  8:34 Mitch
2006-10-24  7:31 Mitch
2006-10-24  7:41 ` Pekka Enberg
2006-10-24 13:20 ` Jeff Dike

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.