All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@domain.hid>
To: Perrine Martignoni <perrmart@domain.hid>
Cc: xenomai@xenomai.org
Subject: Re: [Xenomai-help] Xenomai with µClibc
Date: Wed, 30 May 2007 13:55:58 +0200	[thread overview]
Message-ID: <465D664E.3040700@domain.hid> (raw)
In-Reply-To: <7289437c0705300051i2634264avc5f2db1fcdb91da8@domain.hid>

[-- Attachment #1: Type: text/plain, Size: 4368 bytes --]

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
> 

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


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 250 bytes --]

  parent reply	other threads:[~2007-05-30 11:55 UTC|newest]

Thread overview: 50+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-28 13:15 [Xenomai-help] Xenomai with µClibc Fillod Stephane
2007-05-28 13:38 ` Gilles Chanteperdrix
2007-05-28 13:51   ` Philippe Gerum
2007-05-29  8:30     ` Perrine Martignoni
2007-05-29  8:42       ` Gilles Chanteperdrix
2007-05-29 10:47         ` Perrine Martignoni
2007-05-29 16:58           ` Gilles Chanteperdrix
2007-05-29 17:27           ` Jan Kiszka
2007-05-29 18:18             ` Gilles Chanteperdrix
2007-05-30  5:57               ` Perrine Martignoni
2007-05-30  7:51                 ` Perrine Martignoni
2007-05-30  8:05                   ` Jan Kiszka
2007-05-30  9:10                     ` Perrine Martignoni
2007-05-30  9:21                       ` Daniel Schnell
2007-05-30  9:28                         ` Gilles Chanteperdrix
2007-05-30  9:40                           ` Daniel Schnell
2007-05-30  9:43                             ` Gilles Chanteperdrix
2007-05-31  9:08                       ` Gilles Chanteperdrix
2007-05-30 11:55                   ` Jan Kiszka [this message]
2007-05-31  9:04                     ` Jan Kiszka
2007-05-31 10:40                       ` Daniel Schnell
2007-05-31 12:58                         ` Perrine Martignoni
2007-05-31 13:04                           ` Jan Kiszka
2007-05-31 13:14                             ` Perrine Martignoni
2007-05-31 13:30                             ` Wolfgang Grandegger
2007-05-31 13:38                               ` Jan Kiszka
2007-05-31 13:45                                 ` Perrine Martignoni
2007-05-31 13:58                                   ` Jan Kiszka
2007-05-31 14:13                                 ` Wolfgang Grandegger
2007-05-31 14:58                                   ` Perrine Martignoni
2007-05-31 15:03                                     ` Gilles Chanteperdrix
2007-05-31 15:33                                       ` Perrine Martignoni
     [not found]                                         ` <465EEDC3.6040309@domain.hid>
2007-06-01  7:17                                           ` Perrine Martignoni
2007-06-01  7:30                                             ` Gilles Chanteperdrix
2007-06-01  8:26                                 ` Wolfgang Grandegger
2007-06-01  8:48                                   ` Jan Kiszka
2007-06-01  9:09                                     ` Wolfgang Grandegger
2007-06-01  9:11                                       ` Jan Kiszka
2007-06-01 14:46                                         ` Wolfgang Grandegger
2007-06-01 14:45                                           ` Jan Kiszka
2007-06-01  9:11                                       ` Perrine Martignoni
2007-05-31 13:04                           ` Gilles Chanteperdrix
2007-05-31 13:05                           ` Perrine Martignoni
  -- strict thread matches above, loose matches on Subject: below --
2007-05-28  7:43 Perrine Martignoni
2007-05-28  8:49 ` Philippe Gerum
2007-05-28  9:03   ` Gilles Chanteperdrix
2007-05-28  9:12     ` Philippe Gerum
2007-05-28 12:57       ` Perrine Martignoni
2007-05-28 13:17         ` Philippe Gerum
2007-05-28 13:21         ` Gilles Chanteperdrix

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=465D664E.3040700@domain.hid \
    --to=jan.kiszka@domain.hid \
    --cc=perrmart@domain.hid \
    --cc=xenomai@xenomai.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.