Xenomai with µClibc
Quoted 6 lines · Perrine Martignoni
Sorry for the details.
I work on an ARM and I use the cross compiler ELDK version 4.1 (build : 2007-01-22-uclibc).When I compile sources of xenomai, I have this error message :
-Wl,shm_unlink -Wl,--wrap -Wl,mmap -Wl,--wrap -Wl,munmap cyclictest-cyclictest.o ../../skins/posix/.libs/libpthread_rt.a -lpthread -lrt
../../skins/posix/.libs/libpthread_rt.a(libpthread_rt_la-shm.o): In function `__wrap_shm_open':
shm.c:(.text+0x74): undefined reference to shm_open' ../../skins/posix/.libs/libpthread_rt.a(libpthread_rt_la-shm.o): In function __wrap_shm_unlink':
shm.c:(.text+0xdc): undefined reference to `shm_unlink'
collect2: ld returned 1 exit status
make[3]: *** [cyclictest] Erreur 1
make[3]: Leaving directory `/usr/src/xenomai-2.3.1/src/testsuite/cyclic'
make[2]: *** [all-recursive] Erreur 1
make[2]: Leaving directory `/usr/src/xenomai-2.3.1/src/testsuite'
make[1]: *** [all-recursive] Erreur 1
make[1]: Leaving directory `/usr/src/xenomai-2.3.1/src'
make: *** [all-recursive] Erreur 1
Fixed by this patch:
https://mail.gna.org/public/xenomai-core/2007-03/msg00104.html
You may also need this patch:
native/task.c 28 Mar 2007 13:53:03 -0000 1.2 renamed from native/task.c 20 Mar 2007 08:16:41 -0000 1.1.1.1 +6 -1
@@ -135,7 +135,12 @@ pthread_attr_setstacksize(&thattr, stksize); if (!(mode & T_JOINABLE)) pthread_attr_setdetachstate(&thattr, PTHREAD_CREATE_DETACHED); - if (prio > 0) { + /* There's a limitation in libpthread + * that returns EPERM upon SCHED_FIFO + * for non priviledged users. + * So workaround this for now. FIXME (in uClibc/pthread). + */ + if (prio > 0 && geteuid() == 0) { pthread_attr_setschedpolicy(&thattr, SCHED_FIFO); param.sched_priority = sched_get_priority_max(SCHED_FIFO); }
Signature · 1 line
Stephane
Quoted 8 lines · Fillod Stephane
You may also need this patch:
native/task.c 28 Mar 2007 13:53:03 -0000 1.2 renamed from native/task.c 20 Mar 2007 08:16:41 -0000 1.1.1.1 +0
-0@@ -135,7 +135,12 @@ pthread_attr_setstacksize(&thattr, stksize); if (!(mode & T_JOINABLE)) pthread_attr_setdetachstate(&thattr, PTHREAD_CREATE_DETACHED);
native/task.c 28 Mar 2007 13:53:03 -0000 1.2 line 146
Quoted 10 lines
native/task.c 28 Mar 2007 13:53:03 -0000 1.2 renamed from native/task.c 20 Mar 2007 08:16:41 -0000 1.1.1.1 +6
-1- if (prio > 0) { + /* There's a limitation in libpthread + * that returns EPERM upon SCHED_FIFO + * for non priviledged users. + * So workaround this for now. FIXME (in uClibc/pthread). + */ + if (prio > 0 && geteuid() == 0) { pthread_attr_setschedpolicy(&thattr, SCHED_FIFO); param.sched_priority = sched_get_priority_max(SCHED_FIFO); }
I do not think it is a good idea, I prefer rt_task_create to fail loudly because it needs root priviledge, rather than silently creating a non real-time thread.
Signature · 1 line
Gilles Chanteperdrix
Quoted 15 lines · Gilles Chanteperdrix
Quoted 14 lines · Fillod Stephane
You may also need this patch:
native/task.c 28 Mar 2007 13:53:03 -0000 1.2 renamed from native/task.c 20 Mar 2007 08:16:41 -0000 1.1.1.1 +5
-1@@ -135,7 +135,12 @@ pthread_attr_setstacksize(&thattr, stksize); if (!(mode & T_JOINABLE)) pthread_attr_setdetachstate(&thattr, PTHREAD_CREATE_DETACHED); - if (prio > 0) { + /* There's a limitation in libpthread + * that returns EPERM upon SCHED_FIFO + * for non priviledged users. + * So workaround this for now. FIXME (in uClibc/pthread). + */
Quoted 9 lines
native/task.c 28 Mar 2007 13:53:03 -0000 1.2 line 146
Quoted 4 lines
native/task.c 28 Mar 2007 13:53:03 -0000 1.2 renamed from native/task.c 20 Mar 2007 08:16:41 -0000 1.1.1.1 +1
-0+ if (prio > 0 && geteuid() == 0) { pthread_attr_setschedpolicy(&thattr, SCHED_FIFO); param.sched_priority = sched_get_priority_max(SCHED_FIFO); }I do not think it is a good idea, I prefer
rt_task_createto fail loudly because it needs root priviledge, rather than silently creating a non real-time thread.
Agreed.
Signature · 1 line
Philippe.
I applied the patch xeno-2.3-posix-shm.diff and the installation of Xenomai works fine.
Thanks
But after when I want to compile an application (who works with glibc), I have this 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
This error appears with any example of code.
Quoted 41 lines · Philippe Gerum
Quoted 9 lines · Gilles Chanteperdrix
native/task.c 28 Mar 2007 13:53:03 -0000 1.2 line 137
Quoted 8 lines · Fillod Stephane
You may also need this patch:
native/task.c 28 Mar 2007 13:53:03 -0000 1.2 renamed from native/task.c 20 Mar 2007 08:16:41 -0000 1.1.1.1 +0
-0@@ -135,7 +135,12 @@ pthread_attr_setstacksize(&thattr, stksize); if (!(mode & T_JOINABLE)) pthread_attr_setdetachstate(&thattr,
PTHREAD_CREATE_DETACHED);Quoted 9 lines
native/task.c 28 Mar 2007 13:53:03 -0000 1.2
Quoted 9 lines
native/task.c 28 Mar 2007 13:53:03 -0000 1.2 renamed from native/task.c 20 Mar 2007 08:16:41 -0000 1.1.1.1 +6
-1- if (prio > 0) { + /* There's a limitation in libpthread + * that returns EPERM upon SCHED_FIFO + * for non priviledged users. + * So workaround this for now. FIXME (in uClibc/pthread). + */ + if (prio > 0 && geteuid() == 0) { pthread_attr_setschedpolicy(&thattr, SCHED_FIFO); param.sched_priority =
sched_get_priority_max(SCHED_FIFO);Quoted 6 lines
native/task.c 28 Mar 2007 13:53:03 -0000 1.2 line 146
Quoted 1 line
native/task.c 28 Mar 2007 13:53:03 -0000 1.2 renamed from native/task.c 20 Mar 2007 08:16:41 -0000 1.1.1.1 +0
-0}I do not think it is a good idea, I prefer
rt_task_createto fail loudly because it needs root priviledge, rather than silently creating a non real-time thread.Agreed.
--
Philippe._______________________________________________
Xenomai-help mailing list
[email protected]
https://mail.gna.org/listinfo/xenomai-help
Quoted 14 lines · Perrine Martignoni
I applied the patch xeno-2.3-posix-shm.diff and the installation of Xenomai works fine.
ThanksBut after when I want to compile an application (who works with glibc), I have this 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'
Quoted 6 lines
/usr/src/ELDK_arm/usr/../arm/lib/libpthread.so: undefined reference to `__wrap_munmap'collect2: ld returned 1 exit status
This error appears with any example of code.
Does this happen when compiling Xenomai posix programs, such as cyclictest or switchtest ?
As usual, please show us an example of code that fails (including the Makefile).
Signature · 1 line
Gilles Chanteperdrix
It seems that cyclictest and switchtest compile fine. I had no error when I installed Xenomai.
Here is an example of code that fails :
/*Fichier essai_mutex.c*/
#include <pthread.h>
#include <string.h>
#include <stdio.h>
#include <signal.h>
#include <time.h>
#include <errno.h>
#include <fcntl.h>
#include <getopt.h>
#include <unistd.h>
#include <stdlib.h>
#include <sys/mman.h>
#include <sys/time.h>
#include <limits.h>
pthread_t task1, task2;pthread_mutex_t mutex;
void routine1 (void * cookie);
void routine2 (void * cookie);
int tab[200];
int DESTRUCT=0;
void affich(int toto){
static int cpt = 0;pthread_mutex_lock(&mutex);
tab[cpt] = toto;
cpt ++;
if(cpt == 150)
{
cpt = 0;
}pthread_mutex_unlock(&mutex);
}
void routine1 (void * cookie){
struct sched_param param = {.sched_priority = 10 }; pthread_setschedparam(pthread_self(), SCHED_FIFO, ¶m); for(;;){
affich(1);
sleep(1);
if(DESTRUCT==1){
pthread_exit(NULL);
};
}
}
void routine2 (void * cookie){
struct sched_param param = {.sched_priority = 10 }; pthread_setschedparam(pthread_self(), SCHED_FIFO, ¶m); for(;;){
affich(2);
sleep(2);
if(DESTRUCT==1){
pthread_exit(NULL);
};
}
}
void cleanup_upon_sig(int sig __attribute__((unused))) {
DESTRUCT=1;
}
int main(int argc, char **argv)
{
int i = 0;
int err;sigset_t mask, oldmask;pthread_attr_t attr1, attr2;
struct sched_param param1 = {.sched_priority = 10 }; struct sched_param param2 = {.sched_priority = 10 };
mlockall(MCL_CURRENT | MCL_FUTURE);
/*creation du mutex*/pthread_mutex_init(&mutex,NULL);
sigemptyset(&mask);sigaddset(&mask, SIGINT);signal(SIGINT, cleanup_upon_sig);sigaddset(&mask, SIGTERM);signal(SIGTERM, cleanup_upon_sig);sigaddset(&mask, SIGHUP);signal(SIGHUP, cleanup_upon_sig);
pthread_sigmask(SIG_BLOCK, &mask, &oldmask);
printf("Ctrl C pour stopper l'application et afficher le resultat\n");
/*Initialisation des attributs des taches*/ pthread_attr_init(&attr1); pthread_attr_setdetachstate(&attr1, PTHREAD_CREATE_JOINABLE); pthread_attr_setinheritsched(&attr1, PTHREAD_EXPLICIT_SCHED); pthread_attr_setschedpolicy(&attr1, SCHED_FIFO); pthread_attr_setschedparam(&attr1, ¶m1); pthread_attr_setstacksize(&attr1, PTHREAD_STACK_MIN);
pthread_attr_init(&attr2); pthread_attr_setdetachstate(&attr2, PTHREAD_CREATE_JOINABLE); pthread_attr_setinheritsched(&attr2, PTHREAD_EXPLICIT_SCHED); pthread_attr_setschedpolicy(&attr2, SCHED_FIFO); pthread_attr_setschedparam(&attr2, ¶m2); pthread_attr_setstacksize(&attr2, PTHREAD_STACK_MIN);
if (err = pthread_create (&task1,&attr1,(void *)routine1,NULL))
fprintf(stderr, "failed to create threads: %s\n", strerror(err));
if (err = pthread_create (&task2,&attr2,(void *)routine2,NULL))
fprintf(stderr, "failed to create threads: %s\n", strerror(err));
pthread_sigmask(SIG_UNBLOCK, &mask, &oldmask);
pthread_join(task1, NULL);pthread_join(task2, NULL);
if (err = pthread_mutex_destroy(&mutex))
fprintf(stderr, "failed to cancel mutex");
for(i = 0; i < 20 ; i++)
{
printf("Task %d\n",tab[i]);
}
return 0;
}
And the makefile :
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__ -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 \,--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 essai_mutex_rt.o -lpthread_rt -lpthread -lrt -o essai_mutex_rt
Thanks
Quoted 30 lines · Gilles Chanteperdrix
Quoted 14 lines · Perrine Martignoni
I applied the patch xeno-2.3-posix-shm.diff and the installation of Xenomai works fine.
ThanksBut after when I want to compile an application (who works with glibc), I have this 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'Quoted 6 lines
/usr/src/ELDK_arm/usr/../arm/lib/libpthread.so: undefined reference to `__wrap_munmap'collect2: ld returned 1 exit status
This error appears with any example of code.
Does this happen when compiling Xenomai posix programs, such as cyclictest or switchtest ?
As usual, please show us an example of code that fails (including theMakefile).--
Gilles Chanteperdrix
Quoted 1 line · Perrine Martignoni
It seems that cyclictest and switchtest compile fine.
Could you show us the compilation command used to compile cyclictest or switchtest ?
Signature · 1 line
Gilles Chanteperdrix
Perrine Martignoni wrote:
...
Review
Quoted 3 lines
(quoted diff) +0
-3-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.
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.
Jan
Quoted 9 lines · Jan Kiszka
Perrine Martignoni wrote:
...Review
Quoted 3 lines
(quoted diff) +0
-3-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_rtI 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.
Quoted 4 lines
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.
Signature · 1 line
Gilles Chanteperdrix.
Quoted 1 line
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.
Quoted 30 lines · Gilles Chanteperdrix
Quoted 3 lines · Jan Kiszka
Perrine Martignoni wrote:
...Quoted 1 line
-Wl,--wrap,close -Wl,--wrap,shm_open -Wl,--wrap,shm_unlink
-Wl,--wrap,mmap
Quoted 6 lines
Review
Quoted 2 lines
(quoted diff) +0
-2-Wl,--wrap,munmap -L/usr/xenomai_arm-2.3.1uClibc/lib essai_mutex_rt.o -lpthread_rt -lpthread -lrt -o essai_mutex_rtI 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.
Quoted 4 lines
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.
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
Quoted 48 lines · Perrine Martignoni
Quoted 2 lines
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.
Quoted 34 lines · Gilles Chanteperdrix
Quoted 3 lines · Jan Kiszka
Perrine Martignoni wrote:
...Quoted 1 line
-Wl,--wrap,close -Wl,--wrap,shm_open -Wl,--wrap,shm_unlink
-Wl,--wrap,mmap
Quoted 1 line
Quoted 1 line
-Wl,--wrap,munmap -L/usr/xenomai_arm-2.3.1uClibc/lib
essai_mutex_rt.o
Quoted 4 lines
Quoted 1 line
-lpthread_rt -lpthread -lrt -o
essai_mutex_rtI 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
Quoted 1 line
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.
Quoted 5 lines
Apropos: Use
<xenomai-installation-path>/xeno-config --posix-ldflags(also for --posix-cflags) to make your life easier. There is generallyno 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.
Quoted 57 lines · Perrine Martignoni
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.oarm-linux-gcc -Wl,--wrap,pthread_create -Wl,--wrap,pthread_setschedparam
(quoted diff) +0
-37-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 cyclictestI 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'
Quoted 8 lines
/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
I don't see the reason either. But as the compiled code seems to have an effect here, could you try to reduce your program until is builds fine? Maybe this will give us some more hints where to dig.
Jan
I have reduced my code until this and it doesn't compile :
#include <pthread.h>
#include <stdlib.h>
#include <sys/mman.h>
void routine1 (void * cookie){
int i=0;
for(i=0;i<10;i++){
}}
int main(int argc, char **argv)
{
int i = 0;
int err;
pthread_t task1;
pthread_attr_t attr1;
mlockall(MCL_CURRENT | MCL_FUTURE);
err = pthread_create (&task1,&attr1,(void *)routine1,NULL);exit;
}
I don't see what remove.
mlockall isn't the reason. I tried too.
Quoted 84 lines · Jan Kiszka
Quoted 1 line · Perrine Martignoni
I compiled cyclictest with this command line and it works with no
problem :
Quoted 8 lines
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.oarm-linux-gcc -Wl,--wrap,pthread_create -Wl,--wrap,pthread_setschedparam
Review
Quoted 9 lines
(quoted diff) +0
-9-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
Review
Quoted 10 lines
(quoted diff) +0
-10-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
Review
Quoted 9 lines
(quoted diff) +0
-9-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
Review
Quoted 2 lines
(quoted diff) +0
-2-Wl,--wrap,sendto -Wl,--wrap,recv -Wl,--wrap,send -Wl,--wrap,getsockopt -Wl,--wrap,setsockopt -Wl,--wrap,bind -Wl,--wrap,connect-Wl,--wrap,listen
Review
Quoted 5 lines
(quoted diff) +0
-5-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
Quoted 1 line
-L/usr/xenomai_arm-2.3.1uClibc/lib cyclictest.o -lpthread_rt -lpthread
-lrt
Quoted 6 lines
-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 thesame
Quoted 6 lines
error :
/usr/src/ELDK_arm/usr/../arm/lib/libpthread.so: undefined reference to `__wrap_mmap'Quoted 8 lines
/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
I don't see the reason either. But as the compiled code seems to have an effect here, could you try to reduce your program until is builds fine? Maybe this will give us some more hints where to dig.
Jan
Hi,
We had similar problems once. Try putting
-Wl,--start-group
before the first occurrence of any external library.
Daniel.
________________________________
From: [email protected] [mailto:[email protected]] On Behalf Of Perrine Martignoni
Sent: 30. maí 2007 09:10
To: [email protected]
Subject: Re: [Xenomai-help] Xenomai with µClibc
I have reduced my code until this and it doesn't compile :
#include <pthread.h>
#include <stdlib.h>
#include <sys/mman.h>
void routine1 (void * cookie){
int i=0;
for(i=0;i<10;i++){
}}
int main(int argc, char **argv)
{
int i = 0;
int err;
pthread_t task1;
pthread_attr_t attr1;
mlockall(MCL_CURRENT | MCL_FUTURE);
err = pthread_create (&task1,&attr1,(void *)routine1,NULL);exit;
}
I don't see what remove.
mlockall isn't the reason. I tried too.
On 5/30/07, Jan Kiszka <[email protected]> wrote:
Perrine Martignoni wrote: > 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 > I don't see the reason either. But as the compiled code seems to have an effect here, could you try to reduce your program until is builds fine? Maybe this will give us some more hints where to dig. Jan
Quoted 7 lines · Daniel Schnell
Hi,
We had similar problems once. Try putting
-Wl,--start-group
before the first occurrence of any external library.
No, this is the wrong thing to do, since it makes Linux libraries use Xenomai symbols.
Signature · 1 line
Gilles Chanteperdrix
Well right,
But it gives you a hint how to look further if it solves the linking error.
Daniel.
-----Original Message-----
From: Gilles Chanteperdrix [mailto:[email protected]
Sent: 30. maí 2007 09:28
To: Daniel Schnell
Cc: Perrine Martignoni; [email protected]
Subject: Re: [Xenomai-help] Xenomai with µClibc
Quoted 7 lines · Daniel Schnell
Hi,
We had similar problems once. Try putting
-Wl,--start-group
before the first occurrence of any external library.
No, this is the wrong thing to do, since it makes Linux libraries use Xenomai symbols.
Signature · 1 line
Gilles Chanteperdrix
Quoted 15 lines · Daniel Schnell
-----Original Message-----
From: Gilles Chanteperdrix [mailto:[email protected]
Sent: 30. maí 2007 09:28
To: Daniel Schnell
Cc: Perrine Martignoni; [email protected]
Subject: Re: [Xenomai-help] Xenomai with µClibcQuoted 6 lines · Daniel Schnell
Hi,
We had similar problems once. Try putting
-Wl,--start-group
Quoted 8 lines
Quoted 1 line
before the first occurrence of any external library.
No, this is the wrong thing to do, since it makes Linux libraries use Xenomai symbols.
Well right,
But it gives you a hint how to look further if it solves the linking
error.
No doubt it will solve the linking error, but the wrong way.
Signature · 1 line
Gilles Chanteperdrix
Quoted 107 lines · Perrine Martignoni
I have reduced my code until this and it doesn't compile :
#include <
pthread.h>#include <
stdlib.h>#include <
sys/mman.h>void routine1 (void * cookie){
int i=0; for(i=0;i<10;i++){ }}
int
main(int argc, char **argv){
int i = 0; int err; pthread_t task1; pthread_attr_t attr1; mlockall(MCL_CURRENT | MCL_FUTURE); err = pthread_create (&task1,&attr1,(void *)routine1,NULL);exit;
}
I don't see what remove.
mlockall isn't the reason. I tried too.
On 5/30/07, *Jan Kiszka* <[email protected] <mailto:[email protected]>> wrote:
Perrine Martignoni wrote: > 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
Quoted 8 lines
> -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 cyclictestCould you run ls in /usr/xenomai_arm-2.3.1uClibc/lib ? To see if Xenomai
installed libpthread_rt.so or only libpthread_rt.a.
Also, I wonder what is this space in the libraries directory, did you put a space in xenomai installation directory prefix ?
Signature · 1 line
Gilles Chanteperdrix
Quoted 37 lines · Perrine Martignoni
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.oarm-linux-gcc -Wl,--wrap,pthread_create -Wl,--wrap,pthread_setschedparam
(quoted diff) +0
-27-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
Review
Quoted 10 lines
(quoted diff) +0
-10-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
That remains mysterious for me as well. Xenomai trunk fails to build against ELDK 4.1 arm-uclibc due to two reasons. One is missing pthread_spin_xxx support in their environment which we need for the new clocktest (we need to find some workaround for this - separate issue), the other one is well known:
[...]
l,--wrap -Wl,ftruncate -Wl,--wrap -Wl,close -Wl,--wrap -Wl,shm_open -Wl,--wrap -Wl,shm_unlink -Wl,--wrap -Wl,mmap -Wl,--wrap -Wl,munmap clocktest-clocktest.o ../../skins/posix/.libs/libpthread_rt.a -lpthread -lrt clocktest-clocktest.o: In function `check_time_warps':
clocktest.c:(.text+0x28): undefined reference to `pthread_spin_lock'
clocktest.c:(.text+0x5c): undefined reference to `pthread_spin_unlock'
clocktest-clocktest.o: In function `main':
clocktest.c:(.text+0x16c): undefined reference to `pthread_spin_init'/home/kiszka/eldk/usr/../arm/lib/libpthread.so: undefined reference to `__wrap_mmap'/home/kiszka/eldk/usr/../arm/lib/librt.so: undefined reference to `__wrap_close'/home/kiszka/eldk/usr/../arm/lib/libpthread.so: undefined reference to `__wrap_munmap'
collect2: ld returned 1 exit status
I noticed that linking like this
arm-linux-gcc ...<flags> <object>.o -lpthread -lrt -lpthread_rt ...
doesn't raise the error. But linking like this
arm-linux-gcc xeno-config --posix-ldflags <object>.o -o <target>
ie. the standard way for external Xenomai POSIX apps, causes even more problems with this toolchain (it's fine here for native builds). Anyone any comments? Maybe Wolfgang?
Jan
Quoted 11 lines · Jan Kiszka
I noticed that linking like this
arm-linux-gcc ...<flags> <object>.o -lpthread -lrt -lpthread_rt ...
doesn't raise the error. But linking like this
arm-linux-gcc
xeno-config --posix-ldflags<object>.o -o <target>ie. the standard way for external Xenomai POSIX apps, causes even more problems with this toolchain (it's fine here for native builds). Anyone any comments? Maybe Wolfgang?
Reason found, I think. No ELDK issue, rather a bug in Xenomai's README.INSTALL:
Perrine, did you happen to configure Xenomai with "configure --host=arm ..."? If yes (see config.log), please use "--host=arm-linux". This solved all issues for me.
Awaiting your feedback!
Jan
I checked README.INSTALL for the ppc part and there the documentation is also wrong.
I think I have to reinstall Xenomai now and take out the Wl,--start-group in our make files ...
Very interesting thread.
Best regards,
Daniel.
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Jan Kiszka
Sent: 31. maí 2007 09:05
To: Perrine Martignoni
Cc: [email protected]
Subject: Re: [Xenomai-help] Xenomai with µClibc
Quoted 11 lines · Jan Kiszka
I noticed that linking like this
arm-linux-gcc ...<flags> <object>.o -lpthread -lrt -lpthread_rt ...
doesn't raise the error. But linking like this
arm-linux-gcc
xeno-config --posix-ldflags<object>.o -o <target>ie. the standard way for external Xenomai POSIX apps, causes even more problems with this toolchain (it's fine here for native builds). Anyone any comments? Maybe Wolfgang?
Reason found, I think. No ELDK issue, rather a bug in Xenomai's README.INSTALL:
Perrine, did you happen to configure Xenomai with "configure --host=arm ..."? If yes (see config.log), please use "--host=arm-linux". This solved all issues for me.
Awaiting your feedback!
Jan
Quoted 5 lines
Perrine, did you happen to configure Xenomai with "configure --host=arm ..."? If yes (see config.log), please use "--host=arm-linux". This solved all issues for me.
Awaiting your feedback!
I configure Xenomai with --host=arm.
I tried to configure like this but it doesn't work :
./configure --build=arm-linux --host=arm-linux CC=arm-linux-gcc CXX=arm-linux-g++ LD=arm-linux-ld --prefix=/usr/xenomai_arm-2.3.1uClibc/ --enable-posix-auto-mlockall
checking build system type... arm-unknown-linux-gnu
checking host system type... arm-unknown-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c checking for arm-linux-gcc... arm-linux-gcc
checking for C compiler default output file name... a.out checking whether the C compiler works... configure: error: cannot run C compiled programs.
If you meant to cross compile, use `--host'.
See `config.log' for more details.
[[email protected] xenomai-2.3.1]#
Quoted 47 lines · Daniel Schnell
I checked README.INSTALL for the ppc part and there the documentation is also wrong.
I think I have to reinstall Xenomai now and take out the Wl,--start-group in our make files ...
Very interesting thread.
Best regards,
Daniel.
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Jan Kiszka
Sent: 31. maí 2007 09:05
To: Perrine Martignoni
Cc: [email protected]
Subject: Re: [Xenomai-help] Xenomai with µClibcQuoted 11 lines · Jan Kiszka
I noticed that linking like this
arm-linux-gcc ...<flags> <object>.o -lpthread -lrt -lpthread_rt ...
doesn't raise the error. But linking like this
arm-linux-gcc
xeno-config --posix-ldflags<object>.o -o <target>ie. the standard way for external Xenomai POSIX apps, causes even more problems with this toolchain (it's fine here for native builds). Anyone any comments? Maybe Wolfgang?
Reason found, I think. No ELDK issue, rather a bug in Xenomai's README.INSTALL:
Perrine, did you happen to configure Xenomai with "configure --host=arm ..."? If yes (see config.log), please use "--host=arm-linux". This solved all issues for me.
Awaiting your feedback!
Jan
Quoted 10 lines · Perrine Martignoni
Quoted 5 lines
Perrine, did you happen to configure Xenomai with "configure --host=arm ..."? If yes (see config.log), please use "--host=arm-linux". This solved all issues for me.
Awaiting your feedback!
I configure Xenomai with --host=arm.
I tried to configure like this but it doesn't work :./configure --build=arm-linux --host=arm-linux CC=arm-linux-gcc
^^^^^^^^^
I guess you are not compiling Xenomai _on_ an ARM box, are you? :) Try --build=i686-linux here.
Jan
Thanks a lot. It works fine.
And now I have the .so in /lib directory.
Quoted 20 lines · Jan Kiszka
Quoted 10 lines · Perrine Martignoni
Quoted 5 lines
Perrine, did you happen to configure Xenomai with "configure --host=arm ..."? If yes (see config.log), please use "--host=arm-linux". This solved all issues for me.
Awaiting your feedback!
I configure Xenomai with --host=arm.
I tried to configure like this but it doesn't work :./configure --build=arm-linux --host=arm-linux CC=arm-linux-gcc
^^^^^^^^^I guess you are not compiling Xenomai _on_ an ARM box, are you? :) Try --build=i686-linux here.
Jan
Quoted 5 lines · Jan Kiszka
Quoted 4 lines · Perrine Martignoni
Quoted 4 lines
Perrine, did you happen to configure Xenomai with "configure --host=arm ..."? If yes (see config.log), please use "--host=arm-linux". This solved all issues for me.
Quoted 8 lines
Quoted 5 lines
Quoted 1 line
Awaiting your feedback!
I configure Xenomai with --host=arm.
I tried to configure like this but it doesn't work :./configure --build=arm-linux --host=arm-linux CC=arm-linux-gcc
^^^^^^^^^I guess you are not compiling Xenomai _on_ an ARM box, are you? :) Try --build=i686-linux here.
Or just omit it. Also CC=, CXX=, LD= ist not necessary. For PowerPC with the ELDK, I just use
./configure --host=ppc-linux
to configure Xenomai.
Wolfgang.
Quoted 15 lines · Wolfgang Grandegger
Quoted 5 lines · Jan Kiszka
Quoted 4 lines · Perrine Martignoni
Quoted 4 lines
Perrine, did you happen to configure Xenomai with "configure --host=arm ..."? If yes (see config.log), please use "--host=arm-linux". This solved all issues for me.
Quoted 8 lines
Quoted 5 lines
Quoted 1 line
Awaiting your feedback!
I configure Xenomai with --host=arm.
I tried to configure like this but it doesn't work :./configure --build=arm-linux --host=arm-linux CC=arm-linux-gcc
^^^^^^^^^I guess you are not compiling Xenomai _on_ an ARM box, are you? :) Try --build=i686-linux here.
Quoted 6 lines
Or just omit it. Also CC=, CXX=, LD= ist not necessary. For PowerPC with the ELDK, I just use
./configure --host=ppc-linuxto configure Xenomai.
Can we define a common ground for this in README.INSTALL, for all archs? The simpler, the better.
I was heavily misled by the PPC section, because I do not cross-compile everyday, thus had to look up the procedure again and managed to pick the bad example...
Jan
All compile fine.
But now I have a problem when I launch my application on my board :
can't resolve symbol '__real_sem_init'
I don't see the reason.
Quoted 42 lines · Jan Kiszka
Quoted 3 lines · Wolfgang Grandegger
Quoted 2 lines · Jan Kiszka
Quoted 1 line · Perrine Martignoni
Quoted 1 line
Perrine, did you happen to configure Xenomai with "configure
--host=arm
Quoted 12 lines
Quoted 11 lines
Quoted 8 lines
Quoted 4 lines
..."? If yes (see config.log), please use "--host=arm-linux". This solved all issues for me.
Awaiting your feedback!
I configure Xenomai with --host=arm.
I tried to configure like this but it doesn't work :./configure --build=arm-linux --host=arm-linux CC=arm-linux-gcc
^^^^^^^^^I guess you are not compiling Xenomai _on_ an ARM box, are you? :) Try --build=i686-linux here.
Quoted 6 lines
Or just omit it. Also CC=, CXX=, LD= ist not necessary. For PowerPC with the ELDK, I just use
./configure --host=ppc-linuxto configure Xenomai.
Can we define a common ground for this in README.INSTALL, for all archs? The simpler, the better.
I was heavily misled by the PPC section, because I do not cross-compile everyday, thus had to look up the procedure again and managed to pick the bad example...
Jan
_______________________________________________
Xenomai-help mailing list
[email protected]
https://mail.gna.org/listinfo/xenomai-help
Quoted 6 lines · Perrine Martignoni
All compile fine.
But now I have a problem when I launch my application on my board :can't resolve symbol '
__real_sem_init'
I don't see the reason.
Same program as you posted earlier?
I compiled it here with
#> arm-linux-gcc .../xeno-config --posix-cflags --posix-ldflags \
-o posix-demo posix-demo.c
The generated binary shows no trace of __real_whatever:
#> objdump -R posix-demo
posix-demo: file format elf32-littlearm
DYNAMIC RELOCATION RECORDS
OFFSET TYPE VALUE 00011274 R_ARM_COPY stderr 000111fc R_ARM_JUMP_SLOT __wrap_pthread_mutex_unlock 00011200 R_ARM_JUMP_SLOT printf 00011204 R_ARM_JUMP_SLOT sigemptyset 00011208 R_ARM_JUMP_SLOT strerror 0001120c R_ARM_JUMP_SLOT pthread_attr_init 00011210 R_ARM_JUMP_SLOT pthread_exit 00011214 R_ARM_JUMP_SLOT puts 00011218 R_ARM_JUMP_SLOT sleep 0001121c R_ARM_JUMP_SLOT sigaddset 00011220 R_ARM_JUMP_SLOT abort 00011224 R_ARM_JUMP_SLOT __wrap_pthread_setschedparam 00011228 R_ARM_JUMP_SLOT __wrap_pthread_mutex_lock 0001122c R_ARM_JUMP_SLOT fprintf 00011230 R_ARM_JUMP_SLOT pthread_attr_setinheritsched 00011234 R_ARM_JUMP_SLOT signal 00011238 R_ARM_JUMP_SLOT pthread_attr_setstacksize 0001123c R_ARM_JUMP_SLOT pthread_sigmask 00011240 R_ARM_JUMP_SLOT __wrap_pthread_mutex_init 00011244 R_ARM_JUMP_SLOT __wrap_pthread_create 00011248 R_ARM_JUMP_SLOT pthread_self 0001124c R_ARM_JUMP_SLOT pthread_attr_setschedpolicy 00011250 R_ARM_JUMP_SLOT __uClibc_start_main 00011254 R_ARM_JUMP_SLOT pthread_attr_setschedparam 00011258 R_ARM_JUMP_SLOT pthread_attr_setdetachstate 0001125c R_ARM_JUMP_SLOT pthread_join 00011260 R_ARM_JUMP_SLOT mlockall 00011264 R_ARM_JUMP_SLOT __wrap_pthread_mutex_destroy
Can you confirm the issue with this procedure? Also make sure that your rebuild and re-installed the Xenomai user space part cleanly ("make clean; make install").
Jan
Quoted 15 lines · Jan Kiszka
Quoted 14 lines · Wolfgang Grandegger
Quoted 13 lines · Jan Kiszka
Quoted 9 lines · Perrine Martignoni
Quoted 5 lines
Perrine, did you happen to configure Xenomai with "configure --host=arm ..."? If yes (see config.log), please use "--host=arm-linux". This solved all issues for me.
Awaiting your feedback!
I configure Xenomai with --host=arm.
I tried to configure like this but it doesn't work :./configure --build=arm-linux --host=arm-linux CC=arm-linux-gcc
^^^^^^^^^I guess you are not compiling Xenomai _on_ an ARM box, are you? :) Try --build=i686-linux here.
Quoted 8 lines
Quoted 5 lines
Or just omit it. Also CC=, CXX=, LD= ist not necessary. For PowerPC with the ELDK, I just use
./configure --host=ppc-linuxto configure Xenomai.
Can we define a common ground for this in README.INSTALL, for all archs? The simpler, the better.
The above works for the ELDK, because the tools ppc-linux-xxx are available in the binary path (via PATH), but this might not be true for other tool-chains. And this method also does not work with RTnet, IIRC. So far, I didn't realize any difference between the configuration methods ...
Quoted 3 lines
I was heavily misled by the PPC section, because I do not cross-compile everyday, thus had to look up the procedure again and managed to pick the bad example...
... but there might be some quirk with ARM and uClibc tool chains of the ELDK.
Wolfgang.
Quoted 1 line
Same program as you posted earlier?
Yes. it's the same.
Quoted 3 lines
Can you confirm the issue with this procedure? Also make sure that your rebuild and re-installed the Xenomai user space part cleanly ("make clean; make install").
I installed cleanly Xenomai.
I compiled too with :
arm-linux-gcc .../xeno-config --posix-cflags --posix-ldflags -o essai_mutex_rt essai_mutex.c
Here is the objdump after :
#> objdump -R essai_mutex_rt
essai_mutex_rt: format de fichier elf32-little
DYNAMIC RELOCATION RECORDS
OFFSET TYPE VALUE 00011234 UNKNOWN stderr 000111c0 UNKNOWN __wrap_pthread_mutex_unlock 000111c4 UNKNOWN printf 000111c8 UNKNOWN sigemptyset 000111cc UNKNOWN strerror 000111d0 UNKNOWN pthread_attr_init 000111d4 UNKNOWN pthread_exit 000111d8 UNKNOWN puts 000111dc UNKNOWN sleep 000111e0 UNKNOWN sigaddset 000111e4 UNKNOWN abort 000111e8 UNKNOWN __wrap_pthread_setschedparam 000111ec UNKNOWN __wrap_pthread_mutex_lock 000111f0 UNKNOWN fprintf 000111f4 UNKNOWN pthread_attr_setinheritsched 000111f8 UNKNOWN signal 000111fc UNKNOWN pthread_attr_setstacksize 00011200 UNKNOWN pthread_sigmask 00011204 UNKNOWN __wrap_pthread_mutex_init 00011208 UNKNOWN __wrap_pthread_create 0001120c UNKNOWN pthread_self 00011210 UNKNOWN pthread_attr_setschedpolicy 00011214 UNKNOWN __uClibc_start_main 00011218 UNKNOWN pthread_attr_setschedparam 0001121c UNKNOWN pthread_attr_setdetachstate 00011220 UNKNOWN pthread_join 00011224 UNKNOWN __wrap_pthread_mutex_destroy
I have the same problem when I want to launch it on my board.
Quoted 50 lines · Wolfgang Grandegger
Quoted 4 lines · Jan Kiszka
Quoted 3 lines · Wolfgang Grandegger
Quoted 2 lines · Jan Kiszka
Quoted 1 line · Perrine Martignoni
Quoted 1 line
Perrine, did you happen to configure Xenomai with "configure
--host=arm
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
..."? If yes (see config.log), please use "--host=arm-linux". This solved all issues for me.
Awaiting your feedback!
Quoted 8 lines
Quoted 8 lines
Quoted 7 lines
Quoted 4 lines
I configure Xenomai with --host=arm.
I tried to configure like this but it doesn't work :./configure --build=arm-linux --host=arm-linux CC=arm-linux-gcc
^^^^^^^^^I guess you are not compiling Xenomai _on_ an ARM box, are you? :) Try --build=i686-linux here.
Or just omit it. Also CC=, CXX=, LD= ist not necessary. For PowerPC
with
Quoted 8 lines
Quoted 5 lines
the ELDK, I just use
./configure --host=ppc-linuxto configure Xenomai.
Can we define a common ground for this in README.INSTALL, for all archs? The simpler, the better.
The above works for the ELDK, because the tools ppc-linux-xxx are available in the binary path (via PATH), but this might not be true for other tool-chains. And this method also does not work with RTnet, IIRC. So far, I didn't realize any difference between the configuration methods ...
Quoted 3 lines
I was heavily misled by the PPC section, because I do not cross-compile everyday, thus had to look up the procedure again and managed to pick the bad example...
... but there might be some quirk with ARM and uClibc tool chains of the ELDK.
Wolfgang.
_______________________________________________
Xenomai-help mailing list
[email protected]
https://mail.gna.org/listinfo/xenomai-help
Quoted 7 lines · Perrine Martignoni
Quoted 1 line
Same program as you posted earlier?
Yes. it's the same.
Quoted 3 lines
Can you confirm the issue with this procedure? Also make sure that your rebuild and re-installed the Xenomai user space part cleanly ("make clean; make install").
Quoted 5 lines
I installed cleanly Xenomai.
I compiled too with :
arm-linux-gcc.../xeno-config --posix-cflags --posix-ldflags-oessai_mutex_rtessai_mutex.c
try putting essai_mutex.c before the flags, as in:
arm-linux-gcc -o essai_mutex_rt essai_mutex.c xeno-config --posix-cflags --posix-ldflags
Signature · 1 line
Gilles Chanteperdrix
I tried to put essai_mutex.c before the flags but it's the same thing.
It compiles with no problem, and after when I want to launch it on my board I have the error about __real_sem_init.
I noticed that with cyclictest it's the same. When I want to launch the application, I have the same error :
can't resolve symbol '__real_sem_init'
Quoted 23 lines · Gilles Chanteperdrix
Quoted 7 lines · Perrine Martignoni
Quoted 1 line
Same program as you posted earlier?
Yes. it's the same.
Quoted 3 lines
Can you confirm the issue with this procedure? Also make sure that your rebuild and re-installed the Xenomai user space part cleanly ("make clean; make install").
Quoted 5 lines
I installed cleanly Xenomai.
I compiled too with :
arm-linux-gcc.../xeno-config --posix-cflags --posix-ldflags-oessai_mutex_rtessai_mutex.ctry putting
essai_mutex.cbefore the flags, as in:arm-linux-gcc -o
essai_mutex_rtessai_mutex.cxeno-config --posix-cflags --posix-ldflags--
Gilles Chanteperdrix
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 2 lines
__real_sem_initshould be defined by wrappers.o in libpthread_rt.so, what does nm libpthread_rt.so say ?
Here is the result of nm libpthread_rt.so :
$ nm libpthread_rt.so
0000202c t $a
00005974 t $a
0000235c t $a
000023fc t $a
00005978 t $a
0000244c t $a
00002030 t $a
00005924 t $a
0000596c t $a
00002034 t $a
00002038 t $a
0000597c t $a
00002454 t $a
000024ec t $a
00002884 t $a
000028d8 t $a
000029b4 t $a
00002a24 t $a
00002b08 t $a
00002c1c t $a
00002c68 t $a
00002cb4 t $a
00002d18 t $a
00002d8c t $a
00002dd0 t $a
00002e34 t $a
00002e84 t $a
00002ef0 t $a
00002f4c t $a
00002fa4 t $a
00003004 t $a
00003058 t $a
000030ac t $a
00003128 t $a
000031ac t $a
000031fc t $a
00003258 t $a
00003324 t $a
000033a8 t $a
000033fc t $a
00003458 t $a
000034b4 t $a
0000350c t $a
00003584 t $a
000035b8 t $a
000035f8 t $a
00003638 t $a
0000367c t $a
000036c0 t $a
00003704 t $a
00003748 t $a
0000378c t $a
000037cc t $a
0000380c t $a
000038c4 t $a
00003984 t $a
000039c0 t $a
00003a00 t $a
00003ac0 t $a
00003b20 t $a
00003b70 t $a
00003bcc t $a
00003c30 t $a
00003cc4 t $a
00003d58 t $a
00003dec t $a
00003e84 t $a
00003ec8 t $a
00003f08 t $a
00003f48 t $a
00003f8c t $a
00003fd0 t $a
00004014 t $a
00004058 t $a
0000409c t $a
000040e0 t $a
00004124 t $a
00004164 t $a
000041a8 t $a
000041f4 t $a
00004234 t $a
00004274 t $a
0000430c t $a
00004360 t $a
000043d8 t $a
00004558 t $a
000045b8 t $a
00004684 t $a
000046e8 t $a
00004738 t $a
000047c0 t $a
0000481c t $a
00004938 t $a
00004a04 t $a
00004b1c t $a
00004ba0 t $a
00004c70 t $a
00004d1c t $a
00004dd0 t $a
00004e84 t $a
00004f38 t $a
00004fe8 t $a
000050d4 t $a
000051b8 t $a
00005298 t $a
00005348 t $a
000053f8 t $a
00005494 t $a
0000554c t $a
000055d0 t $a
000056c0 t $a
0000575c t $a
000057f8 t $a
00005908 t $a
000058f0 t __aeabi_uidivmod
0000ddf0 A __bss_end__
0000ddf0 A _bss_end__
0000dde4 A __bss_start
0000dde4 A __bss_start__
0000596c t call___do_global_ctors_aux
000023fc t call___do_global_dtors_aux
0000244c t call_frame_dummy
U close
0000dde4 b completed.3705
0000dba8 d __CTOR_END__
0000dba0 d __CTOR_LIST__
w __cxa_finalize
0000dba0 d $d
0000dbac d $d
0000ddcc d $d
0000ddd0 d $d
000023e8 t $d
00002440 t $d
00005964 t $d
0000ddd4 d $d
000024dc t $d
00002828 t $d
0000dba4 d $d
000028c8 t $d
000029a0 t $d
00002a18 t $d
00002af4 t $d
00002c14 t $d
00002c5c t $d
00002cac t $d
00002d0c t $d
00002d7c t $d
00002dc4 t $d
00002e28 t $d
00002e7c t $d
00002ee4 t $d
00002f40 t $d
00002f98 t $d
00002ffc t $d
0000304c t $d
000030a0 t $d
0000311c t $d
000031a0 t $d
000031f4 t $d
0000324c t $d
0000331c t $d
0000339c t $d
000033f0 t $d
0000344c t $d
000034a8 t $d
00003504 t $d
00003578 t $d
000035ec t $d
0000362c t $d
00003670 t $d
000036b8 t $d
000036f8 t $d
0000373c t $d
00003784 t $d
000037c0 t $d
00003800 t $d
000038b4 t $d
00003974 t $d
000039b8 t $d
000039f4 t $d
00003ab0 t $d
00003b14 t $d
00003b68 t $d
00003bc0 t $d
00003c24 t $d
00003cb8 t $d
00003d50 t $d
00003de0 t $d
00003e78 t $d
00003ec0 t $d
00003efc t $d
00003f3c t $d
00003f80 t $d
00003fc8 t $d
00004008 t $d
0000404c t $d
00004090 t $d
000040d8 t $d
00004118 t $d
00004158 t $d
000041a0 t $d
000041e8 t $d
00004228 t $d
00004268 t $d
000042fc t $d
00004354 t $d
000043d0 t $d
00004548 t $d
000045ac t $d
00004678 t $d
000046dc t $d
00004730 t $d
000047b4 t $d
00004810 t $d
00004924 t $d
000049f4 t $d
00004b0c t $d
00004b90 t $d
00004c60 t $d
00004d10 t $d
00004dc0 t $d
00004e74 t $d
00004f28 t $d
00004fdc t $d
000050c8 t $d
000051a8 t $d
0000528c t $d
00005338 t $d
000053e8 t $d
00005484 t $d
0000553c t $d
000055c0 t $d
000056b0 t $d
0000574c t $d
000057e8 t $d
0000ddcc D __data_start
00005908 t __div0
00005924 t __do_global_ctors_aux
0000235c t __do_global_dtors_aux
0000ddcc d __dso_handle
0000dbb0 d __DTOR_END__
0000dbac d __DTOR_LIST__
0000dbb8 A _DYNAMIC
0000dde4 A _edata
0000ddf0 A _end
0000ddf0 A __end__
U __errno_location
U exit
U fflush
00005974 T _fini
0000dde8 b fork_handler_registered
U fprintf
00002404 t frame_dummy
00005b9c r __FRAME_END__
U free
U fwrite
0000dc70 a _GLOBAL_OFFSET_TABLE_
0000202c T _init
000024ec t __init_posix_interface
0000dbb4 d __JCR_END__
0000dbb4 d __JCR_LIST__
w _Jv_RegisterClasses
U malloc
U mlockall
U mprotect
U munlockall
0000ddec b old_sigharden_handler
0000ddd0 d p.3704
U perror
0000dddc D __pse51_muxid
U pthread_atfork
U pthread_attr_getinheritsched
U pthread_attr_getschedparam
U pthread_attr_getschedpolicy
U _pthread_cleanup_pop
U _pthread_cleanup_push
000037cc t __pthread_cond_cleanup
U pthread_exit
00004684 T pthread_intr_attach_np
000047c0 T pthread_intr_control_np
000046e8 T pthread_intr_detach_np
00004738 T pthread_intr_wait_np
U pthread_kill
00002c6c T pthread_make_periodic_np
U pthread_self
U pthread_setcanceltype
00002d18 T pthread_set_mode_np
00002d8c T pthread_set_name_np
00002884 t __pthread_sigharden_handler
U pthread_testcancel
00002a24 t __pthread_trampoline
00002cb4 T pthread_wait_np
U __real_accept
U __real_bind
U __real_close
U __real_connect
U __real_ftruncate
U __real_getpeername
U __real_getsockname
U __real_getsockopt
U __real_ioctl
U __real_listen
U __real_mmap
U __real_munmap
U __real_open
U __real_pthread_create
U __real_pthread_getschedparam
U __real_pthread_setschedparam
U __real_read
U __real_recv
U __real_recvfrom
U __real_recvmsg
U __real_sched_yield
U __real_sem_destroy
U __real_sem_init
U __real_sem_post
U __real_sem_wait
U __real_send
U __real_sendmsg
U __real_sendto
U __real_setsockopt
U __real_shutdown
U __real_socket
U __real_write
0000ddd4 D __rtdm_fd_start
0000ddd8 D __rtdm_muxid
00004558 T __shm_close
U sigaction
U sigemptyset
U signal
U stderr
U strerror
U strncmp
000057f8 t __udivsi3
000055d0 T __wrap_accept
000053f8 T __wrap_bind
000033fc T __wrap_clock_getres
00003458 T __wrap_clock_gettime
0000350c T __wrap_clock_nanosleep
000034b4 T __wrap_clock_settime
00004ba0 T __wrap_close
00005494 T __wrap_connect
00004360 T __wrap_ftruncate
0000575c T __wrap_getpeername
000056c0 T __wrap_getsockname
00005298 T __wrap_getsockopt
00004c70 T __wrap_ioctl
0000554c T __wrap_listen
000043d8 T __wrap_mmap
00003ac0 T __wrap_mq_close
00003b70 T __wrap_mq_getattr
00003e84 T __wrap_mq_notify
00003a00 T __wrap_mq_open
00003d58 T __wrap_mq_receive
00003c30 T __wrap_mq_send
00003bcc T __wrap_mq_setattr
00003dec T __wrap_mq_timedreceive
00003cc4 T __wrap_mq_timedsend
00003b20 T __wrap_mq_unlink
000045b8 T __wrap_munmap
00003584 T __wrap_nanosleep
0000481c T __wrap_open
000035f8 T __wrap_pthread_condattr_destroy
00003638 T __wrap_pthread_condattr_getclock
000036c0 T __wrap_pthread_condattr_getpshared
000035b8 T __wrap_pthread_condattr_init
0000367c T __wrap_pthread_condattr_setclock
00003704 T __wrap_pthread_condattr_setpshared
000039c0 T __wrap_pthread_cond_broadcast
0000378c T __wrap_pthread_cond_destroy
00003748 T __wrap_pthread_cond_init
00003984 T __wrap_pthread_cond_signal
000038c4 T __wrap_pthread_cond_timedwait
0000380c T __wrap_pthread_cond_wait
00002b08 T __wrap_pthread_create
000029b4 T __wrap_pthread_getschedparam
00003f08 T __wrap_pthread_mutexattr_destroy
00003fd0 T __wrap_pthread_mutexattr_getprotocol
00004058 T __wrap_pthread_mutexattr_getpshared
00003f48 T __wrap_pthread_mutexattr_gettype
00003ec8 T __wrap_pthread_mutexattr_init
00004014 T __wrap_pthread_mutexattr_setprotocol
0000409c T __wrap_pthread_mutexattr_setpshared
00003f8c T __wrap_pthread_mutexattr_settype
00004124 T __wrap_pthread_mutex_destroy
000040e0 T __wrap_pthread_mutex_init
00004164 T __wrap_pthread_mutex_lock
000041a8 T __wrap_pthread_mutex_timedlock
000041f4 T __wrap_pthread_mutex_trylock
00004234 T __wrap_pthread_mutex_unlock
000028d8 T __wrap_pthread_setschedparam
00002c68 T __wrap_pthread_yield
00004d1c T __wrap_read
000050d4 T __wrap_recv
00004a04 T __wrap_recvfrom
00004e84 T __wrap_recvmsg
00002c1c T __wrap_sched_yield
00003324 T __wrap_sem_close
00003004 T __wrap_sem_destroy
000031fc T __wrap_sem_getvalue
00002fa4 T __wrap_sem_init
00003258 T __wrap_sem_open
00003058 T __wrap_sem_post
00003128 T __wrap_sem_timedwait
000031ac T __wrap_sem_trywait
000033a8 T __wrap_sem_unlink
000030ac T __wrap_sem_wait
000051b8 T __wrap_send
00004f38 T __wrap_sendmsg
00004fe8 T __wrap_sendto
00005348 T __wrap_setsockopt
00004274 T __wrap_shm_open
0000430c T __wrap_shm_unlink
00004b1c T __wrap_shutdown
00004938 T __wrap_socket
00002dd0 T __wrap_timer_create
00002e34 T __wrap_timer_delete
00002f4c T __wrap_timer_getoverrun
00002ef0 T __wrap_timer_gettime
00002e84 T __wrap_timer_settime
00004dd0 T __wrap_write
00002454 t xeno_handle_mlock_alert
0000dde0 V xeno_sigxcpu_no_mlockQuoted 17 lines · Gilles Chanteperdrix
Quoted 8 lines · Perrine Martignoni
I tried to put
essai_mutex.cbefore the flags but it's the same thing.It compiles with no problem, and after when I want to launch it on my board I have the error about
__real_sem_init.I noticed that with cyclictest it's the same. When I want to launch the application, I have the same error :
can't resolve symbol '__real_sem_init'
__real_sem_initshould be defined by wrappers.o in libpthread_rt.so, what does nm libpthread_rt.so say ?--
Gilles Chanteperdrix
Quoted 29 lines · Perrine Martignoni
Quoted 2 lines
__real_sem_initshould be defined by wrappers.o in libpthread_rt.so, what does nm libpthread_rt.so say ?Here is the result of nm libpthread_rt.so :
U
__real_accept
U__real_bind
U__real_close
U__real_connect
U__real_ftruncate
U__real_getpeername
U__real_getsockname
U__real_getsockopt
U__real_ioctl
U__real_listen
U__real_mmap
U__real_munmap
U__real_open
U__real_pthread_create
U__real_pthread_getschedparam
U__real_pthread_setschedparam
U__real_read
U__real_recv
U__real_recvfrom
U__real_recvmsg
U__real_sched_yield
U__real_sem_destroy
U__real_sem_init
U__real_sem_post
Quoted 8 lines
U
__real_sem_wait
U__real_send
U__real_sendmsg
U__real_sendto
U__real_setsockopt
U__real_shutdown
U__real_socket
U__real_write
Looks like wrappers.c is missing. Could you show us the command line used when xenomai builds libpthread_rt.so ?
Signature · 1 line
Gilles Chanteperdrix.
Quoted 19 lines · Jan Kiszka
Quoted 18 lines · Wolfgang Grandegger
Quoted 5 lines · Jan Kiszka
Quoted 4 lines · Perrine Martignoni
Quoted 4 lines
Perrine, did you happen to configure Xenomai with "configure --host=arm ..."? If yes (see config.log), please use "--host=arm-linux". This solved all issues for me.
Quoted 8 lines
Quoted 5 lines
Quoted 1 line
Awaiting your feedback!
I configure Xenomai with --host=arm.
I tried to configure like this but it doesn't work :./configure --build=arm-linux --host=arm-linux CC=arm-linux-gcc
^^^^^^^^^I guess you are not compiling Xenomai _on_ an ARM box, are you? :) Try --build=i686-linux here.
Or just omit it. Also CC=, CXX=, LD= ist not necessary. For PowerPC with the ELDK, I just use
./configure --host=ppc-linux
Quoted 8 lines
Quoted 1 line
to configure Xenomai.
Can we define a common ground for this in README.INSTALL, for all archs? The simpler, the better.
I was heavily misled by the PPC section, because I do not cross-compile everyday, thus had to look up the procedure again and managed to pick the bad example...
I had a closer look and realized, that passing just CC, CXX and LD to the configure script is not enough. There should at least also AR and RANLIB, otherwise the corresponding host tools are used. Then I think, it should be equivalent to automatic tool assignment via --host.
Also note, that "--host=arm" will also work with the ELDK, because there are links arm-* to the tools arm-linux-*. I Perrine's configure examples above, arm-ar and arm-ranlib will then be used.
FYI, I have also asked the authors of the ELDK to have a closer look to the mentioned build problems with the uClibc versions of the ELDK.
Wolfgang.
Quoted 31 lines · Wolfgang Grandegger
Quoted 21 lines · Jan Kiszka
Quoted 20 lines · Wolfgang Grandegger
Quoted 6 lines · Jan Kiszka
Quoted 5 lines · Perrine Martignoni
Quoted 5 lines
Perrine, did you happen to configure Xenomai with "configure --host=arm
..."? If yes (see config.log), please use "--host=arm-linux". This solved all issues for me.Quoted 8 lines
Quoted 5 lines
Quoted 1 line
Awaiting your feedback!
I configure Xenomai with --host=arm.
I tried to configure like this but it doesn't work :./configure --build=arm-linux --host=arm-linux CC=arm-linux-gcc
^^^^^^^^^I guess you are not compiling Xenomai _on_ an ARM box, are you? :) Try --build=i686-linux here.
Or just omit it. Also CC=, CXX=, LD= ist not necessary. For PowerPC with the ELDK, I just use
./configure --host=ppc-linuxQuoted 8 lines
Quoted 1 line
to configure Xenomai.
Can we define a common ground for this in README.INSTALL, for all archs? The simpler, the better.
I was heavily misled by the PPC section, because I do not cross-compile everyday, thus had to look up the procedure again and managed to pick the bad example...
Quoted 8 lines
I had a closer look and realized, that passing just CC, CXX and LD to the configure script is not enough. There should at least also AR and RANLIB, otherwise the corresponding host tools are used. Then I think, it should be equivalent to automatic tool assignment via --host.
Also note, that "--host=arm" will also work with the ELDK, because there are links arm-* to the tools arm-linux-*. I Perrine's configure examples above, arm-ar and arm-ranlib will then be used.
But the issue is that in this case configure is unable to find the target OS and fails to detect that shared libs are supported for the target. Non-shared build fails with ELDK for unknown reasons.
Jan
Quoted 35 lines · Jan Kiszka
Quoted 34 lines · Wolfgang Grandegger
Quoted 21 lines · Jan Kiszka
Quoted 20 lines · Wolfgang Grandegger
Quoted 6 lines · Jan Kiszka
Quoted 5 lines · Perrine Martignoni
Quoted 5 lines
Perrine, did you happen to configure Xenomai with "configure --host=arm
..."? If yes (see config.log), please use "--host=arm-linux". This solved all issues for me.Quoted 8 lines
Quoted 5 lines
Quoted 1 line
Awaiting your feedback!
I configure Xenomai with --host=arm.
I tried to configure like this but it doesn't work :./configure --build=arm-linux --host=arm-linux CC=arm-linux-gcc
^^^^^^^^^I guess you are not compiling Xenomai _on_ an ARM box, are you? :) Try --build=i686-linux here.
Or just omit it. Also CC=, CXX=, LD= ist not necessary. For PowerPC with the ELDK, I just use
./configure --host=ppc-linuxQuoted 7 lines
Quoted 1 line
to configure Xenomai.
Can we define a common ground for this in README.INSTALL, for all archs? The simpler, the better.
I was heavily misled by the PPC section, because I do not cross-compile everyday, thus had to look up the procedure again and managed to pick the bad example...
I had a closer look and realized, that passing just CC, CXX and LD to the configure script is not enough. There should at least also AR and RANLIB, otherwise the corresponding host tools are used. Then I think, it should be equivalent to automatic tool assignment via --host.
Quoted 7 lines
Quoted 3 lines
Also note, that "--host=arm" will also work with the ELDK, because there are links arm-* to the tools arm-linux-*. I Perrine's configure examples above, arm-ar and arm-ranlib will then be used.
But the issue is that in this case configure is unable to find the target OS and fails to detect that shared libs are supported for the target. Non-shared build fails with ELDK for unknown reasons.
Why it is unable to find the target OS. Can you provide an example? And non-shared builds only fail with the ARM uClibc toolchain from the ELDK. It builds fine with the normal ARM tool-chain.
Wolfgang.
Quoted 41 lines · Wolfgang Grandegger
Quoted 40 lines · Jan Kiszka
Quoted 38 lines · Wolfgang Grandegger
Quoted 21 lines · Jan Kiszka
Quoted 20 lines · Wolfgang Grandegger
Quoted 6 lines · Jan Kiszka
Quoted 5 lines · Perrine Martignoni
Quoted 5 lines
Perrine, did you happen to configure Xenomai with "configure --host=arm
..."? If yes (see config.log), please use "--host=arm-linux". This solved all issues for me.Quoted 8 lines
Quoted 5 lines
Quoted 1 line
Awaiting your feedback!
I configure Xenomai with --host=arm.
I tried to configure like this but it doesn't work :./configure --build=arm-linux --host=arm-linux CC=arm-linux-gcc
^^^^^^^^^I guess you are not compiling Xenomai _on_ an ARM box, are you? :) Try --build=i686-linux here.
Or just omit it. Also CC=, CXX=, LD= ist not necessary. For PowerPC with the ELDK, I just use
./configure --host=ppc-linuxQuoted 8 lines
Quoted 1 line
to configure Xenomai.
Can we define a common ground for this in README.INSTALL, for all archs?
The simpler, the better.I was heavily misled by the PPC section, because I do not cross-compile everyday, thus had to look up the procedure again and managed to pick the bad example...
I had a closer look and realized, that passing just CC, CXX and LD to the configure script is not enough. There should at least also AR and RANLIB, otherwise the corresponding host tools are used. Then I think, it should be equivalent to automatic tool assignment via --host.
Also note, that "--host=arm" will also work with the ELDK, because there are links arm-* to the tools arm-linux-*. I Perrine's configure examples above, arm-ar and arm-ranlib will then be used.
Quoted 5 lines
Quoted 3 lines
But the issue is that in this case configure is unable to find the target OS and fails to detect that shared libs are supported for the target. Non-shared build fails with ELDK for unknown reasons.
Why it is unable to find the target OS. Can you provide an example? And
Look at the configure script. :o) [This is how I found the reason for the non-shared build.]
Quoted 2 lines
non-shared builds only fail with the ARM uClibc toolchain from the ELDK. It builds fine with the normal ARM tool-chain.
OK, good to know that the issue is confined.
Jan
Quoted 41 lines · Jan Kiszka
Quoted 40 lines · Wolfgang Grandegger
Quoted 39 lines · Jan Kiszka
Quoted 38 lines · Wolfgang Grandegger
Quoted 21 lines · Jan Kiszka
Quoted 20 lines · Wolfgang Grandegger
Quoted 6 lines · Jan Kiszka
Quoted 5 lines · Perrine Martignoni
Quoted 5 lines
Perrine, did you happen to configure Xenomai with "configure --host=arm
..."? If yes (see config.log), please use "--host=arm-linux". This solved all issues for me.Quoted 8 lines
Quoted 5 lines
Quoted 1 line
Awaiting your feedback!
I configure Xenomai with --host=arm.
I tried to configure like this but it doesn't work :./configure --build=arm-linux --host=arm-linux CC=arm-linux-gcc
^^^^^^^^^I guess you are not compiling Xenomai _on_ an ARM box, are you? :) Try --build=i686-linux here.
Or just omit it. Also CC=, CXX=, LD= ist not necessary. For PowerPC with the ELDK, I just use
./configure --host=ppc-linuxQuoted 8 lines
Quoted 1 line
to configure Xenomai.
Can we define a common ground for this in README.INSTALL, for all archs?
The simpler, the better.I was heavily misled by the PPC section, because I do not cross-compile everyday, thus had to look up the procedure again and managed to pick the bad example...
I had a closer look and realized, that passing just CC, CXX and LD to the configure script is not enough. There should at least also AR and RANLIB, otherwise the corresponding host tools are used. Then I think, it should be equivalent to automatic tool assignment via --host.
Also note, that "--host=arm" will also work with the ELDK, because there are links arm-* to the tools arm-linux-*. I Perrine's configure examples above, arm-ar and arm-ranlib will then be used.
Quoted 7 lines
Quoted 4 lines
Quoted 3 lines
But the issue is that in this case configure is unable to find the target OS and fails to detect that shared libs are supported for the target. Non-shared build fails with ELDK for unknown reasons.
Why it is unable to find the target OS. Can you provide an example? And
Look at the configure script. :o) [This is how I found the reason for the non-shared build.]
I'm still unable to reproduce that case, sorry. Could you be please show me the failing configure command. So far, I always got
checking for target architecture... ARM arm-unknown-none arm
Have I missed something?
Quoted 4 lines
Quoted 2 lines
non-shared builds only fail with the ARM uClibc toolchain from the ELDK. It builds fine with the normal ARM tool-chain.
OK, good to know that the issue is confined.
Comparing the output of configure, I see, that probing the following functions fails with arm-uclibc:
ac_cv_func_shm_open=no
ac_cv_func_shm_unlink=no
ac_cv_sched_setaffinity=no
Still investigating...
Wolfgang.
Quoted 54 lines · Wolfgang Grandegger
Quoted 45 lines · Jan Kiszka
Quoted 44 lines · Wolfgang Grandegger
Quoted 43 lines · Jan Kiszka
Quoted 42 lines · Wolfgang Grandegger
Quoted 23 lines · Jan Kiszka
Quoted 16 lines · Wolfgang Grandegger
Quoted 7 lines · Jan Kiszka
Quoted 6 lines · Perrine Martignoni
Quoted 6 lines
Perrine, did you happen to configure Xenomai with "configure --host=arm
..."? If yes (see config.log), please use "--host=arm-linux". This
solved all issues for me.Quoted 8 lines
Quoted 5 lines
Quoted 1 line
Awaiting your feedback!
I configure Xenomai with --host=arm.
I tried to configure like this but it doesn't work :./configure --build=arm-linux --host=arm-linux CC=arm-linux-gcc
^^^^^^^^^I guess you are not compiling Xenomai _on_ an ARM box, are you? :) Try --build=i686-linux here.
Quoted 6 lines
Or just omit it. Also CC=, CXX=, LD= ist not necessary. For PowerPC with the ELDK, I just use
./configure --host=ppc-linuxto configure Xenomai.
Quoted 8 lines
Can we define a common ground for this in README.INSTALL, for all archs?
The simpler, the better.I was heavily misled by the PPC section, because I do not cross-compile
everyday, thus had to look up the procedure again and managed to pick the bad example...I had a closer look and realized, that passing just CC, CXX and LD to the configure script is not enough. There should at least also AR and RANLIB, otherwise the corresponding host tools are used. Then I think, it should be equivalent to automatic tool assignment via --host.
Also note, that "--host=arm" will also work with the ELDK, because there
are links arm-* to the tools arm-linux-*. I Perrine's configure examples
above, arm-ar and arm-ranlib will then be used.Quoted 7 lines
Quoted 4 lines
Quoted 3 lines
But the issue is that in this case configure is unable to find the target OS and fails to detect that shared libs are supported for the target. Non-shared build fails with ELDK for unknown reasons.
Why it is unable to find the target OS. Can you provide an example? And
Look at the configure script. :o) [This is how I found the reason for the non-shared build.]
Quoted 7 lines
I'm still unable to reproduce that case, sorry. Could you be please show me the failing configure command. So far, I always got
checking for target architecture... ARM arm-unknown-none arm
Have I missed something?
No look below if your configure run is able to detect shared-libs support. It shouldn't (how is OS "unknown" supposed to handle dynamic linking?). Thus we fall back to static linking.
Quoted 4 lines
Quoted 4 lines
Quoted 3 lines
non-shared builds only fail with the ARM uClibc toolchain from the ELDK. It builds fine with the normal ARM tool-chain.
Quoted 8 lines
Quoted 1 line
OK, good to know that the issue is confined.
Comparing the output of configure, I see, that probing the following functions fails with arm-uclibc:
ac_cv_func_shm_open=no
ac_cv_func_shm_unlink=no
ac_cv_sched_setaffinity=no
Are those services supported by uClibc? I think they aren't, and Xenomai should already be able to deal with this.
Quoted 5 lines
Still investigating...
Wolfgang.
Jan
Quoted 2 lines
Looks like
wrappers.cis missing. Could you show us the command line used when xenomai builds libpthread_rt.so ?
Yes. it's because of wrappers.c.
It's my fault. I did an experiment.
Now, it works fine.
Thanks a lot
Quoted 61 lines · Wolfgang Grandegger
Quoted 18 lines · Jan Kiszka
Quoted 17 lines · Wolfgang Grandegger
Quoted 16 lines · Jan Kiszka
Quoted 15 lines · Wolfgang Grandegger
Quoted 14 lines · Jan Kiszka
Quoted 10 lines · Perrine Martignoni
Quoted 6 lines
Perrine, did you happen to configure Xenomai with "configure --host=arm
..."? If yes (see config.log), please use "--host=arm-linux". This solved all issues for me.Awaiting your feedback!
I configure Xenomai with --host=arm.
I tried to configure like this but it doesn't work :./configure --build=arm-linux --host=arm-linux CC=arm-linux-gcc
^^^^^^^^^I guess you are not compiling Xenomai _on_ an ARM box, are you? :) Try --build=i686-linux here.
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 6 lines
Or just omit it. Also CC=, CXX=, LD= ist not necessary. For PowerPC with the ELDK, I just use
./configure --host=ppc-linuxto configure Xenomai.
Can we define a common ground for this in README.INSTALL, for all
archs?
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
The simpler, the better.
I was heavily misled by the PPC section, because I do not
cross-compile
Quoted 8 lines
Quoted 8 lines
Quoted 2 lines
everyday, thus had to look up the procedure again and managed to pick the bad example...
I had a closer look and realized, that passing just CC, CXX and LD to the configure script is not enough. There should at least also AR and RANLIB, otherwise the corresponding host tools are used. Then I think, it should be equivalent to automatic tool assignment via --host.
Also note, that "--host=arm" will also work with the ELDK, because
there
Quoted 1 line
Quoted 1 line
are links arm-* to the tools arm-linux-*. I Perrine's configure
examples
Quoted 5 lines
Quoted 1 line
above, arm-ar and arm-ranlib will then be used.
But the issue is that in this case configure is unable to find the target OS and fails to detect that shared libs are supported for the target. Non-shared build fails with ELDK for unknown reasons.
Why it is unable to find the target OS. Can you provide an example? And non-shared builds only fail with the ARM uClibc toolchain from the ELDK. It builds fine with the normal ARM tool-chain.
Wolfgang.
_______________________________________________
Xenomai-help mailing list
[email protected]
https://mail.gna.org/listinfo/xenomai-help
Quoted 9 lines · Perrine Martignoni
Quoted 5 lines
Perrine, did you happen to configure Xenomai with "configure --host=arm ..."? If yes (see config.log), please use "--host=arm-linux". This solved all issues for me.
Awaiting your feedback!
I configure Xenomai with --host=arm.
I tried to configure like this but it doesn't work :
Quoted 13 lines
./configure --build=arm-linux --host=arm-linux CC=arm-linux-gcc CXX=arm-linux-g++ LD=arm-linux-ld --prefix=/usr/xenomai_arm-2.3.1uClibc/ --enable-posix-auto-mlockall
checking build system type... arm-unknown-linux-gnu
checking host system type... arm-unknown-linux-gnu
checking for a BSD-compatible install.../usr/bin/install-c checking for arm-linux-gcc... arm-linux-gcc
checking for C compiler default output file name... a.out checking whether the C compiler works... configure: error: cannot run C compiled programs.
If you meant to cross compile, use `--host'.
See `config.log' for more details.
[[email protected] xenomai-2.3.1 ]#
Unless you are actually building on an ARM system, you should either not set --build (config.guess will then be used to guess the architecture) or set it to the effective architecture of your platform (something like i686-linux I presume). If you do not set --build, configure will produce a warning saying that you should set --build instead of --host, simply ignore this warning.
Signature · 1 line
Gilles Chanteperdrix
Quoted 2 lines
Could you run ls in
/usr/xenomai_arm-2.3.1uClibc/lib? To see if Xenomai installed libpthread_rt.so or only libpthread_rt.a.
I haven't the libpthread_rt.so, only libpthread_rt.a.
Quoted 2 lines
Also, I wonder what is this space in the libraries directory, did you put a space in xenomai installation directory prefix ?
There is no space in xenomai installation directory.
Quoted 74 lines · Perrine Martignoni
Quoted 6 lines
Perrine, did you happen to configure Xenomai with "configure --host=arm ..."? If yes (see config.log), please use "--host=arm-linux". This solved all issues for me.
Awaiting your feedback!
I configure Xenomai with --host=arm.
I tried to configure like this but it doesn't work :./configure --build=arm-linux --host=arm-linux CC=arm-linux-gcc CXX=arm-linux-g++ LD=arm-linux-ld --prefix=/usr/xenomai_arm-2.3.1uClibc/ --enable-posix-auto-mlockall
checking build system type... arm-unknown-linux-gnu
checking host system type... arm-unknown-linux-gnu
checking for a BSD-compatible install.../usr/bin/install-c checking for arm-linux-gcc... arm-linux-gcc
checking for C compiler default output file name... a.out checking whether the C compiler works... configure: error: cannot run C compiled programs.
If you meant to cross compile, use `--host'.
See `config.log' for more details.
[[email protected] xenomai-2.3.1 ]#Quoted 47 lines · Daniel Schnell
I checked README.INSTALL for the ppc part and there the documentation is also wrong.
I think I have to reinstall Xenomai now and take out the Wl,--start-group in our make files ...
Very interesting thread.
Best regards,
Daniel.
-----Original Message-----
From: [email protected] [mailto: [email protected]] On Behalf Of Jan Kiszka
Sent: 31. maí 2007 09:05
To: Perrine Martignoni
Cc: [email protected]
Subject: Re: [Xenomai-help] Xenomai with µClibcQuoted 11 lines · Jan Kiszka
I noticed that linking like this
arm-linux-gcc ...<flags> <object>.o -lpthread -lrt -lpthread_rt ...
doesn't raise the error. But linking like this
arm-linux-gcc
xeno-config --posix-ldflags<object>.o -o <target>ie. the standard way for external Xenomai POSIX apps, causes even more problems with this toolchain (it's fine here for native builds). Anyone any comments? Maybe Wolfgang?
Reason found, I think. No ELDK issue, rather a bug in Xenomai's README.INSTALL:
Perrine, did you happen to configure Xenomai with "configure --host=arm ..."? If yes (see config.log), please use "--host=arm-linux". This solved all issues for me.
Awaiting your feedback!
Jan