public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Sam Ravnborg <sam@ravnborg.org>
To: "H. Peter Anvin" <hpa@zytor.com>
Cc: Gabriel C <nix.or.die@googlemail.com>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Ingo Molnar <mingo@elte.hu>, Gabriel C <crazy@pimpmylinux.org>,
	Thomas Gleixner <tglx@linutronix.de>
Subject: Re: some kernel headers broken in current git ?
Date: Sun, 21 Oct 2007 22:02:14 +0200	[thread overview]
Message-ID: <20071021200214.GA6250@uranus.ravnborg.org> (raw)
In-Reply-To: <471BA564.3040305@zytor.com>

On Sun, Oct 21, 2007 at 12:15:48PM -0700, 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?
No - it is a kernel module.
But what a messy codebase to look at...

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

>From the file "the-linux-kernel.h":
/*
 * Include iprt/types.h to install the bool wrappers.
 * Then use the linux bool type for all the stuff include here.
 */
#include <iprt/types.h>
#define bool linux_bool

And that file named "types.h" is not a kernel types.h - so we miss that
file. I guess it was pulled in by some other headerfile in the past.

But I also notice that it latest source from VirtualBox the
line number for include of spinlock-h does not match.


This is most likely a combination of VirtualBox doing strange strange things
and some deep dependency missing in one of the headerfiles.

Add a #include <linux/types.h> to the-linux-kernel.h and let us know if it helps.

	Sam

  reply	other threads:[~2007-10-21 20:00 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-19 20:44 some kernel headers broken in current git ? Gabriel C
2007-10-19 21:08 ` Jiri Kosina
2007-10-19 21:19   ` Gabriel C
2007-10-19 22:23     ` Gabriel C
2007-10-19 22:49       ` Thomas Gleixner
2007-10-19 23:43         ` Gabriel C
2007-10-20  1:34           ` H. Peter Anvin
2007-10-21  4:29 ` H. Peter Anvin
2007-10-21 10:25   ` Gabriel C
2007-10-21 12:39     ` Gabriel C
2007-10-21 19:15       ` H. Peter Anvin
2007-10-21 20:02         ` Sam Ravnborg [this message]
2007-10-21 21:22           ` Gabriel C
2007-10-21 21:26             ` H. Peter Anvin
2007-10-21 21:56               ` Gabriel C
2007-10-21 20:10         ` Gabriel C

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20071021200214.GA6250@uranus.ravnborg.org \
    --to=sam@ravnborg.org \
    --cc=crazy@pimpmylinux.org \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=nix.or.die@googlemail.com \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox