All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: [Xenomai-help] Fwd: Re: Xeno2.5  -  2.5.1 API mismatch?
       [not found] ` <4BF45174.7040802@domain.hid>
@ 2010-05-20  7:48   ` Sinisa Denic
  2010-05-20  8:13     ` Gilles Chanteperdrix
  0 siblings, 1 reply; 4+ messages in thread
From: Sinisa Denic @ 2010-05-20  7:48 UTC (permalink / raw)
  To: Gilles Chanteperdrix; +Cc: xenomai

On Wed, 19 May 2010 23:00:36 +0200, Gilles Chanteperdrix  
<gilles.chanteperdrix@xenomai.org> wrote:

> Michael Opdenacker wrote:
>> 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 <sinisa.denic@domain.hid>
>> Organization: 	Advanced Control Systems Belgrade
>> To: 	Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
>>
>>
>>
>> On Fri, 05 Feb 2010 17:28:53 +0100, Gilles Chanteperdrix
>> <gilles.chanteperdrix@xenomai.org> 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:
>
> 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  
>> 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




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


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

* Re: [Xenomai-help] Fwd: Re: Xeno2.5  -  2.5.1 API mismatch?
  2010-05-20  7:48   ` [Xenomai-help] Fwd: Re: Xeno2.5 - 2.5.1 API mismatch? Sinisa Denic
@ 2010-05-20  8:13     ` Gilles Chanteperdrix
       [not found]       ` <op.vczxulyi38inye@domain.hid>
  0 siblings, 1 reply; 4+ messages in thread
From: Gilles Chanteperdrix @ 2010-05-20  8:13 UTC (permalink / raw)
  To: Sinisa Denic; +Cc: xenomai

Sinisa Denic wrote:
> On Wed, 19 May 2010 23:00:36 +0200, Gilles Chanteperdrix  
> <gilles.chanteperdrix@xenomai.org> wrote:
> 
>> Michael Opdenacker wrote:
>>> 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 <sinisa.denic@domain.hid>
>>> Organization: 	Advanced Control Systems Belgrade
>>> To: 	Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
>>>
>>>
>>>
>>> On Fri, 05 Feb 2010 17:28:53 +0100, Gilles Chanteperdrix
>>> <gilles.chanteperdrix@xenomai.org> 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:
>> 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      
> -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  

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.

-- 
					    Gilles.



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

* Re: [Xenomai-help] Fwd: Re: Xeno2.5  -  2.5.1 API mismatch?
       [not found]         ` <4BF4FB97.5000809@domain.hid>
@ 2010-05-20  9:52           ` Sinisa Denic
  2010-05-20  9:55             ` Gilles Chanteperdrix
  0 siblings, 1 reply; 4+ messages in thread
From: Sinisa Denic @ 2010-05-20  9:52 UTC (permalink / raw)
  To: Gilles Chanteperdrix; +Cc: xenomai@xenomai.org

On Thu, 20 May 2010 11:06:31 +0200, Gilles Chanteperdrix  
<gilles.chanteperdrix@xenomai.org> wrote:

> Sinisa Denic wrote:
>>>> /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
>>> 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.
>>>
>> 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> .
>>
>> 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.
>
> 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/


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

* Re: [Xenomai-help] Fwd: Re: Xeno2.5  -  2.5.1 API mismatch?
  2010-05-20  9:52           ` Sinisa Denic
@ 2010-05-20  9:55             ` Gilles Chanteperdrix
  0 siblings, 0 replies; 4+ messages in thread
From: Gilles Chanteperdrix @ 2010-05-20  9:55 UTC (permalink / raw)
  To: Sinisa Denic; +Cc: xenomai@xenomai.org

Sinisa Denic wrote:
> On Thu, 20 May 2010 11:06:31 +0200, Gilles Chanteperdrix  
> <gilles.chanteperdrix@xenomai.org> wrote:
> 
>> Sinisa Denic wrote:
>>>>> /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
>>>> 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.
>>>>
>>> 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> .
>>>
>>> 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.
>>
>> 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.

Yes, and mlockall man page says so.

-- 
					    Gilles.



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

end of thread, other threads:[~2010-05-20  9:55 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <4BF444C2.9090508@domain.hid>
     [not found] ` <4BF45174.7040802@domain.hid>
2010-05-20  7:48   ` [Xenomai-help] Fwd: Re: Xeno2.5 - 2.5.1 API mismatch? Sinisa Denic
2010-05-20  8:13     ` Gilles Chanteperdrix
     [not found]       ` <op.vczxulyi38inye@domain.hid>
     [not found]         ` <4BF4FB97.5000809@domain.hid>
2010-05-20  9:52           ` Sinisa Denic
2010-05-20  9:55             ` Gilles Chanteperdrix

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.