All of lore.kernel.org
 help / color / mirror / Atom feed
* [Xenomai] Error boilerplate/wrappers.h no found trying to compile RTDM module on 3.x-rc3 cobalt
@ 2015-03-06  9:28 Helder Daniel
  2015-03-06  9:38 ` Philippe Gerum
  0 siblings, 1 reply; 11+ messages in thread
From: Helder Daniel @ 2015-03-06  9:28 UTC (permalink / raw)
  To: Xenomai@xenomai.org

Hi,

I am trying to compile a simple RTDM driver that rtdm_printks a message
when IRQ 12 (PS2 mouse) is up.

It's a Debian 32 bit system on top of a 64 bit core 2 duo P8600 processor,
however I already installed g++multilib package which get me rid of other
related errors with missing libc versions.

I am using a Makefile that works for Xenomai 2.5.x series, but I get an
error: "boilerplate/wrappers.h: No such file or directory"
and lot's of other. (Complete list of errors is at the end).

The make file I am using is this:

obj-m += intr.o

EXTRA_CFLAGS := -I/usr/xenomai/include -I/usr/include

all:
make -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules
clean:
make -C /lib/modules/$(shell uname -r)/build M=$(PWD) clean

Maybe I have the wrong dirs in the compiler include path?
If I just set include path as (removing /usr/include):

EXTRA_CFLAGS := -I/usr/xenomai/include

I get just an error:

/usr/xenomai/include/rtdm/rtdm.h:23:19: fatal error: fcntl.h: No such file
or directory

but fcntl.h shouldn't be required only on userland?

May I am including an rtdm.h for user land?
I've found some rtdm.h files in xenomai install dir:

/usr/xenomai/include/trank/rtdm/rtdm.h
/usr/xenomai/include/rtdm/uapi/rtdm.h
/usr/xenomai/include/rtdm/rtdm.h

If so there is one just for kernel space?
I guess for user space is:
/usr/xenomai/include/rtdm/uapi/rtdm.h

for kernel:
/usr/xenomai/include/rtdm/rtdm.h

I am not sure why there is a version in trank?
/usr/xenomai/include/trank/rtdm/rtdm.h

I am including in the module <rtdm/rtdm.h>, so:
 /usr/xenomai/include/rtdm/rtdm.h

My Xenomai version is:

$> /usr/xenomai/sbin/version -a
Xenomai/cobalt v3.0-rc3 --
Target: i686-pc-linux-gnu
Compiler: gcc version 4.7.2 (Debian 4.7.2-5)
Build args:  '--with-core=cobalt' '--enable-registry' '--enable-smp'
'--enable-pshared' '--prefix=/usr/xenomai'

Module source code is:

#include <linux/module.h> // Needed by all modules
#include <rtdm/rtdm.h>

#define IRQ 12
#define "PS2MouseIntRT"

rtdm_irq_t;

int irq_handler (rtdm_irq_t *irq_handle) {
rtdm_printk ("IQR12 occurred (RTDM handler)\n");
return RTDM_IRQ_HANDLED;
}

static int __init start(void) {
    //Requets IRQ
    return rtdm_irq_request(&intr, IRQ, irq_handler, 0, name, NULL);
}

static void __exit stop(void) {
    //frees IRQ
rtdm_irq_free (&intr);
}

module_init(start);
module_exit(stop);


Complete output of make file:

make
echo -I/usr/xenomai/include -I/usr/include
-I/usr/xenomai/include -I/usr/include
make -C /lib/modules/3.18.7-rt2/build M=/root/prg/01-rtdm_interrupt modules
make[1]: Entering directory `/usr/src/linux-headers-3.18.7-rt2'
  CC [M]  /root/prg/01-rtdm_interrupt/intr.o
In file included from /usr/include/features.h:356:0,
                 from /usr/include/fcntl.h:27,
                 from /usr/xenomai/include/rtdm/rtdm.h:23,
                 from /root/prg/01-rtdm_interrupt/intr.c:3:
/usr/include/sys/cdefs.h:287:0: warning: "__always_inline" redefined
[enabled by default]
In file included from include/linux/compiler.h:54:0,
                 from include/uapi/linux/stddef.h:1,
                 from include/linux/stddef.h:4,
                 from ./include/uapi/linux/posix_types.h:4,
                 from include/uapi/linux/types.h:13,
                 from include/linux/types.h:5,
                 from include/linux/list.h:4,
                 from include/linux/module.h:9,
                 from /root/prg/01-rtdm_interrupt/intr.c:1:
include/linux/compiler-gcc.h:118:0: note: this is the location of the
previous definition
In file included from /usr/include/bits/fcntl.h:25:0,
                 from /usr/include/fcntl.h:34,
                 from /usr/xenomai/include/rtdm/rtdm.h:23,
                 from /root/prg/01-rtdm_interrupt/intr.c:3:
/usr/include/sys/types.h:61:17: error: conflicting types for ‘dev_t’
In file included from include/linux/list.h:4:0,
                 from include/linux/module.h:9,
                 from /root/prg/01-rtdm_interrupt/intr.c:1:
include/linux/types.h:15:25: note: previous declaration of ‘dev_t’ was here
In file included from /usr/include/bits/fcntl.h:25:0,
                 from /usr/include/fcntl.h:34,
                 from /usr/xenomai/include/rtdm/rtdm.h:23,
                 from /root/prg/01-rtdm_interrupt/intr.c:3:
/usr/include/sys/types.h:71:18: error: conflicting types for ‘mode_t’
In file included from include/linux/list.h:4:0,
                 from include/linux/module.h:9,
                 from /root/prg/01-rtdm_interrupt/intr.c:1:
include/linux/types.h:17:26: note: previous declaration of ‘mode_t’ was here
In file included from /usr/include/sys/types.h:133:0,
                 from /usr/include/bits/fcntl.h:25,
                 from /usr/include/fcntl.h:34,
                 from /usr/xenomai/include/rtdm/rtdm.h:23,
                 from /root/prg/01-rtdm_interrupt/intr.c:3:
/usr/include/time.h:104:19: error: conflicting types for ‘timer_t’
In file included from include/linux/list.h:4:0,
                 from include/linux/module.h:9,
                 from /root/prg/01-rtdm_interrupt/intr.c:1:
include/linux/types.h:25:26: note: previous declaration of ‘timer_t’ was
here
In file included from /usr/include/bits/fcntl.h:25:0,
                 from /usr/include/fcntl.h:34,
                 from /usr/xenomai/include/rtdm/rtdm.h:23,
                 from /root/prg/01-rtdm_interrupt/intr.c:3:
/usr/include/sys/types.h:212:0: warning: "__BIT_TYPES_DEFINED__" redefined
[enabled by default]
In file included from include/linux/list.h:4:0,
                 from include/linux/module.h:9,
                 from /root/prg/01-rtdm_interrupt/intr.c:1:
include/linux/types.h:95:0: note: this is the location of the previous
definition
In file included from /usr/include/sys/select.h:44:0,
                 from /usr/include/sys/types.h:220,
                 from /usr/include/bits/fcntl.h:25,
                 from /usr/include/fcntl.h:34,
                 from /usr/xenomai/include/rtdm/rtdm.h:23,
                 from /root/prg/01-rtdm_interrupt/intr.c:3:
/usr/include/time.h:120:8: error: redefinition of ‘struct timespec’
In file included from ./arch/x86/include/asm/preempt.h:6:0,
                 from include/linux/preempt.h:18,
                 from include/linux/spinlock.h:50,
                 from include/linux/seqlock.h:35,
                 from include/linux/time.h:5,
                 from include/linux/stat.h:18,
                 from include/linux/module.h:10,
                 from /root/prg/01-rtdm_interrupt/intr.c:1:
include/linux/thread_info.h:13:8: note: originally defined here
In file included from /usr/include/sys/select.h:46:0,
                 from /usr/include/sys/types.h:220,
                 from /usr/include/bits/fcntl.h:25,
                 from /usr/include/fcntl.h:34,
                 from /usr/xenomai/include/rtdm/rtdm.h:23,
                 from /root/prg/01-rtdm_interrupt/intr.c:3:
/usr/include/bits/time.h:75:8: error: redefinition of ‘struct timeval’
In file included from include/linux/time64.h:4:0,
                 from include/linux/time.h:7,
                 from include/linux/stat.h:18,
                 from include/linux/module.h:10,
                 from /root/prg/01-rtdm_interrupt/intr.c:1:
include/uapi/linux/time.h:15:8: note: originally defined here
In file included from /usr/include/sys/types.h:220:0,
                 from /usr/include/bits/fcntl.h:25,
                 from /usr/include/fcntl.h:34,
                 from /usr/xenomai/include/rtdm/rtdm.h:23,
                 from /root/prg/01-rtdm_interrupt/intr.c:3:
/usr/include/sys/select.h:78:5: error: conflicting types for ‘fd_set’
In file included from include/linux/list.h:4:0,
                 from include/linux/module.h:9,
                 from /root/prg/01-rtdm_interrupt/intr.c:1:
include/linux/types.h:14:26: note: previous declaration of ‘fd_set’ was here
In file included from /usr/include/bits/fcntl.h:25:0,
                 from /usr/include/fcntl.h:34,
                 from /usr/xenomai/include/rtdm/rtdm.h:23,
                 from /root/prg/01-rtdm_interrupt/intr.c:3:
/usr/include/sys/types.h:236:20: error: conflicting types for ‘blkcnt_t’
In file included from include/linux/list.h:4:0,
                 from include/linux/module.h:9,
                 from /root/prg/01-rtdm_interrupt/intr.c:1:
include/linux/types.h:131:13: note: previous declaration of ‘blkcnt_t’ was
here
In file included from /usr/include/fcntl.h:41:0,
                 from /usr/xenomai/include/rtdm/rtdm.h:23,
                 from /root/prg/01-rtdm_interrupt/intr.c:3:
/usr/include/bits/stat.h:46:8: error: redefinition of ‘struct stat’
In file included from include/linux/stat.h:5:0,
                 from include/linux/module.h:10,
                 from /root/prg/01-rtdm_interrupt/intr.c:1:
./arch/x86/include/uapi/asm/stat.h:9:8: note: originally defined here
In file included from /usr/xenomai/include/rtdm/rtdm.h:23:0,
                 from /root/prg/01-rtdm_interrupt/intr.c:3:
/usr/include/fcntl.h:43:0: warning: "S_IFMT" redefined [enabled by default]
In file included from include/linux/stat.h:6:0,
                 from include/linux/module.h:10,
                 from /root/prg/01-rtdm_interrupt/intr.c:1:
include/uapi/linux/stat.h:7:0: note: this is the location of the previous
definition
In file included from /usr/xenomai/include/rtdm/rtdm.h:23:0,
                 from /root/prg/01-rtdm_interrupt/intr.c:3:
/usr/include/fcntl.h:44:0: warning: "S_IFDIR" redefined [enabled by default]
In file included from include/linux/stat.h:6:0,
                 from include/linux/module.h:10,
                 from /root/prg/01-rtdm_interrupt/intr.c:1:
include/uapi/linux/stat.h:12:0: note: this is the location of the previous
definition
In file included from /usr/xenomai/include/rtdm/rtdm.h:23:0,
                 from /root/prg/01-rtdm_interrupt/intr.c:3:
/usr/include/fcntl.h:45:0: warning: "S_IFCHR" redefined [enabled by default]
In file included from include/linux/stat.h:6:0,
                 from include/linux/module.h:10,
                 from /root/prg/01-rtdm_interrupt/intr.c:1:
include/uapi/linux/stat.h:13:0: note: this is the location of the previous
definition
In file included from /usr/xenomai/include/rtdm/rtdm.h:23:0,
                 from /root/prg/01-rtdm_interrupt/intr.c:3:
/usr/include/fcntl.h:46:0: warning: "S_IFBLK" redefined [enabled by default]
In file included from include/linux/stat.h:6:0,
                 from include/linux/module.h:10,
                 from /root/prg/01-rtdm_interrupt/intr.c:1:
include/uapi/linux/stat.h:11:0: note: this is the location of the previous
definition
In file included from /usr/xenomai/include/rtdm/rtdm.h:23:0,
                 from /root/prg/01-rtdm_interrupt/intr.c:3:
/usr/include/fcntl.h:47:0: warning: "S_IFREG" redefined [enabled by default]
In file included from include/linux/stat.h:6:0,
                 from include/linux/module.h:10,
                 from /root/prg/01-rtdm_interrupt/intr.c:1:
include/uapi/linux/stat.h:10:0: note: this is the location of the previous
definition
In file included from /usr/xenomai/include/rtdm/rtdm.h:23:0,
                 from /root/prg/01-rtdm_interrupt/intr.c:3:
/usr/include/fcntl.h:49:0: warning: "S_IFIFO" redefined [enabled by default]
In file included from include/linux/stat.h:6:0,
                 from include/linux/module.h:10,
                 from /root/prg/01-rtdm_interrupt/intr.c:1:
include/uapi/linux/stat.h:14:0: note: this is the location of the previous
definition
In file included from /usr/xenomai/include/rtdm/rtdm.h:23:0,
                 from /root/prg/01-rtdm_interrupt/intr.c:3:
/usr/include/fcntl.h:52:0: warning: "S_IFLNK" redefined [enabled by default]
In file included from include/linux/stat.h:6:0,
                 from include/linux/module.h:10,
                 from /root/prg/01-rtdm_interrupt/intr.c:1:
include/uapi/linux/stat.h:9:0: note: this is the location of the previous
definition
In file included from /usr/xenomai/include/rtdm/rtdm.h:23:0,
                 from /root/prg/01-rtdm_interrupt/intr.c:3:
/usr/include/fcntl.h:55:0: warning: "S_IFSOCK" redefined [enabled by
default]
In file included from include/linux/stat.h:6:0,
                 from include/linux/module.h:10,
                 from /root/prg/01-rtdm_interrupt/intr.c:1:
include/uapi/linux/stat.h:8:0: note: this is the location of the previous
definition
In file included from /usr/xenomai/include/rtdm/rtdm.h:23:0,
                 from /root/prg/01-rtdm_interrupt/intr.c:3:
/usr/include/fcntl.h:60:0: warning: "S_ISUID" redefined [enabled by default]
In file included from include/linux/stat.h:6:0,
                 from include/linux/module.h:10,
                 from /root/prg/01-rtdm_interrupt/intr.c:1:
include/uapi/linux/stat.h:15:0: note: this is the location of the previous
definition
In file included from /usr/xenomai/include/rtdm/rtdm.h:23:0,
                 from /root/prg/01-rtdm_interrupt/intr.c:3:
/usr/include/fcntl.h:61:0: warning: "S_ISGID" redefined [enabled by default]
In file included from include/linux/stat.h:6:0,
                 from include/linux/module.h:10,
                 from /root/prg/01-rtdm_interrupt/intr.c:1:
include/uapi/linux/stat.h:16:0: note: this is the location of the previous
definition
In file included from /usr/xenomai/include/rtdm/rtdm.h:23:0,
                 from /root/prg/01-rtdm_interrupt/intr.c:3:
/usr/include/fcntl.h:65:0: warning: "S_ISVTX" redefined [enabled by default]
In file included from include/linux/stat.h:6:0,
                 from include/linux/module.h:10,
                 from /root/prg/01-rtdm_interrupt/intr.c:1:
include/uapi/linux/stat.h:17:0: note: this is the location of the previous
definition
In file included from /usr/xenomai/include/rtdm/rtdm.h:23:0,
                 from /root/prg/01-rtdm_interrupt/intr.c:3:
/usr/include/fcntl.h:68:0: warning: "S_IRUSR" redefined [enabled by default]
In file included from include/linux/stat.h:6:0,
                 from include/linux/module.h:10,
                 from /root/prg/01-rtdm_interrupt/intr.c:1:
include/uapi/linux/stat.h:28:0: note: this is the location of the previous
definition
In file included from /usr/xenomai/include/rtdm/rtdm.h:23:0,
                 from /root/prg/01-rtdm_interrupt/intr.c:3:
/usr/include/fcntl.h:69:0: warning: "S_IWUSR" redefined [enabled by default]
In file included from include/linux/stat.h:6:0,
                 from include/linux/module.h:10,
                 from /root/prg/01-rtdm_interrupt/intr.c:1:
include/uapi/linux/stat.h:29:0: note: this is the location of the previous
definition
In file included from /usr/xenomai/include/rtdm/rtdm.h:23:0,
                 from /root/prg/01-rtdm_interrupt/intr.c:3:
/usr/include/fcntl.h:70:0: warning: "S_IXUSR" redefined [enabled by default]
In file included from include/linux/stat.h:6:0,
                 from include/linux/module.h:10,
                 from /root/prg/01-rtdm_interrupt/intr.c:1:
include/uapi/linux/stat.h:30:0: note: this is the location of the previous
definition
In file included from /usr/xenomai/include/rtdm/rtdm.h:23:0,
                 from /root/prg/01-rtdm_interrupt/intr.c:3:
/usr/include/fcntl.h:72:0: warning: "S_IRWXU" redefined [enabled by default]
In file included from include/linux/stat.h:6:0,
                 from include/linux/module.h:10,
                 from /root/prg/01-rtdm_interrupt/intr.c:1:
include/uapi/linux/stat.h:27:0: note: this is the location of the previous
definition
In file included from /usr/xenomai/include/rtdm/rtdm.h:23:0,
                 from /root/prg/01-rtdm_interrupt/intr.c:3:
/usr/include/fcntl.h:74:0: warning: "S_IRGRP" redefined [enabled by default]
In file included from include/linux/stat.h:6:0,
                 from include/linux/module.h:10,
                 from /root/prg/01-rtdm_interrupt/intr.c:1:
include/uapi/linux/stat.h:33:0: note: this is the location of the previous
definition
In file included from /usr/xenomai/include/rtdm/rtdm.h:23:0,
                 from /root/prg/01-rtdm_interrupt/intr.c:3:
/usr/include/fcntl.h:75:0: warning: "S_IWGRP" redefined [enabled by default]
In file included from include/linux/stat.h:6:0,
                 from include/linux/module.h:10,
                 from /root/prg/01-rtdm_interrupt/intr.c:1:
include/uapi/linux/stat.h:34:0: note: this is the location of the previous
definition
In file included from /usr/xenomai/include/rtdm/rtdm.h:23:0,
                 from /root/prg/01-rtdm_interrupt/intr.c:3:
/usr/include/fcntl.h:76:0: warning: "S_IXGRP" redefined [enabled by default]
In file included from include/linux/stat.h:6:0,
                 from include/linux/module.h:10,
                 from /root/prg/01-rtdm_interrupt/intr.c:1:
include/uapi/linux/stat.h:35:0: note: this is the location of the previous
definition
In file included from /usr/xenomai/include/rtdm/rtdm.h:23:0,
                 from /root/prg/01-rtdm_interrupt/intr.c:3:
/usr/include/fcntl.h:78:0: warning: "S_IRWXG" redefined [enabled by default]
In file included from include/linux/stat.h:6:0,
                 from include/linux/module.h:10,
                 from /root/prg/01-rtdm_interrupt/intr.c:1:
include/uapi/linux/stat.h:32:0: note: this is the location of the previous
definition
In file included from /usr/xenomai/include/rtdm/rtdm.h:23:0,
                 from /root/prg/01-rtdm_interrupt/intr.c:3:
/usr/include/fcntl.h:80:0: warning: "S_IROTH" redefined [enabled by default]
In file included from include/linux/stat.h:6:0,
                 from include/linux/module.h:10,
                 from /root/prg/01-rtdm_interrupt/intr.c:1:
include/uapi/linux/stat.h:38:0: note: this is the location of the previous
definition
In file included from /usr/xenomai/include/rtdm/rtdm.h:23:0,
                 from /root/prg/01-rtdm_interrupt/intr.c:3:
/usr/include/fcntl.h:81:0: warning: "S_IWOTH" redefined [enabled by default]
In file included from include/linux/stat.h:6:0,
                 from include/linux/module.h:10,
                 from /root/prg/01-rtdm_interrupt/intr.c:1:
include/uapi/linux/stat.h:39:0: note: this is the location of the previous
definition
In file included from /usr/xenomai/include/rtdm/rtdm.h:23:0,
                 from /root/prg/01-rtdm_interrupt/intr.c:3:
/usr/include/fcntl.h:82:0: warning: "S_IXOTH" redefined [enabled by default]
In file included from include/linux/stat.h:6:0,
                 from include/linux/module.h:10,
                 from /root/prg/01-rtdm_interrupt/intr.c:1:
include/uapi/linux/stat.h:40:0: note: this is the location of the previous
definition
In file included from /usr/xenomai/include/rtdm/rtdm.h:23:0,
                 from /root/prg/01-rtdm_interrupt/intr.c:3:
/usr/include/fcntl.h:84:0: warning: "S_IRWXO" redefined [enabled by default]
In file included from include/linux/stat.h:6:0,
                 from include/linux/module.h:10,
                 from /root/prg/01-rtdm_interrupt/intr.c:1:
include/uapi/linux/stat.h:37:0: note: this is the location of the previous
definition
In file included from /usr/xenomai/include/rtdm/rtdm.h:25:0,
                 from /root/prg/01-rtdm_interrupt/intr.c:3:
/usr/include/stdint.h:129:23: error: conflicting types for ‘uintptr_t’
In file included from include/linux/list.h:4:0,
                 from include/linux/module.h:9,
                 from /root/prg/01-rtdm_interrupt/intr.c:1:
include/linux/types.h:36:24: note: previous declaration of ‘uintptr_t’ was
here
In file included from /usr/xenomai/include/rtdm/rtdm.h:25:0,
                 from /root/prg/01-rtdm_interrupt/intr.c:3:
/usr/include/stdint.h:268:0: warning: "SIZE_MAX" redefined [enabled by
default]
In file included from include/linux/list.h:8:0,
                 from include/linux/module.h:9,
                 from /root/prg/01-rtdm_interrupt/intr.c:1:
include/linux/kernel.h:30:0: note: this is the location of the previous
definition
In file included from /usr/include/sys/socket.h:40:0,
                 from /usr/xenomai/include/rtdm/rtdm.h:29,
                 from /root/prg/01-rtdm_interrupt/intr.c:3:
/usr/include/bits/socket.h:431:23: warning: ‘struct mmsghdr’ declared
inside parameter list [enabled by default]
/usr/include/bits/socket.h:431:23: warning: its scope is only this
definition or declaration, which is probably not what you want [enabled by
default]
In file included from /root/prg/01-rtdm_interrupt/intr.c:3:0:
/usr/xenomai/include/rtdm/rtdm.h:30:34: fatal error:
boilerplate/wrappers.h: No such file or directory
compilation terminated.
make[2]: *** [/root/prg/01-rtdm_interrupt/intr.o] Error 1
make[1]: *** [_module_/root/prg/01-rtdm_interrupt] Error 2
make[1]: Leaving directory `/usr/src/linux-headers-3.18.7-rt2'
make: *** [all] Error 2
root@debian:~/prg/01-rtdm_interrupt#

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2015-03-13 16:27 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-06  9:28 [Xenomai] Error boilerplate/wrappers.h no found trying to compile RTDM module on 3.x-rc3 cobalt Helder Daniel
2015-03-06  9:38 ` Philippe Gerum
     [not found]   ` <CAKk99t1AGHj8sOf7Vgy_UZ_+rECP5Vx22cyup--FHsh=RuK2zA@mail.gmail.com>
2015-03-06 10:14     ` Philippe Gerum
     [not found]       ` <CAKk99t3FfAff0X0nGzKD+YcVFQWm5aeSRFB4U6No1YSPuS_qpA@mail.gmail.com>
2015-03-09 18:57         ` [Xenomai] Fwd: " Helder Daniel
2015-03-10 21:39           ` Philippe Gerum
2015-03-11 17:30             ` Helder Daniel
2015-03-11 20:21               ` Philippe Gerum
2015-03-11 21:01                 ` Gilles Chanteperdrix
2015-03-13 13:50                   ` Helder Daniel
2015-03-13 14:04                     ` Gilles Chanteperdrix
2015-03-13 16:27                       ` Helder Daniel

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.