All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
To: Vikram Dhillon <dhillonv10@domain.hid>
Cc: xenomai@xenomai.org
Subject: Re: [Xenomai-help] Userland-compile error
Date: Tue, 08 May 2012 17:32:56 +0200	[thread overview]
Message-ID: <4FA93CA8.3040305@domain.hid> (raw)
In-Reply-To: <CAJ7NaH-mLaPVMGJS9cUM3XwAGay_SwygXBmK7VZQMoYcO1=EaA@mail.gmail.com>

On 05/08/2012 05:13 AM, Vikram Dhillon wrote:
> Hi all,
> 
> I recently compiled and installed a xenomai patched kernel but I am
> currently having some issues compiling sample code that came with the
> xenomai kernel. So here's what is happening:
> 
> =================================================================================================
> root@domain.hid# make
> XENO=/usr/xenomai/ KSRC=/usr/src/linux-2.6.38.8-xenomai/
> --xeno-cflags is deprecated, use --skin=name --cflags instead
> --xeno-ldflags is deprecated, use --skin=name --ldflags instead
> gcc -DCONSUMER -I/usr/xenomai/include -D_GNU_SOURCE -D_REENTRANT -Wall
> -Werror-implicit-function-declaration -pipe -D__XENO__
> -I/usr/xenomai/include/posix    -Wl,@/usr/xenomai/lib/posix.wrappers
> -L/usr/xenomai/lib -lpthread_rt -lxenomai -lpthread -lrt   -Xlinker
> -rpath -Xlinker /usr/xenomai/lib  satch.c   -o satch
> /usr/bin/ld: /tmp/ccLV0g8I.o: undefined reference to symbol
> 'pthread_cancel@domain.hid'
> /usr/bin/ld: note: 'pthread_cancel@domain.hid' is defined in DSO
> /lib/i386-linux-gnu/libpthread.so.0 so try adding it to the linker
> command line
> /lib/i386-linux-gnu/libpthread.so.0: could not read symbols: Invalid operation
> collect2: ld returned 1 exit status
> make: *** [satch] Error 1
> =================================================================================================

This is a strange error, are you sure you are not mixing a 64 bits
toolchain with 32 bits libraries? Did xenomai compilation run correctly
otherwise? Do xenomai tests run, such as latency for instance?

> 
> 
> Linker issue here, the program satch in posix directory won't compile,
> first change in the posix makefile:
> =================================================================================================
> CFLAGS=-DCONSUMER $(shell $(XENOCONFIG) --skin=posix --cflags) $(APP_CFLAGS)
> LDFLAGS=$(shell $(XENOCONFIG) --skin=posix --ldflags) $(APP_LDFLAGS)
> =================================================================================================
> 
> 
> Then, the program still doesn't compile so I actually had to remove
> the lpthread switch in compiling:
> =================================================================================================
> vikram@domain.hid$ gcc -DCONSUMER
> -I/usr/xenomai/include -D_GNU_SOURCE -D_REENTRANT -Wall
> -Werror-implicit-function-declaration -pipe -D__XENO__
> -I/usr/xenomai/include/posix   -Wl,@/usr/xenomai/lib/posix.wrappers
> -L/usr/xenomai/lib -lpthread_rt -lxenomai -lrt   -Xlinker -rpath
> -Xlinker /usr/xenomai/lib  satch.c   -o satch
> vikram@domain.hid$ ls
> Makefile  Makefile~  README  satch  satch.c
> vikram@domain.hid$ ./satch
> Xenomai: binding failed: Operation not permitted.
> =================================================================================================
> 
> Can anyone tell me what is causing the issue here? Thanks!

This one usually means that you are not running the example as root user.

> 
> - Vikram
> 
> _______________________________________________
> Xenomai-help mailing list
> Xenomai-help@domain.hid
> https://mail.gna.org/listinfo/xenomai-help
> 


-- 
                                                                Gilles.


  reply	other threads:[~2012-05-08 15:32 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-08  3:13 [Xenomai-help] Userland-compile error Vikram Dhillon
2012-05-08 15:32 ` Gilles Chanteperdrix [this message]
2012-05-08 16:23   ` Vikram Dhillon
2012-05-08 17:17     ` Gilles Chanteperdrix
2012-05-08 17:34       ` Vikram Dhillon
2012-05-08 17:36         ` Gilles Chanteperdrix
2012-05-08 17:40         ` 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=4FA93CA8.3040305@domain.hid \
    --to=gilles.chanteperdrix@xenomai.org \
    --cc=dhillonv10@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.