Hi,
     I am facing problem running Xenomai test programs and it gives me following error.
>clocktest
>/usr/xenomai/bin/clocktest: error while loading shared libraries: /usr/xenomai/lib/libpthread_rt.so.1: ELF file OS ABI invalid

similar error is seen when I try to run latency or any other Xenomai test program.

I am using Xenomai 2.5.6 patched to Kernel 2.6.37. When I do uname and dmesg following are the output

>uname -a
Linux (none) 2.6.37-ipipe #2 SMP PREEMPT Mon May 30 15:28:24 IST 2011 i686 unknown

>dmesg | grep I-pipe
[    0.000] I-pipe 2.9-0: pipeline enabled.
[    2.330] I-pipe: Domain Xenomai registered.

>dmesg | grep Xenomai
[    2.330] I-pipe: Domain Xenomai registered.
[    2.336] Xenomai: hal/i36 started.
[    2.339] Xenomai: scheduling class idle registered.
[    2.330] Xenomai: scheduling class rt registered.
[    2.302] Xenomai: real-time nucleus v2.5.6 (Wormhole Wizards) loaded.
[    2.307] Xenomai: SMI-enabled chipset found
[    2.309] Xenomai: SMI workaround enabled
[    2.305] Xenomai: starting native API services.
[    2.306] Xenomai: starting POSIX services.
[    2.302] Xenomai: starting RTDM services.

What I tried-
- Tried setting LD_LIBRARY_PATH=/usr/xenomai/lib/
- Tried rebuilding xenomai with
     --enable-x86-sep --enable-smp --host=i686-linux CFLAGS="-m32 -O2" LDFLAGS="-m32" option
    and also only --enable-x86-sep --enable-smp options
- Tried building and running 'rtprint' example program and had same error.
- Tried to statically link the 'rtprint' example program and got following error

gcc -static -I/media/New1/Linux/xenomai/install/usr/xenomai/include -D_GNU_SOURCE -Wall -pipe -D__XENO__ -L/media/New1/Linux/xenomai/install/usr/xenomai/lib -Xlinker -rpath -Xlinker /media/New1/Linux/xenomai/install/usr/xenomai/lib -o rtprint rtprint.o -lnative -lxenomai -lpthread_rt -lrtdk
/usr/bin/ld: cannot find -lc
collect2: ld returned 1 exit status
make: *** [rtprint] Error 1

Please help me to solve this problem.

Thanks & Best regards,
Sanjay