2008-12-02 07:34:43     Xenomai and fdpic

Document created by Aaronwu Employee on Aug 8, 2013
Version 1Show Document
  • View in full screen mode

2008-12-02 07:34:43     Xenomai and fdpic

Daniele Pagani (ITALY)

Message: 66161   

 

Dear Sirs,

 

I take the source code example from:

 

http://www.xenomai.org/documentation/branches/v2.4.x/html/api/index.html

 

File name user_task.c

 

Then, I try to compile it in two ways:

 

1) bfin-uclinux-gcc -I/mnt/uClinux-dist-2008R1.5-RC3/staging/usr/include/ -L/mnt/uClinux-dist-2008R1.5-RC3/staging/usr/lib/ user_task.c -o user_task -l pthread -lnative

 

--> it works fine

 

2) bfin-linux-uclibc-gcc -mfdpic -D_GNU_SOURCE -D_REENTRANT -D__XENO__ -I/mnt/uClinux-dist-2008R1.5-RC3/staging/usr/include/ -L/mnt/uClinux-dist-2008R1.5-RC3/staging/usr/lib/ user_task.c -o user_task -l pthread -lnative

 

--> it doesn't work fine (output in attachment).

 

Then, I write to the forum for Xenomai but they tell me that they do use the fdpic format for all libes on blackfin.

 

So, please, any suggestion?

 

Best regards,

 

Daniele.

 

 

 

make.out

TranslateQuoteReplyEditDelete

 

 

2008-12-02 07:36:30     Re: Xenomai and fdpic

Daniele Pagani (ITALY)

Message: 66162   

 

make.out

 

/opt/uClinux/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/../../../../bfin-linux-uclibc/bin/ld: Warning: size of symbol `_pthread_atfork' changed from 18 in /tmp/cc3bhz9g.o to 14 in /mnt/uClinux-dist-2008R1.5-RC3/staging/usr/lib//libnative.a(libnative_la-task.o)

/opt/uClinux/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/../../../../bfin-linux-uclibc/bin/ld: Warning: size of symbol `_shm_unlink' changed from 24 in /tmp/cc3bhz9g.o to 22 in /mnt/uClinux-dist-2008R1.5-RC3/staging/usr/lib//libnative.a(libnative_la-task.o)

/opt/uClinux/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/../../../../bfin-linux-uclibc/bin/ld: Warning: size of symbol `_shm_open' changed from 28 in /tmp/cc3bhz9g.o to 22 in /mnt/uClinux-dist-2008R1.5-RC3/staging/usr/lib//libnative.a(libnative_la-task.o)

/opt/uClinux/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/../../../../bfin-linux-uclibc/bin/ld: libnative_la-task.o: cannot link non-fdpic object file into fdpic executable

/opt/uClinux/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/../../../../bfin-linux-uclibc/bin/ld: failed to merge target specific data of file /mnt/uClinux-dist-2008R1.5-RC3/staging/usr/lib//libnative.a(libnative_la-task.o)

/opt/uClinux/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/../../../../bfin-linux-uclibc/bin/ld: libnative_la-init.o: cannot link non-fdpic object file into fdpic executable

/opt/uClinux/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/../../../../bfin-linux-uclibc/bin/ld: failed to merge target specific data of file /mnt/uClinux-dist-2008R1.5-RC3/staging/usr/lib//libnative.a(libnative_la-init.o)

/opt/uClinux/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/../../../../bfin-linux-uclibc/bin/ld: libnative_la-timer.o: cannot link non-fdpic object file into fdpic executable

/opt/uClinux/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/../../../../bfin-linux-uclibc/bin/ld: failed to merge target specific data of file /mnt/uClinux-dist-2008R1.5-RC3/staging/usr/lib//libnative.a(libnative_la-timer.o)

/mnt/uClinux-dist-2008R1.5-RC3/staging/usr/lib//libnative.a(libnative_la-task.o): In function `rt_task_sigharden':

../../../../xenomai-2.4.0/src/skins/native/task.c:48: warning: warning: relocation references a different segment

../../../../xenomai-2.4.0/src/skins/native/task.c:48: warning: warning: relocation references a different segment

/mnt/uClinux-dist-2008R1.5-RC3/staging/usr/lib//libnative.a(libnative_la-task.o): In function `rt_task_start':

../../../../xenomai-2.4.0/src/skins/native/task.c:150: warning: warning: relocation references a different segment

../../../../xenomai-2.4.0/src/skins/native/task.c:150: warning: warning: relocation references a different segment

/mnt/uClinux-dist-2008R1.5-RC3/staging/usr/lib//libnative.a(libnative_la-task.o): In function `rt_task_bind':

../../../../xenomai-2.4.0/src/skins/native/task.c:175: warning: warning: relocation references a different segment

../../../../xenomai-2.4.0/src/skins/native/task.c:175: warning: warning: relocation references a different segment

/mnt/uClinux-dist-2008R1.5-RC3/staging/usr/lib//libnative.a(libnative_la-task.o): In function `rt_task_suspend':

../../../../xenomai-2.4.0/src/skins/native/task.c:181: warning: warning: relocation references a different segment

../../../../xenomai-2.4.0/src/skins/native/task.c:181: warning: warning: relocation references a different segment

/mnt/uClinux-dist-2008R1.5-RC3/staging/usr/lib//libnative.a(libnative_la-task.o): In function `rt_task_resume':

../../../../xenomai-2.4.0/src/skins/native/task.c:186: warning: warning: relocation references a different segment

../../../../xenomai-2.4.0/src/skins/native/task.c:186: warning: warning: relocation references a different segment

/mnt/uClinux-dist-2008R1.5-RC3/staging/usr/lib//libnative.a(libnative_la-task.o): In function `rt_task_yield':

../../../../xenomai-2.4.0/src/skins/native/task.c:208: warning: warning: relocation references a different segment

../../../../xenomai-2.4.0/src/skins/native/task.c:208: warning: warning: relocation references a different segment

/mnt/uClinux-dist-2008R1.5-RC3/staging/usr/lib//libnative.a(libnative_la-task.o): In function `rt_task_set_periodic':

../../../../xenomai-2.4.0/src/skins/native/task.c:213: warning: warning: relocation references a different segment

../../../../xenomai-2.4.0/src/skins/native/task.c:213: warning: warning: relocation references a different segment

/mnt/uClinux-dist-2008R1.5-RC3/staging/usr/lib//libnative.a(libnative_la-task.o): In function `rt_task_wait_period':

../../../../xenomai-2.4.0/src/skins/native/task.c:220: warning: warning: relocation references a different segment

../../../../xenomai-2.4.0/src/skins/native/task.c:220: warning: warning: relocation references a different segment

/mnt/uClinux-dist-2008R1.5-RC3/staging/usr/lib//libnative.a(libnative_la-task.o): In function `rt_task_set_priority':

../../../../xenomai-2.4.0/src/skins/native/task.c:226: warning: warning: relocation references a different segment

../../../../xenomai-2.4.0/src/skins/native/task.c:226: warning: warning: relocation references a different segment

/mnt/uClinux-dist-2008R1.5-RC3/staging/usr/lib//libnative.a(libnative_la-task.o): In function `rt_task_sleep':

../../../../xenomai-2.4.0/src/skins/native/task.c:232: warning: warning: relocation references a different segment

../../../../xenomai-2.4.0/src/skins/native/task.c:232: warning: warning: relocation references a different segment

/mnt/uClinux-dist-2008R1.5-RC3/staging/usr/lib//libnative.a(libnative_la-task.o): In function `rt_task_sleep_until':

../../../../xenomai-2.4.0/src/skins/native/task.c:238: warning: warning: relocation references a different segment

../../../../xenomai-2.4.0/src/skins/native/task.c:238: warning: warning: relocation references a different segment

/mnt/uClinux-dist-2008R1.5-RC3/staging/usr/lib//libnative.a(libnative_la-task.o): In function `rt_task_unblock':

../../../../xenomai-2.4.0/src/skins/native/task.c:245: warning: warning: relocation references a different segment

../../../../xenomai-2.4.0/src/skins/native/task.c:245: warning: warning: relocation references a different segment

/mnt/uClinux-dist-2008R1.5-RC3/staging/usr/lib//libnative.a(libnative_la-task.o): In function `rt_task_inquire':

../../../../xenomai-2.4.0/src/skins/native/task.c:250: warning: warning: relocation references a different segment

../../../../xenomai-2.4.0/src/skins/native/task.c:250: warning: warning: relocation references a different segment

/mnt/uClinux-dist-2008R1.5-RC3/staging/usr/lib//libnative.a(libnative_la-task.o): In function `rt_task_notify':

../../../../xenomai-2.4.0/src/skins/native/task.c:256: warning: warning: relocation references a different segment

../../../../xenomai-2.4.0/src/skins/native/task.c:256: warning: warning: relocation references a different segment

/mnt/uClinux-dist-2008R1.5-RC3/staging/usr/lib//libnative.a(libnative_la-task.o): In function `rt_task_set_mode':

../../../../xenomai-2.4.0/src/skins/native/task.c:265: warning: warning: relocation references a different segment

../../../../xenomai-2.4.0/src/skins/native/task.c:265: warning: warning: relocation references a different segment

../../../../xenomai-2.4.0/src/skins/native/task.c:274: warning: warning: relocation references a different segment

../../../../xenomai-2.4.0/src/skins/native/task.c:274: warning: warning: relocation references a different segment

/mnt/uClinux-dist-2008R1.5-RC3/staging/usr/lib//libnative.a(libnative_la-task.o): In function `rt_task_slice':

../../../../xenomai-2.4.0/src/skins/native/task.c:302: warning: warning: relocation references a different segment

../../../../xenomai-2.4.0/src/skins/native/task.c:302: warning: warning: relocation references a different segment

/mnt/uClinux-dist-2008R1.5-RC3/staging/usr/lib//libnative.a(libnative_la-task.o): In function `rt_task_send':

../../../../xenomai-2.4.0/src/skins/native/task.c:317: warning: warning: relocation references a different segment

../../../../xenomai-2.4.0/src/skins/native/task.c:317: warning: warning: relocation references a different segment

/mnt/uClinux-dist-2008R1.5-RC3/staging/usr/lib//libnative.a(libnative_la-task.o): In function `rt_task_receive':

../../../../xenomai-2.4.0/src/skins/native/task.c:324: warning: warning: relocation references a different segment

../../../../xenomai-2.4.0/src/skins/native/task.c:324: warning: warning: relocation references a different segment

/mnt/uClinux-dist-2008R1.5-RC3/staging/usr/lib//libnative.a(libnative_la-task.o): In function `rt_task_reply':

../../../../xenomai-2.4.0/src/skins/native/task.c:330: warning: warning: relocation references a different segment

../../../../xenomai-2.4.0/src/skins/native/task.c:330: warning: warning: relocation references a different segment

/mnt/uClinux-dist-2008R1.5-RC3/staging/usr/lib//libnative.a(libnative_la-task.o): In function `rt_task_join':

../../../../xenomai-2.4.0/src/skins/native/task.c:311: warning: warning: relocation references a different segment

/mnt/uClinux-dist-2008R1.5-RC3/staging/usr/lib//libnative.a(libnative_la-task.o): In function `rt_task_self':

../../../../xenomai-2.4.0/src/skins/native/task.c:284: warning: warning: relocation references a different segment

../../../../xenomai-2.4.0/src/skins/native/task.c:284: warning: warning: relocation references a different segment

../../../../xenomai-2.4.0/src/skins/native/task.c:284: warning: warning: relocation references a different segment

../../../../xenomai-2.4.0/src/skins/native/task.c:289: warning: warning: relocation references a different segment

../../../../xenomai-2.4.0/src/skins/native/task.c:292: warning: warning: relocation references a different segment

../../../../xenomai-2.4.0/src/skins/native/task.c:292: warning: warning: relocation references a different segment

../../../../xenomai-2.4.0/src/skins/native/task.c:295: warning: warning: relocation references a different segment

/mnt/uClinux-dist-2008R1.5-RC3/staging/usr/lib//libnative.a(libnative_la-task.o): In function `rt_task_delete':

../../../../xenomai-2.4.0/src/skins/native/task.c:199: warning: warning: relocation references a different segment

../../../../xenomai-2.4.0/src/skins/native/task.c:199: warning: warning: relocation references a different segment

../../../../xenomai-2.4.0/src/skins/native/task.c:194: warning: warning: relocation references a different segment

/mnt/uClinux-dist-2008R1.5-RC3/staging/usr/lib//libnative.a(libnative_la-task.o): In function `rt_task_shadow':

../../../../xenomai-2.4.0/src/skins/native/task.c:159: warning: warning: relocation references a different segment

../../../../xenomai-2.4.0/src/skins/native/task.c:161: warning: warning: relocation references a different segment

../../../../xenomai-2.4.0/src/skins/native/task.c:161: warning: warning: relocation references a different segment

../../../../xenomai-2.4.0/src/skins/native/task.c:161: warning: warning: relocation references a different segment

../../../../xenomai-2.4.0/src/skins/native/task.c:167: warning: warning: relocation references a different segment

../../../../xenomai-2.4.0/src/skins/native/task.c:169: warning: warning: relocation references a different segment

../../../../xenomai-2.4.0/src/skins/native/task.c:169: warning: warning: relocation references a different segment

/mnt/uClinux-dist-2008R1.5-RC3/staging/usr/lib//libnative.a(libnative_la-task.o): In function `rt_task_create':

../../../../xenomai-2.4.0/src/skins/native/task.c:128: warning: warning: relocation references a different segment

../../../../xenomai-2.4.0/src/skins/native/task.c:135: warning: warning: relocation references a different segment

../../../../xenomai-2.4.0/src/skins/native/task.c:139: warning: warning: relocation references a different segment

../../../../xenomai-2.4.0/src/skins/native/task.c:135: warning: warning: relocation references a different segment

../../../../xenomai-2.4.0/src/skins/native/task.c:137: warning: warning: relocation references a different segment

/mnt/uClinux-dist-2008R1.5-RC3/staging/usr/lib//libnative.a(libnative_la-task.o): In function `rt_task_trampoline':

../../../../xenomai-2.4.0/src/skins/native/task.c:66: warning: warning: relocation references a different segment

../../../../xenomai-2.4.0/src/skins/native/task.c:67: warning: warning: relocation references a different segment

../../../../xenomai-2.4.0/src/skins/native/task.c:67: warning: warning: relocation references a different segment

../../../../xenomai-2.4.0/src/skins/native/task.c:71: warning: warning: relocation references a different segment

../../../../xenomai-2.4.0/src/skins/native/task.c:73: warning: warning: relocation references a different segment

../../../../xenomai-2.4.0/src/skins/native/task.c:73: warning: warning: relocation references a different segment

../../../../xenomai-2.4.0/src/skins/native/task.c:73: warning: warning: relocation references a different segment

../../../../xenomai-2.4.0/src/skins/native/task.c:79: warning: warning: relocation references a different segment

../../../../xenomai-2.4.0/src/skins/native/task.c:81: warning: warning: relocation references a different segment

../../../../xenomai-2.4.0/src/skins/native/task.c:81: warning: warning: relocation references a different segment

../../../../xenomai-2.4.0/src/skins/native/task.c:100: warning: warning: relocation references a different segment

/mnt/uClinux-dist-2008R1.5-RC3/staging/usr/lib//libnative.a(libnative_la-init.o): In function `xeno_bind_skin':

../../../../xenomai-2.4.0/include/asm-generic/bits/bind.h:61: warning: warning: relocation references a different segment

/mnt/uClinux-dist-2008R1.5-RC3/staging/usr/lib//libnative.a(libnative_la-init.o): In function `__init_xeno_interface':

../../../../xenomai-2.4.0/src/skins/native/init.c:44: warning: warning: relocation references a different segment

../../../../xenomai-2.4.0/src/skins/native/init.c:44: warning: warning: relocation references a different segment

/mnt/uClinux-dist-2008R1.5-RC3/staging/usr/lib//libnative.a(libnative_la-init.o): In function `xeno_bind_skin':

../../../../xenomai-2.4.0/include/asm-generic/bits/bind.h:63: warning: warning: relocation references a different segment

/mnt/uClinux-dist-2008R1.5-RC3/staging/usr/lib//libnative.a(libnative_la-init.o): In function `__init_xeno_interface':

../../../../xenomai-2.4.0/src/skins/native/init.c:55: warning: warning: relocation references a different segment

../../../../xenomai-2.4.0/src/skins/native/init.c:55: warning: warning: relocation references a different segment

../../../../xenomai-2.4.0/src/skins/native/init.c:55: warning: warning: relocation references a different segment

/mnt/uClinux-dist-2008R1.5-RC3/staging/usr/lib//libnative.a(libnative_la-init.o): In function `xeno_bind_skin':

../../../../xenomai-2.4.0/include/asm-generic/bits/bind.h:41: warning: relocation references symbol not defined in the module

/opt/uClinux/bfin-linux-uclibc/lib/gcc/bfin-linux-uclibc/4.1.2/../../../../bfin-linux-uclibc/bin/ld: final link failed: Nonrepresentable section on output

collect2: ld returned 1 exit status

 

TranslateQuoteReplyEditDelete

 

 

2008-12-02 07:37:12     Re: Xenomai and fdpic

Mike Frysinger (UNITED STATES)

Message: 66163   

 

FDPIC is for Linux user space applications.  it makes no sense in any other context.

QuoteReplyEditDelete

 

 

2008-12-02 07:40:39     Re: Xenomai and fdpic

Mike Frysinger (UNITED STATES)

Message: 66164   

 

as noted in the documentation, you cannot mix object file formats.  that is what the output is telling you: you're attempting to link FDPIC code against a non-FDPIC library.  build everything with the same toolchain.

QuoteReplyEditDelete

 

 

2008-12-02 07:54:28     Re: Xenomai and fdpic

Daniele Pagani (ITALY)

Message: 66166   

 

Ok,

 

but I suppose that using "make menuconfig"...select Xenomai and so on I've a fdpic library.

 

So, if I understand, I need to recompile Xenomai library in fdpic format?

 

Daniele.

TranslateQuoteReplyEditDelete

 

 

2008-12-02 15:44:43     Re: Xenomai and fdpic

Mike Frysinger (UNITED STATES)

Message: 66183   

 

when you change file formats in the menuconfig system, you should run `make clean` in the dist to force everything to be rebuilt

Attachments

Outcomes