I compiled cyclictest with this command line and it works with no problem :


arm-linux-gcc -I/usr/xenomai_arm-2.3.1uClibc/include -I/usr/xenomai_arm-
2.3.1uClibc/include/posix -D_GNU_SOURCE -D_REENTRANT -D__XENO__
-D__IN_XENO__ -Wstrict-prototypes -DIPIPE_TRACE=1 -g cyclictest.c -c -o
cyclictest.o

arm-linux-gcc -Wl,--wrap,pthread_create -Wl,--wrap,pthread_setschedparam
-Wl,--wrap,pthread_getschedparam -Wl,--wrap,pthread_yield
-Wl,--wrap,sched_yield -Wl,--wrap,sem_init -Wl,--wrap,sem_destroy
-Wl,--wrap,sem_post -Wl,--wrap,sem_timedwait -Wl,--wrap,sem_wait
-Wl,--wrap,sem_trywait -Wl,--wrap,sem_getvalue -Wl,--wrap,sem_open
-Wl,--wrap,sem_close -Wl,--wrap,sem_unlink -Wl,--wrap,clock_getres
-Wl,--wrap,clock_gettime -Wl,--wrap,clock_settime -Wl,--wrap,clock_nanosleep
-Wl,--wrap,nanosleep -Wl,--wrap,pthread_mutexattr_init
-Wl,--wrap,pthread_mutexattr_destroy -Wl,--wrap,pthread_mutexattr_gettype
-Wl,--wrap,pthread_mutexattr_settype
-Wl,--wrap,pthread_mutexattr_getprotocol
-Wl,--wrap,pthread_mutexattr_setprotocol
-Wl,--wrap,pthread_mutexattr_getpshared
-Wl,--wrap,pthread_mutexattr_setpshared -Wl,--wrap,pthread_mutex_init
-Wl,--wrap,pthread_mutex_destroy -Wl,--wrap,pthread_mutex_lock
-Wl,--wrap,pthread_mutex_trylock -Wl,--wrap,pthread_mutex_timedlock
-Wl,--wrap,pthread_mutex_unlock -Wl,--wrap,pthread_condattr_init
-Wl,--wrap,pthread_condattr_destroy -Wl,--wrap,pthread_condattr_getclock
-Wl,--wrap,pthread_condattr_setclock -Wl,--wrap,pthread_condattr_getpshared
-Wl,--wrap,pthread_condattr_setpshared -Wl,--wrap,pthread_cond_init
-Wl,--wrap,pthread_cond_destroy -Wl,--wrap,pthread_cond_wait
-Wl,--wrap,pthread_cond_timedwait -Wl,--wrap,pthread_cond_signal
-Wl,--wrap,pthread_cond_broadcast -Wl,--wrap,mq_open -Wl,--wrap,mq_close
-Wl,--wrap,mq_unlink -Wl,--wrap,mq_getattr -Wl,--wrap,mq_setattr
-Wl,--wrap,mq_send -Wl,--wrap,mq_timedsend -Wl,--wrap,mq_receive
-Wl,--wrap,mq_timedreceive -Wl,--wrap,mq_notify -Wl,--wrap,open
-Wl,--wrap,socket -Wl,--wrap,close -Wl,--wrap,ioctl -Wl,--wrap,read
-Wl,--wrap,write -Wl,--wrap,recvmsg -Wl,--wrap,sendmsg -Wl,--wrap,recvfrom
-Wl,--wrap,sendto -Wl,--wrap,recv -Wl,--wrap,send -Wl,--wrap,getsockopt
-Wl,--wrap,setsockopt -Wl,--wrap,bind -Wl,--wrap,connect -Wl,--wrap,listen
-Wl,--wrap,accept -Wl,--wrap,getsockname -Wl,--wrap,getpeername
-Wl,--wrap,shutdown -Wl,--wrap,timer_create -Wl,--wrap,timer_delete
-Wl,--wrap,timer_settime -Wl,--wrap,timer_getoverrun
-Wl,--wrap,timer_gettime -Wl,--wrap,ftruncate -Wl,--wrap,close
-Wl,--wrap,shm_open -Wl,--wrap,shm_unlink -Wl,--wrap,mmap -Wl,--wrap,munmap
-L/usr/xenomai_arm-2.3.1uClibc/lib cyclictest.o -lpthread_rt -lpthread -lrt
-o cyclictest



I don't see the difference with my own test.
I try again with my code with this command line exactly and I have the same
error :


/usr/src/ELDK_arm/usr/../arm/lib/libpthread.so: undefined reference to
`__wrap_mmap'

/usr/src/ELDK_arm/usr/../arm/lib/librt.so: undefined reference
to`__wrap_close'

/usr/src/ELDK_arm/usr/../arm/lib/libpthread.so: undefined reference to
`__wrap_munmap'

collect2: ld returned 1 exit status


On 5/30/07, Perrine Martignoni <[EMAIL PROTECTED]> wrote:

>Could you show us the compilation command used to compile cyclictest or
switchtest ?

I didn't try to compile myself these tests. I thought they were compiled
when I installed Xenomai and put in /xenomai/bin

I'll try to do it myself.


On 5/29/07, Gilles Chanteperdrix <[EMAIL PROTECTED] >
wrote:
>
> Jan Kiszka wrote:
> > Perrine Martignoni wrote:
> > ...
> > > -Wl,--wrap,close -Wl,--wrap,shm_open -Wl,--wrap,shm_unlink
> -Wl,--wrap,mmap
> > > -Wl,--wrap,munmap -L/usr/xenomai_arm-2.3.1uClibc/lib
> essai_mutex_rt.o
> > > -lpthread_rt -lpthread -lrt -o essai_mutex_rt
> >
> > I think to remember the ordering makes a difference here: Try to put
> > essai_mutex_rt.o after the libs. That's also what happens when using
> the
> > Xenomai provided flags.
>
> Yes, the order matters, but essai_mutex_rt.o should be before the
> libraries. Xenomai makefiles pass libraries in the LDADD variable, which
>
> is put at the very end of the compilation command line.
>
> >
> > Apropos: Use `<xenomai-installation-path>/xeno-config --posix-ldflags`
> > (also for --posix-cflags) to make your life easier. There is generally
>
> > no need to maintain all the flags on your own - and it's error-prone.
>
> I thought that what Perrine showed us was the result of running make and
> that her makefiles really used xeno-config.
>
> --
>
>
>                                             Gilles Chanteperdrix.
>


_______________________________________________
Xenomai-help mailing list
[email protected]
https://mail.gna.org/listinfo/xenomai-help

Reply via email to