Skip to contentSkip to conversation

Xeno2.5 - 2.5.1 API mismatch?

Xenomai-help Sinisa Denic 2 participants 4 messages May 20, 2010 4 messages not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

#2 lore raw
Quoted 23 lines · Gilles Chanteperdrix
Quoted 15 lines · Michael Opdenacker

Bien le bonjour! Un message arrivé à ton adresse Free Electrons....

:-)

Michael.

-------- Original Message --------
Subject: Re: Xeno2.5 - 2.5.1 API mismatch?
Date: Wed, 19 May 2010 15:47:59 +0200
From: Sinisa Denic <[email protected]>
Organization: Advanced Control Systems Belgrade
To: Gilles Chanteperdrix <[email protected]>

Quoted 6 lines

On Fri, 05 Feb 2010 17:28:53 +0100, Gilles Chanteperdrix <[email protected]> wrote:
Hi Gilles,
I had problems some time ago compiling some software against xeno 2.5.2, Now same thing with X2.5.3, when I put include <sys/mman.h>, I've run into next error messages:

Quoted 10 lines

Your makefile is probably not using xeno-config to obtain the compilation flags :-)
Xenomai 2.5.3 introduces a new library, libxenomai, with which you need to link the programs. The issue is probably unrelated to sys/mman.h In case it is, please send me a test program.

Please do not use my address at free-electrons.com, I am no longer working for this company (yes, I know, it was short)...

Ok, was in hurry and it was short way to hear from you, excuse me for that.
It's not such easy to sent you code because, it compiles against some "big'n'ugly" :-) :-( library of IEC communication protocol I thought that our arm compiler make error but, the same error with standard x86_64 gcc:

iec_main.c:1036: warning: implicit declaration of function ‘mlockall’ iec_main.c:1036: error: ‘MCL_CURRENT’ undeclared (first use in this function) iec_main.c:1036: error: (Each undeclared identifier is reported only once iec_main.c:1036: error: for each function it appears in.) iec_main.c:1036: error: ‘MCL_FUTURE’ undeclared (first use in this function)

When I put #include <sys/mmap.h>, I get over this errors but run into the next:

Makefile handles xeno-config properly, it could retrieve include and lib paths and there is -lxenomai, take a look on this result of make command:

make MMSLITE_DIR=/opt/libMMSLITE-eabi/ XENO_DIR=/usr/xenomai-2.5.3-eabi CROSS_COMPILE=/opt/toolchains/arm926t-uclibcgnueabi/usr/bin/arm-linux-

/opt/toolchains/arm926t-uclibcgnueabi/usr/bin/arm-linux-gcc -c  -g  -I/opt/libMMSLITE-eabi//inc -DDEBUG_SISCO -DTRUNK_REV=\"6403M\" -DCOMMIT_REV=\"1137:6318M\" -DMMS_LITE -DMOSI -DLEAN_T -I. -DMVL_UCA  -I/usr/xenomai-2.5.3-eabi/include -D_GNU_SOURCE -D_REENTRANT -Wall -pipe -D__XENO__ -lnative -L/usr/xenomai-2.5.3-eabi/lib -lxenomai -lpthread iec_main.c -o obj_iecgoose_ld/iec_main.o >> cc.lst 2>&1
/opt/toolchains/arm926t-uclibcgnueabi/usr/bin/arm-linux-gcc -c  -g  -I/opt/libMMSLITE-eabi//inc -DDEBUG_SISCO -DTRUNK_REV=\"6403M\" -DCOMMIT_REV=\"1137:6318M\" -DMMS_LITE -DMOSI -DLEAN_T -I. -DMVL_UCA  -I/usr/xenomai-2.5.3-eabi/include -D_GNU_SOURCE -D_REENTRANT -Wall -pipe -D__XENO__ -lnative -L/usr/xenomai-2.5.3-eabi/lib -lxenomai -lpthread /opt/libMMSLITE-eabi//src/mms_arb.c -o obj_iecgoose_ld/mms_arb.o >> cc.lst 2>&1
/opt/toolchains/arm926t-uclibcgnueabi/usr/bin/arm-linux-gcc -c  -g  -I/opt/libMMSLITE-eabi//inc -DDEBUG_SISCO -DTRUNK_REV=\"6403M\" -DCOMMIT_REV=\"1137:6318M\" -DMMS_LITE -DMOSI -DLEAN_T -I. -DMVL_UCA  -I/usr/xenomai-2.5.3-eabi/include -D_GNU_SOURCE -D_REENTRANT -Wall -pipe -D__XENO__ -lnative -L/usr/xenomai-2.5.3-eabi/lib -lxenomai -lpthread /opt/libMMSLITE-eabi//src/mmsop_en.c -o obj_iecgoose_ld/mmsop_en.o >> cc.lst 2>&1
/opt/toolchains/arm926t-uclibcgnueabi/usr/bin/arm-linux-gcc -c  -g  -I/opt/libMMSLITE-eabi//inc -DDEBUG_SISCO -DTRUNK_REV=\"6403M\" -DCOMMIT_REV=\"1137:6318M\" -DMMS_LITE -DMOSI -DLEAN_T -I. -DMVL_UCA  -I/usr/xenomai-2.5.3-eabi/include -D_GNU_SOURCE -D_REENTRANT -Wall -pipe -D__XENO__ -lnative -L/usr/xenomai-2.5.3-eabi/lib -lxenomai -lpthread /opt/libMMSLITE-eabi//mvl/src/mvlop_en.c -o obj_iecgoose_ld/mvlop_en.o >> cc.lst 2>&1
/opt/toolchains/arm926t-uclibcgnueabi/usr/bin/arm-linux-gcc -c  -g  -I/opt/libMMSLITE-eabi//inc -DDEBUG_SISCO -DTRUNK_REV=\"6403M\" -DCOMMIT_REV=\"1137:6318M\" -DMMS_LITE -DMOSI -DLEAN_T -I. -DMVL_UCA  -I/usr/xenomai-2.5.3-eabi/include -D_GNU_SOURCE -D_REENTRANT -Wall -pipe -D__XENO__ -lnative -L/usr/xenomai-2.5.3-eabi/lib -lxenomai -lpthread /opt/libMMSLITE-eabi//mvl/src/acse/mvl_acse.c -o obj_iecgoose_ld/mvl_acse.o >> cc.lst 2>&1
/opt/toolchains/arm926t-uclibcgnueabi/usr/bin/arm-linux-gcc -c  -g  -I/opt/libMMSLITE-eabi//inc -DDEBUG_SISCO -DTRUNK_REV=\"6403M\" -DCOMMIT_REV=\"1137:6318M\" -DMMS_LITE -DMOSI -DLEAN_T -I. -DMVL_UCA  -I/usr/xenomai-2.5.3-eabi/include -D_GNU_SOURCE -D_REENTRANT -Wall -pipe -D__XENO__ -lnative -L/usr/xenomai-2.5.3-eabi/lib -lxenomai -lpthread /opt/libMMSLITE-eabi//mvl/usr/event.c -o obj_iecgoose_ld/event.o >> cc.lst 2>&1
/opt/toolchains/arm926t-uclibcgnueabi/usr/bin/arm-linux-gcc -c  -g  -I/opt/libMMSLITE-eabi//inc -DDEBUG_SISCO -DTRUNK_REV=\"6403M\" -DCOMMIT_REV=\"1137:6318M\" -DMMS_LITE -DMOSI -DLEAN_T -I. -DMVL_UCA  -I/usr/xenomai-2.5.3-eabi/include -D_GNU_SOURCE -D_REENTRANT -Wall -pipe -D__XENO__ -lnative -L/usr/xenomai-2.5.3-eabi/lib -lxenomai -lpthread /opt/libMMSLITE-eabi//mvl/usr/logcfgx.c -o obj_iecgoose_ld/logcfgx.o >> cc.lst 2>&1
/opt/toolchains/arm926t-uclibcgnueabi/usr/bin/arm-linux-gcc -c  -g  -I/opt/libMMSLITE-eabi//inc -DDEBUG_SISCO -DTRUNK_REV=\"6403M\" -DCOMMIT_REV=\"1137:6318M\" -DMMS_LITE -DMOSI -DLEAN_T -I. -DMVL_UCA  -I/usr/xenomai-2.5.3-eabi/include -D_GNU_SOURCE -D_REENTRANT -Wall -pipe -D__XENO__ -lnative -L/usr/xenomai-2.5.3-eabi/lib -lxenomai -lpthread rdwrind.c -o obj_iecgoose_ld/rdwrind.o >> cc.lst 2>&1
/opt/toolchains/arm926t-uclibcgnueabi/usr/bin/arm-linux-gcc -c  -g  -I/opt/libMMSLITE-eabi//inc -DDEBUG_SISCO -DTRUNK_REV=\"6403M\" -DCOMMIT_REV=\"1137:6318M\" -DMMS_LITE -DMOSI -DLEAN_T -I. -DMVL_UCA  -I/usr/xenomai-2.5.3-eabi/include -D_GNU_SOURCE -D_REENTRANT -Wall -pipe -D__XENO__ -lnative -L/usr/xenomai-2.5.3-eabi/lib -lxenomai -lpthread /opt/libMMSLITE-eabi//mvl/usr/reject.c -o obj_iecgoose_ld/reject.o >> cc.lst 2>&1
/opt/toolchains/arm926t-uclibcgnueabi/usr/bin/arm-linux-gcc -c  -g  -I/opt/libMMSLITE-eabi//inc -DDEBUG_SISCO -DTRUNK_REV=\"6403M\" -DCOMMIT_REV=\"1137:6318M\" -DMMS_LITE -DMOSI -DLEAN_T -I. -DMVL_UCA  -I/usr/xenomai-2.5.3-eabi/include -D_GNU_SOURCE -D_REENTRANT -Wall -pipe -D__XENO__ -lnative -L/usr/xenomai-2.5.3-eabi/lib -lxenomai -lpthread startup.c -o obj_iecgoose_ld/startup.o >> cc.lst 2>&1
/opt/toolchains/arm926t-uclibcgnueabi/usr/bin/arm-linux-gcc -c  -g  -I/opt/libMMSLITE-eabi//inc -DDEBUG_SISCO -DTRUNK_REV=\"6403M\" -DCOMMIT_REV=\"1137:6318M\" -DMMS_LITE -DMOSI -DLEAN_T -I. -DMVL_UCA  -I/usr/xenomai-2.5.3-eabi/include -D_GNU_SOURCE -D_REENTRANT -Wall -pipe -D__XENO__ -lnative -L/usr/xenomai-2.5.3-eabi/lib -lxenomai -lpthread uca_obj.c -o obj_iecgoose_ld/uca_obj.o >> cc.lst 2>&1
/opt/toolchains/arm926t-uclibcgnueabi/usr/bin/arm-linux-gcc     -I/usr/xenomai-2.5.3-eabi/include -D_GNU_SOURCE -D_REENTRANT -Wall -pipe -D__XENO__ -lnative -L/usr/xenomai-2.5.3-eabi/lib -lxenomai -lpthread -o./iecgoose_ld obj_iecgoose_ld/iec_main.o obj_iecgoose_ld/mms_arb.o obj_iecgoose_ld/mmsop_en.o obj_iecgoose_ld/mvlop_en.o obj_iecgoose_ld/mvl_acse.o obj_iecgoose_ld/event.o obj_iecgoose_ld/logcfgx.o obj_iecgoose_ld/rdwrind.o obj_iecgoose_ld/reject.o obj_iecgoose_ld/startup.o obj_iecgoose_ld/uca_obj.o  /opt/libMMSLITE-eabi//lib/mvlu_ld.a /opt/libMMSLITE-eabi//lib/mlogl_ld.a /opt/libMMSLITE-eabi//lib/mmsle_ld.a /opt/libMMSLITE-eabi//lib/mmsl_ld.a /opt/libMMSLITE-eabi//lib/mem_ld.a /opt/libMMSLITE-eabi//lib/slog_ld.a /opt/libMMSLITE-eabi//lib/util_ld.a /opt/libMMSLITE-eabi//lib/ositp4e_ld.a /opt/libMMSLITE-eabi//lib/asn1l_ld.a  -lm -lpthread -lrt -lnative -static  
Quoted 1 line
Quoted 1 line

cc.lst 2>&1

make: *** [all] Error 1

I think that is everything all right about it but still getting this:

/usr/xenomai-2.5.3-eabi/lib/libnative.a(libnative_la-heap.o): In function `rt_heap_inquire':
heap.c:(.text+0x6c): undefined reference to __xnsig_dispatch' /usr/xenomai-2.5.3-eabi/lib/libnative.a(libnative_la-heap.o): In function rt_heap_free':
heap.c:(.text+0xfc): undefined reference to __xnsig_dispatch' /usr/xenomai-2.5.3-eabi/lib/libnative.a(libnative_la-heap.o): In function rt_heap_alloc':
heap.c:(.text+0x198): undefined reference to __xnsig_dispatch' /usr/xenomai-2.5.3-eabi/lib/libnative.a(libnative_la-heap.o): In function rt_heap_delete':
heap.c:(.text+0x220): undefined reference to __xnsig_dispatch' /usr/xenomai-2.5.3-eabi/lib/libnative.a(libnative_la-heap.o): In function rt_heap_bind':
heap.c:(.text+0x3b8): undefined reference to __xnsig_dispatch' /usr/xenomai-2.5.3-eabi/lib/libnative.a(libnative_la-heap.o):heap.c:(.text+0x47c): more undefined references to __xnsig_dispatch' follow /usr/xenomai-2.5.3-eabi/lib/libnative.a(libnative_la-init.o): In function `__init_xeno_interface':
init.c:(.text+0x18): undefined reference to `xeno_bind_skin_opt'
init.c:(.text+0x98): undefined reference to xeno_handle_mlock_alert' /usr/xenomai-2.5.3-eabi/lib/libnative.a(libnative_la-task.o): In function rt_task_reply':
task.c:(.text+0x84): undefined reference to __xnsig_dispatch' /usr/xenomai-2.5.3-eabi/lib/libnative.a(libnative_la-task.o): In function rt_task_receive':
task.c:(.text+0x110): undefined reference to __xnsig_dispatch' /usr/xenomai-2.5.3-eabi/lib/libnative.a(libnative_la-task.o): In function rt_task_send':
task.c:(.text+0x1a8): undefined reference to __xnsig_dispatch' /usr/xenomai-2.5.3-eabi/lib/libnative.a(libnative_la-task.o): In function rt_task_slice':
task.c:(.text+0x238): undefined reference to __xnsig_dispatch' /usr/xenomai-2.5.3-eabi/lib/libnative.a(libnative_la-task.o): In function rt_task_set_mode':
task.c:(.text+0x2cc): undefined reference to __xnsig_dispatch' /usr/xenomai-2.5.3-eabi/lib/libnative.a(libnative_la-task.o):task.c:(.text+0x35c): more undefined references to __xnsig_dispatch' follow /usr/xenomai-2.5.3-eabi/lib/libnative.a(libnative_la-task.o): In function `rt_task_trampoline':
task.c:(.text+0xbec): undefined reference to `xeno_sigshadow_install_once'
task.c:(.text+0xc34): undefined reference to `xeno_init_current_mode'
task.c:(.text+0xcb4): undefined reference to `__xnsig_dispatch'
task.c:(.text+0xd00): undefined reference to `xeno_set_current'
task.c:(.text+0xd64): undefined reference to `__xnsig_dispatch'
task.c:(.text+0xdd8): undefined reference to __xnsig_dispatch' /usr/xenomai-2.5.3-eabi/lib/libnative.a(libnative_la-task.o): In function rt_task_shadow':
task.c:(.text+0xe48): undefined reference to `xeno_fault_stack'
task.c:(.text+0xea8): undefined reference to `xeno_sigshadow_install_once'
task.c:(.text+0xec4): undefined reference to `xeno_init_current_mode'
task.c:(.text+0xf38): undefined reference to `__xnsig_dispatch'
task.c:(.text+0xf80): undefined reference to xeno_set_current' /usr/xenomai-2.5.3-eabi/lib/libnative.a(libnative_la-task.o): In function rt_task_create':
task.c:(.text+0xff8): undefined reference to `__xnsig_dispatch'
task.c:(.text+0x1158): undefined reference to `__xnsig_dispatch'
collect2: ld returned 1 exit status

Signature · 1 line
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
#3 lore raw
Quoted 42 lines · Sinisa Denic
Quoted 23 lines · Gilles Chanteperdrix
Quoted 15 lines · Michael Opdenacker

Bien le bonjour! Un message arrivé à ton adresse Free Electrons....

:-)

Michael.

-------- Original Message --------
Subject: Re: Xeno2.5 - 2.5.1 API mismatch?
Date: Wed, 19 May 2010 15:47:59 +0200
From: Sinisa Denic <[email protected]>
Organization: Advanced Control Systems Belgrade
To: Gilles Chanteperdrix <[email protected]>

Quoted 7 lines

On Fri, 05 Feb 2010 17:28:53 +0100, Gilles Chanteperdrix <[email protected]> wrote:
Hi Gilles,
I had problems some time ago compiling some software against xeno 2.5.2, Now same thing with X2.5.3, when I put include <sys/mman.h>, I've run into
next error messages:

Quoted 10 lines

Your makefile is probably not using xeno-config to obtain the compilation flags :-)
Xenomai 2.5.3 introduces a new library, libxenomai, with which you need to link the programs. The issue is probably unrelated to sys/mman.h In case it is, please send me a test program.

Please do not use my address at free-electrons.com, I am no longer working for this company (yes, I know, it was short)...

/opt/toolchains/arm926t-uclibcgnueabi/usr/bin/arm-linux-gcc

(quoted diff) +0 -3
-I/usr/xenomai-2.5.3-eabi/include -D_GNU_SOURCE -D_REENTRANT -Wall -pipe  
-D__XENO__ -lnative -L/usr/xenomai-2.5.3-eabi/lib -lxenomai -lpthread  
-o./iecgoose_ld obj_iecgoose_ld/iec_main.o obj_iecgoose_ld/mms_arb.o  

obj_iecgoose_ld/mmsop_en.o obj_iecgoose_ld/mvlop_en.o obj_iecgoose_ld/mvl_acse.o obj_iecgoose_ld/event.o

Quoted 8 lines

obj_iecgoose_ld/logcfgx.o obj_iecgoose_ld/rdwrind.o obj_iecgoose_ld/reject.o obj_iecgoose_ld/startup.o obj_iecgoose_ld/uca_obj.o /opt/libMMSLITE-eabi//lib/mvlu_ld.a /opt/libMMSLITE-eabi//lib/mlogl_ld.a /opt/libMMSLITE-eabi//lib/mmsle_ld.a /opt/libMMSLITE-eabi//lib/mmsl_ld.a /opt/libMMSLITE-eabi//lib/mem_ld.a /opt/libMMSLITE-eabi//lib/slog_ld.a /opt/libMMSLITE-eabi//lib/util_ld.a /opt/libMMSLITE-eabi//lib/ositp4e_ld.a /opt/libMMSLITE-eabi//lib/asn1l_ld.a -lm -lpthread -lrt -lnative -static

link order is wrong here: the list of -l should come after the list of .o, and if you do that, you will not need to repeat the list of -l.

Your problem is that -lnative is missing in the list of -l you repeat, but it is better to put the result of xeno-config --xeno-ldflags after the list of .o (if you are using built-in makefile rules, this means puttin this in the LOADLIBES variable instead of putting it in LDFLAGS), and remove the repetition.

Signature · 1 line
					    Gilles.

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

#6 lore raw
Quoted 51 lines · Gilles Chanteperdrix
Quoted 38 lines · Sinisa Denic
Quoted 20 lines
Quoted 9 lines

/opt/toolchains/arm926t-uclibcgnueabi/usr/bin/arm-linux-gcc

(quoted diff) +0 -4
-I/usr/xenomai-2.5.3-eabi/include -D_GNU_SOURCE -D_REENTRANT -Wall  
-pipe
-D__XENO__ -lnative -L/usr/xenomai-2.5.3-eabi/lib -lxenomai -lpthread
-o./iecgoose_ld obj_iecgoose_ld/iec_main.o obj_iecgoose_ld/mms_arb.o

obj_iecgoose_ld/mmsop_en.o obj_iecgoose_ld/mvlop_en.o obj_iecgoose_ld/mvl_acse.o obj_iecgoose_ld/event.o obj_iecgoose_ld/logcfgx.o obj_iecgoose_ld/rdwrind.o obj_iecgoose_ld/reject.o obj_iecgoose_ld/startup.o

Quoted 8 lines

obj_iecgoose_ld/uca_obj.o /opt/libMMSLITE-eabi//lib/mvlu_ld.a /opt/libMMSLITE-eabi//lib/mlogl_ld.a /opt/libMMSLITE-eabi//lib/mmsle_ld.a /opt/libMMSLITE-eabi//lib/mmsl_ld.a /opt/libMMSLITE-eabi//lib/mem_ld.a /opt/libMMSLITE-eabi//lib/slog_ld.a /opt/libMMSLITE-eabi//lib/util_ld.a /opt/libMMSLITE-eabi//lib/ositp4e_ld.a /opt/libMMSLITE-eabi//lib/asn1l_ld.a -lm -lpthread -lrt -lnative -static

link order is wrong here: the list of -l should come after the list of .o, and if you do that, you will not need to repeat the list of -l.

Quoted 6 lines

Your problem is that -lnative is missing in the list of -l you repeat, but it is better to put the result of xeno-config --xeno-ldflags after the list of .o (if you are using built-in makefile rules, this means puttin this in the LOADLIBES variable instead of putting it in LDFLAGS), and remove the repetition.

Oh thank you, sorry, this is my fault, this isn't my peace of code, just working around.
I saw it and it was suspicious to me, but It was supposed to look more closely,
Makefile came with library and it is modified to use Xenomai, because of that it seems such a messy..

Now it's compiling but, have you idea why these errors appear from xeno-2.5.1 version,
the same code compiling in xeno-2.4.x even xeno-2.5.0 without errors and no need to add <sys/mman.h> .

Quoted 7 lines

iec_main.c:1037: warning: implicit declaration of function ‘mlockall’ iec_main.c:1037: error: ‘MCL_CURRENT’ undeclared (first use in this function)
iec_main.c:1037: error: (Each undeclared identifier is reported only once iec_main.c:1037: error: for each function it appears in.) iec_main.c:1037: error: ‘MCL_FUTURE’ undeclared (first use in this function)

Before 2.5.2 there was no libxenomai library, so, the list of -l you
add: -lpthread -lrt -lnative is sufficient to workaround the fact that your link order was wrong. It explains the link error.

Quoted 7 lines

Before 2.5.2, what is now implemented in C files was implemented in header files, which got included all over the place, and these header files included sys/mman.h, but this caused all sort of troubles with some versions of uclibc toolchains, this explains the error about the missing include.

Gilles thank you very much,
does it mean that including mman.h is necessary.

Using Opera's revolutionary e-mail client: http://www.opera.com/mail/

#7 lore raw
Quoted 63 lines · Sinisa Denic
Quoted 53 lines · Gilles Chanteperdrix
Quoted 40 lines · Sinisa Denic
Quoted 21 lines
Quoted 10 lines

/opt/toolchains/arm926t-uclibcgnueabi/usr/bin/arm-linux-gcc

(quoted diff) +0 -4
-I/usr/xenomai-2.5.3-eabi/include -D_GNU_SOURCE -D_REENTRANT -Wall  
-pipe
-D__XENO__ -lnative -L/usr/xenomai-2.5.3-eabi/lib -lxenomai -lpthread
-o./iecgoose_ld obj_iecgoose_ld/iec_main.o obj_iecgoose_ld/mms_arb.o

obj_iecgoose_ld/mmsop_en.o obj_iecgoose_ld/mvlop_en.o obj_iecgoose_ld/mvl_acse.o obj_iecgoose_ld/event.o obj_iecgoose_ld/logcfgx.o obj_iecgoose_ld/rdwrind.o obj_iecgoose_ld/reject.o obj_iecgoose_ld/startup.o obj_iecgoose_ld/uca_obj.o /opt/libMMSLITE-eabi//lib/mvlu_ld.a

Quoted 8 lines

/opt/libMMSLITE-eabi//lib/mlogl_ld.a /opt/libMMSLITE-eabi//lib/mmsle_ld.a /opt/libMMSLITE-eabi//lib/mmsl_ld.a /opt/libMMSLITE-eabi//lib/mem_ld.a /opt/libMMSLITE-eabi//lib/slog_ld.a /opt/libMMSLITE-eabi//lib/util_ld.a /opt/libMMSLITE-eabi//lib/ositp4e_ld.a /opt/libMMSLITE-eabi//lib/asn1l_ld.a -lm -lpthread -lrt -lnative -static

link order is wrong here: the list of -l should come after the list of .o, and if you do that, you will not need to repeat the list of -l.

Quoted 7 lines

Your problem is that -lnative is missing in the list of -l you repeat, but it is better to put the result of xeno-config --xeno-ldflags after the list of .o (if you are using built-in makefile rules, this means puttin this in the LOADLIBES variable instead of putting it in LDFLAGS),
and remove the repetition.

Oh thank you, sorry, this is my fault, this isn't my peace of code, just working around.
I saw it and it was suspicious to me, but It was supposed to look more closely,
Makefile came with library and it is modified to use Xenomai, because of that it seems such a messy..

Now it's compiling but, have you idea why these errors appear from xeno-2.5.1 version,
the same code compiling in xeno-2.4.x even xeno-2.5.0 without errors and no need to add <sys/mman.h> .

Quoted 8 lines

iec_main.c:1037: warning: implicit declaration of function ‘mlockall’ iec_main.c:1037: error: ‘MCL_CURRENT’ undeclared (first use in this function)
iec_main.c:1037: error: (Each undeclared identifier is reported only once
iec_main.c:1037: error: for each function it appears in.) iec_main.c:1037: error: ‘MCL_FUTURE’ undeclared (first use in this function)

Before 2.5.2 there was no libxenomai library, so, the list of -l you
add: -lpthread -lrt -lnative is sufficient to workaround the fact that your link order was wrong. It explains the link error.

Quoted 7 lines

Before 2.5.2, what is now implemented in C files was implemented in header files, which got included all over the place, and these header files included sys/mman.h, but this caused all sort of troubles with some versions of uclibc toolchains, this explains the error about the missing include.

Quoted 2 lines

Gilles thank you very much,
does it mean that including mman.h is necessary.

Yes, and mlockall man page says so.

Signature · 1 line
					    Gilles.