All of lore.kernel.org
 help / color / mirror / Atom feed
* [Xenomai] cross compiling xenomai application
@ 2015-01-01 14:35 JAY KOTHARI
  2015-01-01 14:43 ` Gilles Chanteperdrix
  0 siblings, 1 reply; 2+ messages in thread
From: JAY KOTHARI @ 2015-01-01 14:35 UTC (permalink / raw)
  To: xenomai

Hi,
    I am trying to cross compile xenomai user space application with this
command for Beagle Bone Black

arm-linux-gnueabihf-gcc -I/usr/xenomai/include -I/usr/xenomai -D_GNU_SOURCE
-D_REENTRANT -D__XENO__ -lnative -L/usr/xenomai/lib -L/usr/xenomai/
-lxenomai -lpthread -lrt -Xlinker -rpath -Xlinker /usr/xenomai/lib
1_trivial-periodic.c -o 1_trivial-periodic -lnative -lpthread -lxenomai

But I am facing linking error as follows


 In file included from /usr/xenomai/include/nucleus/trace.h:53:0,

from /usr/xenomai/include/nucleus/system.h:27,

from /usr/xenomai/include/asm/xenomai/system.h:128,

from /usr/xenomai/include/nucleus/types.h:36,

from /usr/xenomai/include/nucleus/thread.h:25,

from /usr/xenomai/include/nucleus/sched.h:31,

from /usr/xenomai/include/native/task.h:25,

from 1_trivial-periodic.c:6:

/usr/xenomai/include/asm/xenomai/tsc.h: In function ‘__xn_rdtsc’:

/usr/xenomai/include/asm/xenomai/tsc.h:37:2: warning: left shift count >=
width of type [enabled by default]

return ((unsigned long)__a) | (((unsigned long)__d) << 32);

^

/opt/gcc-linaro-arm-linux-gnueabihf-4.8-2014.04_linux/bin/../lib/gcc/arm-linux-gnueabihf/4.8.3/../../../../arm-linux-gnueabihf/bin/ld:
skipping incompatible /usr/xenomai/lib/libnative.so when searching for
-lnative

/opt/gcc-linaro-arm-linux-gnueabihf-4.8-2014.04_linux/bin/../lib/gcc/arm-linux-gnueabihf/4.8.3/../../../../arm-linux-gnueabihf/bin/ld:
skipping incompatible /usr/xenomai/lib/libnative.a when searching for
-lnative

/opt/gcc-linaro-arm-linux-gnueabihf-4.8-2014.04_linux/bin/../lib/gcc/arm-linux-gnueabihf/4.8.3/../../../../arm-linux-gnueabihf/bin/ld:
cannot find -lnative

/opt/gcc-linaro-arm-linux-gnueabihf-4.8-2014.04_linux/bin/../lib/gcc/arm-linux-gnueabihf/4.8.3/../../../../arm-linux-gnueabihf/bin/ld:
skipping incompatible /usr/xenomai/lib/libxenomai.so when searching for
-lxenomai

/opt/gcc-linaro-arm-linux-gnueabihf-4.8-2014.04_linux/bin/../lib/gcc/arm-linux-gnueabihf/4.8.3/../../../../arm-linux-gnueabihf/bin/ld:
skipping incompatible /usr/xenomai/lib/libxenomai.a when searching for
-lxenomai

/opt/gcc-linaro-arm-linux-gnueabihf-4.8-2014.04_linux/bin/../lib/gcc/arm-linux-gnueabihf/4.8.3/../../../../arm-linux-gnueabihf/bin/ld:
cannot find -lxenomai

collect2: error: ld returned 1 exit status



Can anyone help me who had faced similar problem.What might be I am
missing?Help would be Appreciated.
Thank You

Jay Kothari

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [Xenomai] cross compiling xenomai application
  2015-01-01 14:35 [Xenomai] cross compiling xenomai application JAY KOTHARI
@ 2015-01-01 14:43 ` Gilles Chanteperdrix
  0 siblings, 0 replies; 2+ messages in thread
From: Gilles Chanteperdrix @ 2015-01-01 14:43 UTC (permalink / raw)
  To: JAY KOTHARI; +Cc: xenomai

On Thu, Jan 01, 2015 at 08:05:32PM +0530, JAY KOTHARI wrote:
> Hi,
>     I am trying to cross compile xenomai user space application with this
> command for Beagle Bone Black
> 
> arm-linux-gnueabihf-gcc -I/usr/xenomai/include -I/usr/xenomai -D_GNU_SOURCE
> -D_REENTRANT -D__XENO__ -lnative -L/usr/xenomai/lib -L/usr/xenomai/
> -lxenomai -lpthread -lrt -Xlinker -rpath -Xlinker /usr/xenomai/lib
> 1_trivial-periodic.c -o 1_trivial-periodic -lnative -lpthread -lxenomai
> 
> But I am facing linking error as follows
> 
> 
>  In file included from /usr/xenomai/include/nucleus/trace.h:53:0,
> 
> from /usr/xenomai/include/nucleus/system.h:27,
> 
> from /usr/xenomai/include/asm/xenomai/system.h:128,
> 
> from /usr/xenomai/include/nucleus/types.h:36,
> 
> from /usr/xenomai/include/nucleus/thread.h:25,
> 
> from /usr/xenomai/include/nucleus/sched.h:31,
> 
> from /usr/xenomai/include/native/task.h:25,
> 
> from 1_trivial-periodic.c:6:
> 
> /usr/xenomai/include/asm/xenomai/tsc.h: In function ‘__xn_rdtsc’:
> 
> /usr/xenomai/include/asm/xenomai/tsc.h:37:2: warning: left shift count >=
> width of type [enabled by default]
> 
> return ((unsigned long)__a) | (((unsigned long)__d) << 32);

This __xn_drtsc is the one for the x86_64 architecture, not for the ARM
architecture. So, what you have in fact done is install xenomai on
your x86_64 host, and using that installation to compile arm code.
This can not work.

How to install Xenomai in cross-compiled environment is thoroughly
documented in Xenomai installation instructions.

-- 
					    Gilles.


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-01-01 14:43 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-01 14:35 [Xenomai] cross compiling xenomai application JAY KOTHARI
2015-01-01 14:43 ` Gilles Chanteperdrix

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.