* [Xenomai] Compilation error
@ 2017-03-30 15:56 Benjamin Alix
2017-03-31 13:49 ` [Xenomai] Fwd: " Benjamin Alix
0 siblings, 1 reply; 4+ messages in thread
From: Benjamin Alix @ 2017-03-30 15:56 UTC (permalink / raw)
To: xenomai
Hi,
I'm compiling Xenomai 3.0.3 with a cross toolchain built with buildroot
(based on gcc 6.3.0) and when it comes to build xenomai I get the following
errors :
make[5]: Entering directory
`/free/stagiaire/buildroot-2017.02/output/build/xenomai-3.0.3/lib/boilerplate/init'
CC libbootstrap_a-bootstrap.o
CC libbootstrap_pic_la-bootstrap.lo
In file included from
/free/stagiaire/buildroot-2017.02/output/build/xenomai-3.0.3/include/cobalt/time.h:26:0,
from
/free/stagiaire/buildroot-2017.02/output/host/usr/powerpc-buildroot-linux-uclibc/sysroot/usr/include/sys/types.h:132,
from bootstrap.c:18:
/free/stagiaire/buildroot-2017.02/output/build/xenomai-3.0.3/include/cobalt/stdio.h:68:1:
error: pasting "__cobalt_" and "(" does not give a valid preprocessing token
COBALT_DECL(int, fputc(int c, FILE *stream));
^
/free/stagiaire/buildroot-2017.02/output/build/xenomai-3.0.3/include/cobalt/stdio.h:68:18:
error: expected declaration specifiers or '...' before '(' token
COBALT_DECL(int, fputc(int c, FILE *stream));
^
/free/stagiaire/buildroot-2017.02/output/build/xenomai-3.0.3/include/cobalt/stdio.h:68:18:
error: expected declaration specifiers or '...' before '(' token
COBALT_DECL(int, fputc(int c, FILE *stream));
^
/free/stagiaire/buildroot-2017.02/output/build/xenomai-3.0.3/include/cobalt/stdio.h:68:1:
error: pasting "__real_" and "(" does not give a valid preprocessing token
COBALT_DECL(int, fputc(int c, FILE *stream));
^
/free/stagiaire/buildroot-2017.02/output/build/xenomai-3.0.3/include/cobalt/stdio.h:68:18:
error: expected declaration specifiers or '...' before '(' token
COBALT_DECL(int, fputc(int c, FILE *stream));
I think it has something to do with token concatenation in preprocessors in
include/cobalt/wrappers.h but I'm not even sure. I
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Xenomai] Fwd: Compilation error
2017-03-30 15:56 [Xenomai] Compilation error Benjamin Alix
@ 2017-03-31 13:49 ` Benjamin Alix
2017-04-01 9:34 ` Philippe Gerum
0 siblings, 1 reply; 4+ messages in thread
From: Benjamin Alix @ 2017-03-31 13:49 UTC (permalink / raw)
To: xenomai
---------- Forwarded message ----------
From: Benjamin Alix <alixbenjamin53@gmail.com>
Date: 2017-03-30 17:56 GMT+02:00
Subject: [Xenomai] Compilation error
To: xenomai@xenomai.org
Hi,
I'm compiling Xenomai 3.0.3 with a cross toolchain built with
buildroot (based on gcc 6.3.0) and when it comes to build xenomai I
get the following errors :
make[5]: Entering directory
`/free/stagiaire/buildroot-2017.02/output/build/xenomai-3.0.3/lib/boilerplate/init'
CC libbootstrap_a-bootstrap.o
CC libbootstrap_pic_la-bootstrap.lo
In file included from
/free/stagiaire/buildroot-2017.02/output/build/xenomai-3.0.3/include/cobalt/time.h:26:0,
from
/free/stagiaire/buildroot-2017.02/output/host/usr/powerpc-buildroot-linux-uclibc/sysroot/usr/include/sys/types.h:132,
from bootstrap.c:18:
/free/stagiaire/buildroot-2017.02/output/build/xenomai-3.0.3/include/cobalt/stdio.h:68:1:
error: pasting "__cobalt_" and "(" does not give a valid preprocessing
token
COBALT_DECL(int, fputc(int c, FILE *stream));
^
/free/stagiaire/buildroot-2017.02/output/build/xenomai-3.0.3/include/cobalt/stdio.h:68:18:
error: expected declaration specifiers or '...' before '(' token
COBALT_DECL(int, fputc(int c, FILE *stream));
^
/free/stagiaire/buildroot-2017.02/output/build/xenomai-3.0.3/include/cobalt/stdio.h:68:18:
error: expected declaration specifiers or '...' before '(' token
COBALT_DECL(int, fputc(int c, FILE *stream));
^
/free/stagiaire/buildroot-2017.02/output/build/xenomai-3.0.3/include/cobalt/stdio.h:68:1:
error: pasting "__real_" and "(" does not give a valid preprocessing
token
COBALT_DECL(int, fputc(int c, FILE *stream));
^
/free/stagiaire/buildroot-2017.02/output/build/xenomai-3.0.3/include/cobalt/stdio.h:68:18:
error: expected declaration specifiers or '...' before '(' token
COBALT_DECL(int, fputc(int c, FILE *stream));
I think it has something to do with token concatenation in
preprocessors in include/cobalt/wrappers.h but I'm not even sure. I
Sorry, I mistakingly sent the email earlier than I wanted and could'nt
correct it until now.
More context : I'm compiling for a powerpc 32 bits architecture. The
configuration is :
[...]build/xenomai-3.0.3 > ./scripts/xeno-config --info
Xenomai version: 3.0.3
Cobalt core is NOT present on this system
Compiler: gcc version 6.3.0 (Buildroot 2017.02)
Build args: --target=powerpc-buildroot-linux-uclibc
--host=powerpc-buildroot-linux-uclibc --build=x86_64-pc-linux-gnu
--prefix=/usr --exec-prefix=/usr --sysconfdir=/etc
--localstatedir=/var --program-prefix= --disable-gtk-doc
--disable-gtk-doc-html --disable-doc --disable-docs
--disable-documentation --with-xmlto=no --with-fop=no
--disable-dependency-tracking --enable-ipv6 --disable-nls
--disable-static --enable-shared --includedir=/usr/include/xenomai/
--disable-doc-install build_alias=x86_64-pc-linux-gnu
host_alias=powerpc-buildroot-linux-uclibc
target_alias=powerpc-buildroot-linux-uclibc
CC=/buildroot-2017.02/output/host/usr/bin/powerpc-buildroot-linux-uclibc-gcc
CFLAGS=-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE
-D_FILE_OFFSET_BITS=64 -O2 LDFLAGS= CPPFLAGS=-D_LARGEFILE_SOURCE
-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64
CPP=/buildroot-2017.02/output/host/usr/bin/powerpc-buildroot-linux-uclibc-cpp
PKG_CONFIG=/buildroot-2017.02/output/host/usr/bin/pkg-config
Buildroot adds a lot of configuration options, anyway I tried to
compile outside buildroot and still got the same error message.
Thanks for your attention.
Regards,
Benjamin
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Xenomai] Fwd: Compilation error
2017-03-31 13:49 ` [Xenomai] Fwd: " Benjamin Alix
@ 2017-04-01 9:34 ` Philippe Gerum
2017-04-01 9:40 ` Philippe Gerum
0 siblings, 1 reply; 4+ messages in thread
From: Philippe Gerum @ 2017-04-01 9:34 UTC (permalink / raw)
To: Benjamin Alix, xenomai
On 03/31/2017 03:49 PM, Benjamin Alix wrote:
> ---------- Forwarded message ----------
> From: Benjamin Alix <alixbenjamin53@gmail.com>
> Date: 2017-03-30 17:56 GMT+02:00
> Subject: [Xenomai] Compilation error
> To: xenomai@xenomai.org
>
>
> Hi,
>
> I'm compiling Xenomai 3.0.3 with a cross toolchain built with
> buildroot (based on gcc 6.3.0) and when it comes to build xenomai I
> get the following errors :
>
> make[5]: Entering directory
> `/free/stagiaire/buildroot-2017.02/output/build/xenomai-3.0.3/lib/boilerplate/init'
> CC libbootstrap_a-bootstrap.o
> CC libbootstrap_pic_la-bootstrap.lo
> In file included from
> /free/stagiaire/buildroot-2017.02/output/build/xenomai-3.0.3/include/cobalt/time.h:26:0,
> from
> /free/stagiaire/buildroot-2017.02/output/host/usr/powerpc-buildroot-linux-uclibc/sysroot/usr/include/sys/types.h:132,
> from bootstrap.c:18:
> /free/stagiaire/buildroot-2017.02/output/build/xenomai-3.0.3/include/cobalt/stdio.h:68:1:
> error: pasting "__cobalt_" and "(" does not give a valid preprocessing
> token
It looks like you are building Xenomai on top of a uClibc release which
is implementing fputc() and putchar() as macros, without defining the
__STDIO_PUTC_MACRO indicator (anymore). You need to find a way to
discriminate both cases, so that the right declaration block is picked
for those routines in include/cobalt/stdio.h.
--
Philippe.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Xenomai] Fwd: Compilation error
2017-04-01 9:34 ` Philippe Gerum
@ 2017-04-01 9:40 ` Philippe Gerum
0 siblings, 0 replies; 4+ messages in thread
From: Philippe Gerum @ 2017-04-01 9:40 UTC (permalink / raw)
To: Benjamin Alix, xenomai
On 04/01/2017 11:34 AM, Philippe Gerum wrote:
> On 03/31/2017 03:49 PM, Benjamin Alix wrote:
>> ---------- Forwarded message ----------
>> From: Benjamin Alix <alixbenjamin53@gmail.com>
>> Date: 2017-03-30 17:56 GMT+02:00
>> Subject: [Xenomai] Compilation error
>> To: xenomai@xenomai.org
>>
>>
>> Hi,
>>
>> I'm compiling Xenomai 3.0.3 with a cross toolchain built with
>> buildroot (based on gcc 6.3.0) and when it comes to build xenomai I
>> get the following errors :
>>
>> make[5]: Entering directory
>> `/free/stagiaire/buildroot-2017.02/output/build/xenomai-3.0.3/lib/boilerplate/init'
>> CC libbootstrap_a-bootstrap.o
>> CC libbootstrap_pic_la-bootstrap.lo
>> In file included from
>> /free/stagiaire/buildroot-2017.02/output/build/xenomai-3.0.3/include/cobalt/time.h:26:0,
>> from
>> /free/stagiaire/buildroot-2017.02/output/host/usr/powerpc-buildroot-linux-uclibc/sysroot/usr/include/sys/types.h:132,
>> from bootstrap.c:18:
>> /free/stagiaire/buildroot-2017.02/output/build/xenomai-3.0.3/include/cobalt/stdio.h:68:1:
>> error: pasting "__cobalt_" and "(" does not give a valid preprocessing
>> token
>
> It looks like you are building Xenomai on top of a uClibc release which
> is implementing fputc() and putchar() as macros, without defining the
> __STDIO_PUTC_MACRO indicator (anymore). You need to find a way to
> discriminate both cases, so that the right declaration block is picked
> for those routines in include/cobalt/stdio.h.
>
Please try this, and let us know of the outcome:
diff --git a/include/cobalt/stdio.h b/include/cobalt/stdio.h
index c915e6d..864f1d3 100644
--- a/include/cobalt/stdio.h
+++ b/include/cobalt/stdio.h
@@ -63,20 +63,18 @@ COBALT_DECL(int, puts(const char *s));
COBALT_DECL(int, fputs(const char *s, FILE *stream));
-#if !defined(__UCLIBC__) || !defined(__STDIO_PUTC_MACRO)
-
-COBALT_DECL(int, fputc(int c, FILE *stream));
-
+#ifndef putchar
COBALT_DECL(int, putchar(int c));
-
#else
-
-int __wrap_fputc(int c, FILE *stream);
-#define __real_fputc __wrap_fputc
-
int __wrap_putchar(int c);
#define __real_putchar __wrap_putchar
+#endif
+#ifndef fputc
+COBALT_DECL(int, fputc(int c, FILE *stream));
+#else
+int __wrap_fputc(int c, FILE *stream);
+#define __real_fputc __wrap_fputc
#endif
COBALT_DECL(size_t,
--
Philippe.
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2017-04-01 9:40 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-30 15:56 [Xenomai] Compilation error Benjamin Alix
2017-03-31 13:49 ` [Xenomai] Fwd: " Benjamin Alix
2017-04-01 9:34 ` Philippe Gerum
2017-04-01 9:40 ` Philippe Gerum
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.