* [Xenomai-help] Problem to compile for ARM
@ 2007-05-04 13:15 Perrine Martignoni
2007-05-04 13:23 ` Gilles Chanteperdrix
0 siblings, 1 reply; 4+ messages in thread
From: Perrine Martignoni @ 2007-05-04 13:15 UTC (permalink / raw)
To: xenomai
[-- Attachment #1: Type: text/plain, Size: 3849 bytes --]
Hello,
I have some problems to compile my code Posix for ARM. I have installed
xenomai in /usr/xenomai_arm-2.3.1 for ARM.
Here is my compilation :
[root@domain.hid Essai_mutex_arm]# make XENO_CONFIG=/usr/xenomai_arm-2.3.1
/bin/xeno-config
arm-linux-gcc -I/usr/xenomai_arm-2.3.1/include
-I/usr/xenomai_arm-2.3.1/include/posix
-D_GNU_SOURCE -D_REENTRANT -D__XENO__ -g essai_mutex.c -c -o
essai_mutex_rt.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.1/lib -lpthread_rt -lpthread -lrt essai_mutex_rt.o
-o essai_mutex_rt
essai_mutex_rt.o: In function `affich':
/home/martignoni/Programme/Test/Essai_mutex_arm/essai_mutex.c:30: undefined
reference to `__wrap_pthread_mutex_lock'
/home/martignoni/Programme/Test/Essai_mutex_arm/essai_mutex.c:37: undefined
reference to `__wrap_pthread_mutex_unlock'
essai_mutex_rt.o: In function `cleanup_upon_sig':
/home/martignoni/Programme/Test/Essai_mutex_arm/essai_mutex.c:70: undefined
reference to `__wrap_pthread_mutex_destroy'
essai_mutex_rt.o: In function `main':
/home/martignoni/Programme/Test/Essai_mutex_arm/essai_mutex.c:88: undefined
reference to `__wrap_pthread_mutex_init'
/home/martignoni/Programme/Test/Essai_mutex_arm/essai_mutex.c:121: undefined
reference to `__wrap_pthread_create'
/home/martignoni/Programme/Test/Essai_mutex_arm/essai_mutex.c:124: undefined
reference to `__wrap_pthread_create'
collect2: ld returned 1 exit status
make: *** [essai_mutex_rt] Erreur 1
rm essai_mutex_rt.o
It would seem the problem is only with Posix.
In the directory /usr/xenomai_arm-2.3.1/lib, I have only static librairies
(.a, .la). Maybe it's the problem.
[-- Attachment #2: Type: text/html, Size: 5944 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Xenomai-help] Problem to compile for ARM
2007-05-04 13:15 [Xenomai-help] Problem to compile for ARM Perrine Martignoni
@ 2007-05-04 13:23 ` Gilles Chanteperdrix
2007-05-04 13:34 ` Daniel Schnell
2007-05-06 14:31 ` Perrine Martignoni
0 siblings, 2 replies; 4+ messages in thread
From: Gilles Chanteperdrix @ 2007-05-04 13:23 UTC (permalink / raw)
To: Perrine Martignoni; +Cc: xenomai
Perrine Martignoni wrote:
> Hello,
>
> I have some problems to compile my code Posix for ARM. I have installed
> xenomai in /usr/xenomai_arm-2.3.1 for ARM.
>
> Here is my compilation :
> (...)
> -L/usr/xenomai_arm-2.3.1/lib -lpthread_rt -lpthread -lrt
> essai_mutex_rt.o -o essai_mutex_rt
The order of arguments on the linker command line is important, this
should be:
essai_mutex_rt.o -lpthread_rt -lpthread -lrt
--
Gilles Chanteperdrix
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Xenomai-help] Problem to compile for ARM
2007-05-04 13:23 ` Gilles Chanteperdrix
@ 2007-05-04 13:34 ` Daniel Schnell
2007-05-06 14:31 ` Perrine Martignoni
1 sibling, 0 replies; 4+ messages in thread
From: Daniel Schnell @ 2007-05-04 13:34 UTC (permalink / raw)
To: Gilles Chanteperdrix, Perrine Martignoni; +Cc: xenomai
Or you place somewhere before the linker option
-Wl,--start-group
to tell the linker to iterate several times over the library interdependencies.
Even if gcc doc says different, you actually do not need a -Wl,--end-group option.
Best regards,
Daniel Schnell.
-----Original Message-----
From: xenomai-help-bounces@domain.hid [mailto:xenomai-help-bounces@domain.hid] On Behalf Of Gilles Chanteperdrix
Sent: 4. maí 2007 13:23
To: Perrine Martignoni
Cc: xenomai@xenomai.org
Subject: Re: [Xenomai-help] Problem to compile for ARM
Perrine Martignoni wrote:
> Hello,
>
> I have some problems to compile my code Posix for ARM. I have
> installed xenomai in /usr/xenomai_arm-2.3.1 for ARM.
>
> Here is my compilation :
> (...)
> -L/usr/xenomai_arm-2.3.1/lib -lpthread_rt -lpthread -lrt
> essai_mutex_rt.o -o essai_mutex_rt
The order of arguments on the linker command line is important, this should be:
essai_mutex_rt.o -lpthread_rt -lpthread -lrt
--
Gilles Chanteperdrix
_______________________________________________
Xenomai-help mailing list
Xenomai-help@domain.hid
https://mail.gna.org/listinfo/xenomai-help
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Xenomai-help] Problem to compile for ARM
2007-05-04 13:23 ` Gilles Chanteperdrix
2007-05-04 13:34 ` Daniel Schnell
@ 2007-05-06 14:31 ` Perrine Martignoni
1 sibling, 0 replies; 4+ messages in thread
From: Perrine Martignoni @ 2007-05-06 14:31 UTC (permalink / raw)
To: xenomai
[-- Attachment #1: Type: text/plain, Size: 722 bytes --]
Thanks a lot, it works fine.
I did this : essai_mutex_rt.o -lpthread_rt -lpthread -lrt in the linker
command line.
On 5/4/07, Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org> wrote:
>
> Perrine Martignoni wrote:
> > Hello,
> >
> > I have some problems to compile my code Posix for ARM. I have installed
> > xenomai in /usr/xenomai_arm-2.3.1 for ARM.
> >
> > Here is my compilation :
> > (...)
> > -L/usr/xenomai_arm-2.3.1/lib -lpthread_rt -lpthread -lrt
> > essai_mutex_rt.o -o essai_mutex_rt
>
> The order of arguments on the linker command line is important, this
> should be:
>
> essai_mutex_rt.o -lpthread_rt -lpthread -lrt
>
> --
> Gilles Chanteperdrix
>
[-- Attachment #2: Type: text/html, Size: 1324 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2007-05-06 14:31 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-05-04 13:15 [Xenomai-help] Problem to compile for ARM Perrine Martignoni
2007-05-04 13:23 ` Gilles Chanteperdrix
2007-05-04 13:34 ` Daniel Schnell
2007-05-06 14:31 ` Perrine Martignoni
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.