From: Jan Kiszka <kiszka@domain.hid>
To: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
Cc: xenomai@xenomai.org
Subject: Re: [Xenomai-help] compiling xenomai on x86_64
Date: Tue, 18 Oct 2005 20:29:54 +0200 [thread overview]
Message-ID: <43553F22.80805@domain.hid> (raw)
In-Reply-To: <17237.13723.766826.515585@domain.hid>
[-- Attachment #1: Type: text/plain, Size: 2272 bytes --]
Gilles Chanteperdrix wrote:
> Jan Kiszka wrote:
> > I just analysed this further: the problem disappears when I manually
> > remove any "-I<path-to-kernel-includes>" from the makefiles. Seems to be
> > the well-known user space include issue again... ;)
>
> I tried to compile every kernel arch/i386 has a patch for with gcc 2.95,
> 3.3 and 3.4, and I saw no issue with inclusions of kernel headers
> from user-space. At all.
I think you were lucky. As far as I remember, it is generally no good
idea to include kernel header for userspace compilation as long as you
do not _exactly_ know (or test) what they bring with them. Some
structures or defines locate in different headers under /usr/include
compared to some kernel tree. So, if you are not lucky, you drag those
definitions in twice - see below.
>
> So, there is definitely something you are doing differently from me.
> If this issue is different from the '-m32' flag issue, could you please
> fill a bug report, and this time, attach the exact procedure you are
> following to compile (whether in-tree, or out-of-tree, whether using
> configure or Kconfig, everything that would allow someone to ), the
> .config and .xeno_config files you used, in order for me to be able to
> reproduce the problem you observed ?
>
As I'm not sure if you can reproduce it easily without my environment
(that damn x86_64 gcc4 on SuSE10), I digged a little bit deeper, and
here is a new theory:
The compilation fails in skins/native/libs/task.c (there exist similar
files in other skins as well). The error: structures in
<linux>/include/asm/sigcontext.h are being redefined. Unfortunately, gcc
does not tell me where the first definition was. But here is my finding:
commenting out #include <signal.h> in libs/task.c makes that error
disappear. Following the include chain of /usr/include/signal.h
(userspace headers...), you get to /usr/include/bits/sigcontext.h.
Bingo. On the x86_64 box all structs are defined here according to the
target address width. And as /usr/include/bits/sigcontext.h and
<linux>/include/asm/sigcontext.h do not exclude each other, we get
redefines.
To sum up, I still think that kernel headers need to be avoided in
userspace. Or we have to work around such issues case-by-case...
Jan
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 254 bytes --]
next prev parent reply other threads:[~2005-10-18 18:29 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-10-17 18:44 [Xenomai-help] compiling xenomai on x86_64 Jan Kiszka
2005-10-17 18:57 ` Heikki Lindholm
2005-10-17 19:16 ` Jan Kiszka
2005-10-17 19:59 ` Heikki Lindholm
2005-10-17 20:04 ` Philippe Gerum
2005-10-17 20:10 ` Jan Kiszka
2005-10-17 20:17 ` Philippe Gerum
2005-10-17 20:26 ` Philippe Gerum
2005-10-17 21:37 ` Jan Kiszka
2005-10-18 8:07 ` Jan Kiszka
2005-10-18 8:14 ` Gilles Chanteperdrix
2005-10-18 8:29 ` Jan Kiszka
2005-10-18 17:49 ` Gilles Chanteperdrix
2005-10-18 18:29 ` Jan Kiszka [this message]
2005-10-18 19:20 ` Gilles Chanteperdrix
2005-10-18 19:24 ` Jan Kiszka
2005-10-18 19:34 ` Gilles Chanteperdrix
2005-10-18 19:43 ` Jan Kiszka
2005-10-19 8:37 ` Jan Kiszka
2005-10-19 17:15 ` [Xenomai-help] newbie question Ignacio García Pérez
2005-10-19 17:34 ` Jan Kiszka
2005-10-19 17:44 ` Philippe Gerum
2005-10-19 18:16 ` Gilles Chanteperdrix
2005-10-19 18:31 ` Jan Kiszka
2005-10-19 18:20 ` [Xenomai-help] compiling xenomai on x86_64 Gilles Chanteperdrix
2005-10-17 20:29 ` Jan Kiszka
2005-10-17 20:38 ` Philippe Gerum
2005-10-17 23:32 ` Gilles Chanteperdrix
2005-10-18 5:32 ` Heikki Lindholm
2005-10-18 17:33 ` Gilles Chanteperdrix
2005-10-18 11:16 ` Jan Kiszka
2005-10-17 23:32 ` Gilles Chanteperdrix
2005-10-18 8:09 ` Jan Kiszka
2005-10-18 8:16 ` Gilles Chanteperdrix
2005-10-18 8:32 ` Jan Kiszka
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=43553F22.80805@domain.hid \
--to=kiszka@domain.hid \
--cc=gilles.chanteperdrix@xenomai.org \
--cc=xenomai@xenomai.org \
/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 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.