From: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
To: "Marcin Kuśka" <marckuska@gmail.com>
Cc: xenomai@xenomai.org
Subject: Re: [Xenomai] xenomai-2.6.0 instrumentation commands not executing
Date: Tue, 03 Jul 2012 18:51:58 +0200 [thread overview]
Message-ID: <4FF3232E.3050605@xenomai.org> (raw)
In-Reply-To: <CAHue_TUHtzKZ6g1__=jB-y08TRnnZ93t2zY8+C-MAWy7QhH=Pg@mail.gmail.com>
On 07/03/2012 06:01 PM, Marcin Kuśka wrote:
> I will continue this topic since my problem looks similar.
>
> I'm using linux kernel from *http://git.xenomai.org/ipipe-gch.git/* (ipipe
> core-3.2 ) and xenomai 2.6 branch head. Compiling for versatile express
> cortex-a9.
> I tried to cross-compile a simple program bound_task (can be found in
> documentation as example) but i received this:
>
> *arm-unknown-linux-gnueabi-gcc -I/usr/xenomai/include -D_GNU_SOURCE
> -D_REENTRANT -D__XENO__ -lnative -L/usr/xenomai/lib -lxenomai -lpthread
> -lrt -lrtdk bound_task.c -o bound_task_VEXPRESS
> In file included from /usr/xenomai/include/nucleus/trace.h:52,
> from /usr/xenomai/include/nucleus/system.h:27,
> from /usr/xenomai/include/asm/xenomai/system_64.h:137,
> from /usr/xenomai/include/asm/xenomai/system.h:4,
> 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 bound_task.c:2:
> /usr/xenomai/include/asm/xenomai/syscall.h: In function '__xn_rdtsc':
> /usr/xenomai/include/asm/xenomai/syscall.h:327: warning: left shift count
>> = width of type
> /usr/xenomai/lib/libnative.so: file not recognized: File format not
> recognized
> collect2: ld returned 1 exit status
> make: *** [bound_task] Error 1*
If you have xenomai compiled for x86 in /usr/xenomai/lib, that is
logical. Normally, when you have compiled xenomai for ARM, you run:
make DESTDIR=/some/path install
Then the library directory is /some/path/usr/xenomai/lib
And in order to get the proper flag, you should run:
DESTDIR=/some/path /some/patch/usr/xenomai/bin/xeno-config --skin=native --cflags
same with ldflags for the ldflags.
>
> And as far as I'm concerned that means (the underlined line) that my
> xenomai libraries are not cross-compiled for ARM (which now I assume have
> to be) as well. I know that they are not, cause i omitted the
> README.INSTALL of xenomai and run common *./configure* (which I assume
> compiles xenomai for x86 or smth) instead of *./configure CFLAGS="...."
> LDFLAGS="....." --build=i686-pc-linux-gnu --host=arm-unknown-linux-gnueabi *or
> something similar. So I run the proper configure according to
> README.INSTALL for ARM and this is what i receive:
>
> *# ./configure CFLAGS="-march=armv7-a -mfpu=vfp3 *" LDFLAGS="-march=armv4t"
> --build=i686-pc-linux-gnu --host=arm-unknown-linux-gnueabi
You are compiling with -march=armv7-a and linking with
-march=armv4t, are you sure this is supposed to work?
>
> checking build system type... i686-pc-linux-gnu
> checking host system type... arm-unknown-linux-gnueabi
> checking for a BSD-compatible install... /usr/bin/install -c
> checking for arm-unknown-linux-gnueabi-gcc... arm-unknown-linux-gnueabi-gcc
> checking whether the C compiler works... no
> configure: error: in `/home/marcin/arm/tarballs/xenomai-2.6-5942064':
> configure: error: C compiler cannot create executables
> See `config.log' for more details*
I guess compiling for armv7 and linking for armv4 is not supported...
Anyway, to understand what happens, you can do what is written,
look at config.log.
> *
> *I've already tried the *-fno-omit-frame-pointer *option and the result is
> the same.
>
> As I mentioned I'm compiling for cortex-a9 so the *CFLAGS *should be set as
> omap4 setting? as long there is no cortex-a9 setting described...
> *(CFLAGS="-march=armv7-a
> -mfpu=vfp3 *")
Yes, but the problem is probably the LDFLAGS you added...
--
Gilles.
next prev parent reply other threads:[~2012-07-03 16:51 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-06 7:40 [Xenomai] xenomai-2.6.0 instrumentation commands not executing ali hagigat
2012-06-06 8:30 ` Philippe Gerum
2012-06-06 9:06 ` ali hagigat
2012-06-06 9:11 ` Philippe Gerum
2012-06-06 9:18 ` ali hagigat
2012-06-06 9:48 ` Philippe Gerum
2012-06-06 10:47 ` ali hagigat
2012-06-06 12:06 ` Philippe Gerum
2012-06-06 12:28 ` Philippe Gerum
2012-06-06 13:18 ` Gilles Chanteperdrix
2012-06-06 13:25 ` Philippe Gerum
2012-06-06 13:41 ` Gilles Chanteperdrix
2012-06-06 13:53 ` Philippe Gerum
2012-06-06 13:55 ` Gilles Chanteperdrix
2012-06-06 14:02 ` Gilles Chanteperdrix
2012-06-06 14:27 ` Gilles Chanteperdrix
2012-06-06 14:51 ` Philippe Gerum
2012-06-06 15:03 ` Philippe Gerum
2012-06-06 15:15 ` Gilles Chanteperdrix
2012-06-06 15:21 ` Philippe Gerum
2012-06-06 17:57 ` Gilles Chanteperdrix
2012-06-06 18:00 ` Gilles Chanteperdrix
2012-06-08 9:20 ` Philippe Gerum
2012-06-08 9:25 ` Gilles Chanteperdrix
2012-06-08 9:29 ` Philippe Gerum
2012-06-08 9:31 ` Philippe Gerum
2012-06-08 9:35 ` Gilles Chanteperdrix
2012-06-09 8:59 ` ali hagigat
2012-07-03 16:01 ` Marcin Kuśka
2012-07-03 16:51 ` Gilles Chanteperdrix [this message]
2012-07-06 15:42 ` Marcin Kuśka
2012-07-06 15:48 ` Gilles Chanteperdrix
2012-07-09 15:34 ` Marcin Kuśka
2012-07-09 15:48 ` Christophe Blaess
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=4FF3232E.3050605@xenomai.org \
--to=gilles.chanteperdrix@xenomai.org \
--cc=marckuska@gmail.com \
--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.