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: Tue, 11 Mar 2008 12:43:49 +0100 [thread overview]
Message-ID: <47D67075.7060504@domain.hid> (raw)
In-Reply-To: <2ff1a98a0803110325w5f497596tb7206095aa211a65@domain.hid>
[-- Attachment #1: Type: text/plain, Size: 2266 bytes --]
Gilles Chanteperdrix wrote:
> On Tue, Mar 11, 2008 at 11:10 AM, Wolfgang Grandegger <wg@domain.hid> 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.)
>
> This should not happen, header file should not depend on the inclusion order.
True, but it happens quite often :-(.
>
>> - 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 tested satch recently on trunk. I had to make the printf change
> (xnprintf is now defined in xenomai include files to xnarch_printf,
> but xnarch_printf is not defined when compiling in user space, so I
> replaced #define xnprintf printf with #define xnarch_printf printf) to
> make it work again, but I saw no problem with include file order.
The problem with xnprintf goes away with "#define xnarch_printf printf".
I have attached the make log showing the errors with the original
include file order.
>> - 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?
>
> Because satch uses xenomai posix shared memories, so you have to
> enable support for shared memories in the posix module configuration.
OK, that fixed the problem. A hint in the README would be useful, though.
Thanks.
Wolfgang.
[-- Attachment #2: make1.log --]
[-- Type: text/x-log, Size: 3750 bytes --]
ppc_6xx-gcc -D__KERNEL__ -I/temp/test/linuxppc_2_4_devel/include -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common -fomit-frame-pointer -I/temp/test/linuxppc_2_4_devel/arch/ppc -fsigned-char -msoft-float -pipe -ffixed-r2 -Wno-uninitialized -mmultiple -mstring -g -ggdb -DMODULE -DPRODUCER -I/temp/test/linuxppc_2_4_devel/include/xenomai -I/temp/test/linuxppc_2_4_devel/include/xenomai/compat -I/temp/test/linuxppc_2_4_devel/include/xenomai/posix -c -o satch.o satch.c
In file included from satch.c:7:
/temp/test/linuxppc_2_4_devel/include/xenomai/posix/time.h:61: error: parse error before "clock_id"
/temp/test/linuxppc_2_4_devel/include/xenomai/posix/time.h:62: warning: function declaration isn't a prototype
/temp/test/linuxppc_2_4_devel/include/xenomai/posix/time.h:64: error: parse error before "clock_id"
/temp/test/linuxppc_2_4_devel/include/xenomai/posix/time.h:65: warning: function declaration isn't a prototype
/temp/test/linuxppc_2_4_devel/include/xenomai/posix/time.h:67: error: parse error before "clock_id"
/temp/test/linuxppc_2_4_devel/include/xenomai/posix/time.h:68: warning: function declaration isn't a prototype
/temp/test/linuxppc_2_4_devel/include/xenomai/posix/time.h:70: error: parse error before "clock_id"
/temp/test/linuxppc_2_4_devel/include/xenomai/posix/time.h:73: warning: function declaration isn't a prototype
/temp/test/linuxppc_2_4_devel/include/xenomai/posix/time.h:78: error: parse error before "clockid"
/temp/test/linuxppc_2_4_devel/include/xenomai/posix/time.h:80: warning: function declaration isn't a prototype
/temp/test/linuxppc_2_4_devel/include/xenomai/posix/time.h:82: error: parse error before "timerid"
/temp/test/linuxppc_2_4_devel/include/xenomai/posix/time.h:82: warning: function declaration isn't a prototype
/temp/test/linuxppc_2_4_devel/include/xenomai/posix/time.h:84: error: parse error before "timerid"
/temp/test/linuxppc_2_4_devel/include/xenomai/posix/time.h:87: warning: function declaration isn't a prototype
/temp/test/linuxppc_2_4_devel/include/xenomai/posix/time.h:89: error: parse error before "timerid"
/temp/test/linuxppc_2_4_devel/include/xenomai/posix/time.h:89: warning: function declaration isn't a prototype
/temp/test/linuxppc_2_4_devel/include/xenomai/posix/time.h:91: error: parse error before "timerid"
/temp/test/linuxppc_2_4_devel/include/xenomai/posix/time.h:91: warning: function declaration isn't a prototype
In file included from /temp/test/linuxppc_2_4_devel/include/asm/xenomai/wrappers.h:27,
from /temp/test/linuxppc_2_4_devel/include/asm-generic/xenomai/hal.h:40,
from /temp/test/linuxppc_2_4_devel/include/asm/xenomai/hal.h:32,
from /temp/test/linuxppc_2_4_devel/include/asm-generic/xenomai/system.h:39,
from /temp/test/linuxppc_2_4_devel/include/asm/xenomai/system.h:29,
from /temp/test/linuxppc_2_4_devel/include/xenomai/nucleus/types.h:39,
from /temp/test/linuxppc_2_4_devel/include/xenomai/nucleus/queue.h:24,
from /temp/test/linuxppc_2_4_devel/include/xenomai/nucleus/timebase.h:29,
from /temp/test/linuxppc_2_4_devel/include/xenomai/nucleus/timer.h:26,
from /temp/test/linuxppc_2_4_devel/include/xenomai/nucleus/thread.h:25,
from /temp/test/linuxppc_2_4_devel/include/xenomai/nucleus/pod.h:34,
from /temp/test/linuxppc_2_4_devel/include/xenomai/nucleus/xenomai.h:23,
from /temp/test/linuxppc_2_4_devel/include/xenomai/posix/pthread.h:24,
from satch.c:12:
/temp/test/linuxppc_2_4_devel/include/asm-generic/xenomai/wrappers.h:169: error: parse error before numeric constant
make: *** [satch.o] Error 1
next prev parent reply other threads:[~2008-03-11 11:43 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 [this message]
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
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=47D67075.7060504@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.