Skip to contentSkip to conversation

Problems generating vxworks/koan in two step: cc and link

Xenomai-core Niklaus Giger 3 participants 4 messages Jan 19, 2006 – Jan 21, 2006

lore
Share & tools
lore
#0 lore raw

Hi

I am trying to bring my build infrastructure up to Xenomai 2.1 and got the following problem:
I have no problems to generate koan using the following command:
cc -o koan2 /home/hcu/kernel/tst_xeno_ppc/koan.c -I. \
-I/usr/xenomai/include -O2 -D_GNU_SOURCE -D_REENTRANT -D__XENO__ -Wall \
-pipe -D__XENO_UVM__ -u__xeno_skin_init -L/usr/xenomai/lib -luvm -lnucleus \
-lpthread -lvxworks -lnative

No in order to be able to compile and link bigger applications my first try was to compile koan first and then to link. However running the following two commands

c -c -I. -I/usr/xenomai/include -O2 -D_GNU_SOURCE -D_REENTRANT -D__XENO__
-Wall -pipe -D__XENO_UVM__ -u__xeno_skin_init
-I. /home/hcu/project/bb/3_1_x/work/xeno/koan.c
-o /home/hcu/project/bb/3_1_x/work/xeno/koan.o
ld -o koan -L/usr/xenomai/lib -luvm -lnucleus -lpthread -lvxworks -lnative -e __xeno_skin_init /home/hcu/project/bb/3_1_x/work/xeno/koan.o Now I get the following error output
ld: warning: cannot find entry symbol __xeno_skin_init; defaulting to 00000000100002a0
/home/hcu/project/bb/3_1_x/work/xeno/koan.o: In function `TaskTest':koan.c:
(.text+0xbc): undefined reference to semTake' /home/hcu/project/bb/3_1_x/work/xeno/koan.o: In function CreateTask':koan.c:
(.text+0x124): undefined reference to taskSpawn' /home/hcu/project/bb/3_1_x/work/xeno/koan.o: In function usrClock':koan.c:
(.text+0x1c8): undefined reference to semGive' :koan.c:(.text+0x1f0): undefined reference to tickAnnounce' /home/hcu/project/bb/3_1_x/work/xeno/koan.o: In function koan_sysClkInit':koan.c:(.text+0x224): undefined reference to semBCreate' :koan.c:(.text+0x23c): undefined reference to sysClkConnect' :koan.c:(.text+0x240): undefined reference to sysClkEnable' /home/hcu/project/bb/3_1_x/work/xeno/koan.o: In function __xeno_user_exit':koan.c:(.text+0x2c0): undefined reference to taskDelete'

What is wrong with my split?

Signature · 1 line
Niklaus Giger
#1 lore raw
Quoted 19 lines · Niklaus Giger

ld -o koan -L/usr/xenomai/lib -luvm -lnucleus -lpthread -lvxworks -lnative -e __xeno_skin_init /home/hcu/project/bb/3_1_x/work/xeno/koan.o Now I get the following error output
ld: warning: cannot find entry symbol __xeno_skin_init; defaulting to 00000000100002a0
/home/hcu/project/bb/3_1_x/work/xeno/koan.o: In function `TaskTest':koan.c:
(.text+0xbc): undefined reference to semTake' /home/hcu/project/bb/3_1_x/work/xeno/koan.o: In function CreateTask':koan.c:
(.text+0x124): undefined reference to taskSpawn' /home/hcu/project/bb/3_1_x/work/xeno/koan.o: In function usrClock':koan.c:
(.text+0x1c8): undefined reference to semGive' :koan.c:(.text+0x1f0): undefined reference to tickAnnounce' /home/hcu/project/bb/3_1_x/work/xeno/koan.o: In function koan_sysClkInit':koan.c:(.text+0x224): undefined reference to semBCreate' :koan.c:(.text+0x23c): undefined reference to sysClkConnect' :koan.c:(.text+0x240): undefined reference to sysClkEnable' /home/hcu/project/bb/3_1_x/work/xeno/koan.o: In function __xeno_user_exit':koan.c:(.text+0x2c0): undefined reference to taskDelete'

Quoted 1 line

What is wrong with my split?

What happens if you try :

cc -u __xeno_skin_init -o koan -L/usr/xenomai/lib -luvm -lnucleus -lpthread -lvxworks -lnative /home/hcu/project/bb/3_1_x/work/xeno/koan.o

-u seems to be a link-time option.

Signature · 1 line
					    Gilles Chanteperdrix.
#2 lore raw

Am Donnerstag, 19. Januar 2006 23:15 schrieb Gilles Chanteperdrix:

Quoted 32 lines
Quoted 19 lines · Niklaus Giger

ld -o koan -L/usr/xenomai/lib -luvm -lnucleus -lpthread -lvxworks -lnative -e __xeno_skin_init /home/hcu/project/bb/3_1_x/work/xeno/koan.o Now I get the following error output
ld: warning: cannot find entry symbol __xeno_skin_init; defaulting to 00000000100002a0 /home/hcu/project/bb/3_1_x/work/xeno/koan.o: In function TaskTest':koan.c: (.text+0xbc): undefined reference to semTake' /home/hcu/project/bb/3_1_x/work/xeno/koan.o: In function CreateTask':koan.c: (.text+0x124): undefined reference to taskSpawn' /home/hcu/project/bb/3_1_x/work/xeno/koan.o: In function usrClock':koan.c: (.text+0x1c8): undefined reference to semGive'

:koan.c:(.text+0x1f0): undefined reference to `tickAnnounce'

/home/hcu/project/bb/3_1_x/work/xeno/koan.o: In function koan_sysClkInit':koan.c:(.text+0x224): undefined reference to semBCreate'

Quoted 8 lines

:koan.c:(.text+0x23c): undefined reference to sysClkConnect' :koan.c:(.text+0x240): undefined reference to sysClkEnable'

/home/hcu/project/bb/3_1_x/work/xeno/koan.o: In function __xeno_user_exit':koan.c:(.text+0x2c0): undefined reference to taskDelete'

What is wrong with my split?

What happens if you try :

cc -u __xeno_skin_init -o koan -L/usr/xenomai/lib -luvm -lnucleus -lpthread

Review

Quoted 3 lines
(quoted diff) +0 -2
-lvxworks -lnative /home/hcu/project/bb/3_1_x/work/xeno/koan.o
 
-u seems to be a link-time option.

Thanks for the tip. This fixes my problem.

Best regards

Signature · 1 line
Niklaus Giger
#3 lore raw

Re: [Xenomai-core] Problems generating vxworks/koan in two step: ccand link

----- Original Message ----- From: "Niklaus Giger" <[email protected]>
To: "Gilles Chanteperdrix" <[email protected]>
Cc: "xenomai-core" <[email protected]>
Sent: Friday, January 20, 2006 10:43 PM
Subject: Re: [Xenomai-core] Problems generating vxworks/koan in two step: ccand link

Quoted 30 lines

Am Donnerstag, 19. Januar 2006 23:15 schrieb Gilles Chanteperdrix:

Quoted 29 lines
Quoted 27 lines · Niklaus Giger

ld -o koan -L/usr/xenomai/lib -luvm -lnucleus -lpthread -lvxworks -lnative -e __xeno_skin_init /home/hcu/project/bb/3_1_x/work/xeno/koan.o Now I get the following error output
ld: warning: cannot find entry symbol __xeno_skin_init; defaulting to 00000000100002a0 /home/hcu/project/bb/3_1_x/work/xeno/koan.o: In function TaskTest':koan.c: (.text+0xbc): undefined reference to semTake' /home/hcu/project/bb/3_1_x/work/xeno/koan.o: In function CreateTask':koan.c: (.text+0x124): undefined reference to taskSpawn' /home/hcu/project/bb/3_1_x/work/xeno/koan.o: In function usrClock':koan.c: (.text+0x1c8): undefined reference to semGive'

:koan.c:(.text+0x1f0): undefined reference to `tickAnnounce'

/home/hcu/project/bb/3_1_x/work/xeno/koan.o: In function koan_sysClkInit':koan.c:(.text+0x224): undefined reference to semBCreate'

:koan.c:(.text+0x23c): undefined reference to sysClkConnect' :koan.c:(.text+0x240): undefined reference to sysClkEnable'

/home/hcu/project/bb/3_1_x/work/xeno/koan.o: In function __xeno_user_exit':koan.c:(.text+0x2c0): undefined reference to taskDelete'

What is wrong with my split?

Quoted 8 lines

Review

Quoted 6 lines

What happens if you try :

cc -u __xeno_skin_init -o koan -L/usr/xenomai/lib -luvm -lnucleus -lpthread

(quoted diff) +0 -2
-lvxworks -lnative /home/hcu/project/bb/3_1_x/work/xeno/koan.o
 
-u seems to be a link-time option.

Thanks for the tip. This fixes my problem.

Niklaus,
I never tried building vxworks/koan since fusion-0.9.1 becomed xenomai what about building other vxworks sample tests ?

Best regards

Marco Cavallini
Koan s.a.s. - Bergamo - ITALIA
Embedded and Real-Time Software Engineering
www.koansoftware.com | www.klinux.org