From: Johannes Holtz Subject: migrating to xenomai 3 Message-ID: <269aa40f-de14-b7a5-0486-98df418befbf@compador.de> Date: Tue, 7 Jan 2020 11:42:24 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8"; format="flowed" Content-Transfer-Encoding: 8bit Content-Language: en-US List-Id: Discussions about the Xenomai project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: xenomai@xenomai.org Hi, after a long and exhausting year I finally found time to experiment on migrating our application from Xenomai 2.6.4 to Xenomai 3. So I downloaded the latest stable release 3.0.10 and somehow found out I can't use the 4.19 ipipe kernel but the 4.14 so i also got that. patched, build, installed and tested the kernel an the binaries and now I was going to see what I have to do to build my application. I used to build my app with these flags: XENO_CONFIG    = /opt/xenomai/bin/xeno-config XENO_CFLAGS    = $(shell $(XENO_CONFIG) --skin=rtdm  --cflags 2>/dev/null) XENO_LDFLAGS    = $(shell $(XENO_CONFIG) --skin=rtdm --ldflags 2>/dev/null) -lnative If you ask why I use rtdm and native. I need -lnative else I get this: rt_x_threads.c:(.text+0x3e9): undefined reference to `rt_timer_read' rt_x_threads.c:(.text+0x3fd): undefined reference to `rt_task_join' rt_x_threads.c:(.text+0x40b): undefined reference to `rt_task_delete' rt_x_threads.c:(.text+0x429): undefined reference to `rt_timer_read' And I need -lrtdm else I get this: rt_x_ipc.c:(.text+0x4a): undefined reference to `rt_dev_socket' rt_x_ipc.c:(.text+0x9e): undefined reference to `rt_dev_ioctl' rt_x_ipc.c:(.text+0xde): undefined reference to `rt_dev_ioctl' rt_x_ipc.c:(.text+0x112): undefined reference to `rt_dev_ioctl' rt_x_ipc.c:(.text+0x16c): undefined reference to `rt_dev_ioctl' rt_x_ipc.c:(.text+0x17f): undefined reference to `rt_dev_close' rt_x_ipc.c:(.text+0x1ac): undefined reference to `rt_dev_close' rt_x_ipc.c:(.text+0x206): undefined reference to `rt_dev_close' rt_x_ipc.c:(.text+0x219): undefined reference to `rt_dev_close' I wanted to used the native interface so I can distinguish rt syscalls from standard posix calls. FFD to my migration. I build Xenomai in cobalt skin and not mercury. I added the --compat switch to xeno-config but -lnative and -lrtdm are both not found anymore. Meaning there is a ton of undefined references. What would be the best strategy to solve this? Do I have to migrate all my native calls to posix calls or is there maybe a wrapper? Cheers Johannes