Re: some kernel headers broken in current git ?



H. Peter Anvin wrote:
Gabriel C wrote:
BITS_PER_LONG was originally set in <asm/types.h>:

39 #ifdef CONFIG_X86_32
40 # define BITS_PER_LONG 32
41 #else
42 # define BITS_PER_LONG 64
43 #endif
User land does not know anything about 'CONFIG_X86_32' right ?

Wait... this is *user mode* code at this point?

Linux kernel headers aren't includable from user space without
processing them through "make headers_install".

However, from looking at the filenames in your list, it doesn't look
like userspace code at all (although they're wrappered to the degree
that it's somewhat hard to tell.) Thus, you're building a kernel
module, not userland.

Hmm right is building an kernel modules.


That is the problem. I've changed the headers virtualbox need from

#ifdef CONFIG_X86_32 to #ifdef __i386__ and all compiled fine.

( subarch headers includes are changed manually still but I think it is the same problem )

Also all the headers got these defines with CONFIG_X86_32 does not work.

...

#ifdef CONFIG_X86_32
# include "foo_32.h"
#else
# include "foo_64.h"
#endif

...

results in including both header files on my i686 box.

I don't know what the right way is to fix that , define some who CONFIG_X86_32 to __i386__ ? or just s/CONFIG_X86_32/__i386__/ ?

It sounds like something is seriously broken in your setup, or in the
VirtualBox makefiles. From the looks of it, I would say the latter.

It would help to see how gcc is invoked, but your email message doesn't
include any gcc invocations, and your "full error log" weblink is
broken, so it's hard to say.


Sorry that box was down some hours I've tested some hardware.

Here is a full build log , virtualbox build against cfa76f024f7c9e65169425804e5b32e71f66d0ee :


http://194.231.229.228/virtualbox-build.log.tar.bz2


Gabriel
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



Relevant Pages

  • Re: [PATCH] arch/tile: new multi-core architecture for Linux
    ... support in the arch/tile/drivers directory is for devices which exist ... driver is tied to the Tilera networking shim DMA engine on the chip. ... but kernel is also good. ... part of the set of headers that provide access to all the grotty details ...
    (Linux-Kernel)
  • State of userland headers
    ... When I first created llh, it was a couple of weeks before 2.6.0 came out. ... had a need for those headers, since a new version of PLD distro was supposed ... LLH as it is is not and never will be mergable into mainline kernel. ... llh for the most popular archs and figure out how to build all the various ...
    (Linux-Kernel)
  • Re: State of userland headers
    ... to get changes of this nature into glibc in particular, ... If the headers ... the kernel. ... This would mean that the kabi headers have no ...
    (Linux-Kernel)
  • Re: [PATCH] make headers_install kbuild target.
    ... There are many other users that poke direct in the kernel source also. ... The gentoo people have been collecting patches to clean up the headers: ... For kernel space, you can do it incrementally, since the whole kabi/ ...
    (Linux-Kernel)
  • Re: [RFC] Splitting kernel headers and deprecating __KERNEL__
    ... > just make one thing clear: the kernel headers are for the kernel, ... userland must duplicate the contents of headers in which the kernel ... defines the kerneluserland ABI, tracking changes in them in the ...
    (Linux-Kernel)