All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wolfgang Grandegger <wg@domain.hid>
To: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
Cc: xenomai-core <xenomai@xenomai.org>
Subject: Re: [Xenomai-core] Problems with satch.c under Linux 2.4
Date: Wed, 12 Mar 2008 13:11:01 +0100	[thread overview]
Message-ID: <47D7C855.7060007@domain.hid> (raw)
In-Reply-To: <2ff1a98a0803120336r7906e4f5kad3329925a7aa4ad@domain.hid>

Gilles Chanteperdrix wrote:
> On Wed, Mar 12, 2008 at 11:22 AM, Wolfgang Grandegger <wg@domain.hid> wrote:
>> Gilles Chanteperdrix wrote:
>>  > Wolfgang Grandegger wrote:
>>  >  > Hello,
>>  >  >
>>  >  > I tried to test the POSIX example program satch.c under Linux 2.4.25 for
>>  >  > PPC. I was able to fix a few issues but the module does still not load.
>>  >  > I have attached a patch for Xenomai 2.4.2 fixing:
>>  >  >
>>  >  > - User-space satch: It was necessary to move time.h and signal.h to the
>>  >  >   end of the include block to get it compiled (otherwise clockid_t is
>>  >  >   defined, etc.)
>>  >  >
>>  >  > - User-space satch: It was necessary to move "#define xnprintf printf"
>>  >  >   behind the include block, otherwise the linker complains about missing
>>  >  >   symbols. I wonder how this can work with 2.6. And what is the status
>>  >  >   of xnprintf?
>>  >  >
>>  >  > - Makefile: to avoid a mixup of CFLAG definitions for compiling the
>>  >  >   user-space and kernel-space part, I renamed CFLAGS to UCFLAGS etc.
>>  >  >   (see patch). Note sure if this is an issue for 2.6 as well.
>>  >  >
>>  >  > - Makefile: I added -DPRODUCER to the module build with Linux 2.4.
>>  >  >
>>  >  > - I got the module build, but insmod fails with:
>>  >  >
>>  >  >   bash-2.05b# insmod satch.o
>>  >  >   satch.o: unresolved symbol shm_unlink
>>  >  >   satch.o: unresolved symbol ftruncate
>>  >  >   satch.o: unresolved symbol shm_open
>>  >  >   satch.o: unresolved symbol munmap
>>  >  >   satch.o: unresolved symbol mmap
>>  >  >   satch.o: unresolved symbol pse51_shm_close
>>  >  >
>>  >  >   Any idea why?
>>  >  >
>>  >  > Thanks,
>>  >
>>  > Does the following patch improve anything ?
>>
>>  Yes, the order of the include files does not make trouble any more.
>>  Nevertheless, I need the attached patch to fix the remaining problems
>>  with CFLAGS mangling and missing -DPRODUCER.
> 
> Do we really need the UCFLAGS stuff ? CFLAGS is a standard thing, how
> do the other examples cope with the same problem ? Perhaps  we could
> put modules compilation in a separated makefile name Kbuild ?

For Linux 2.4 we use this module capturing trick to get the CFLAGS of
the kernel. That's what makes trouble. So, the problem only shows up
when modules need to be built for Linux 2.4 together with at least on
application. Yes, it might be better to use KCFLAGS for module
compilation for 2.4. Going to find a better solution a.s.a.p.

Wolfgang.



      reply	other threads:[~2008-03-12 12:11 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-11 10:10 [Xenomai-core] Problems with satch.c under Linux 2.4 Wolfgang Grandegger
2008-03-11 10:25 ` Gilles Chanteperdrix
2008-03-11 11:43   ` Wolfgang Grandegger
2008-03-11 13:37     ` Gilles Chanteperdrix
2008-03-11 22:59 ` Gilles Chanteperdrix
2008-03-12 10:22   ` Wolfgang Grandegger
2008-03-12 10:36     ` Gilles Chanteperdrix
2008-03-12 12:11       ` Wolfgang Grandegger [this message]

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=47D7C855.7060007@domain.hid \
    --to=wg@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.