All of lore.kernel.org
 help / color / mirror / Atom feed
From: Philippe Gerum <rpm@xenomai.org>
To: Danilo De Lorenzo <danilo.delorenzo@mail.polimi.it>
Cc: Xenomai@xenomai.org
Subject: Re: [Xenomai] error on building xddp-echo example
Date: Thu, 19 Jul 2012 21:21:46 +0200	[thread overview]
Message-ID: <50085E4A.3090306@xenomai.org> (raw)
In-Reply-To: <CAHpmwf_XO1G=6fMiddivbG+ud0FZqjh6_sp0V=zEv+mstOKorQ@mail.gmail.com>

On 07/19/2012 07:18 PM, Danilo De Lorenzo wrote:
> I'm getting this error when compiling the examples in the ipc folder
> 
> gcc -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   -lrtdm -Xlinker -rpath -Xlinker
> /usr/xenomai/lib  xddp-echo.c   -o xddp-echo
> 
> /usr/bin/ld: /tmp/cc4VCXFp.o: undefined reference to symbol
> 'pthread_sigmask@@GLIBC_2.2.5'
> /usr/bin/ld: note: 'pthread_sigmask@@GLIBC_2.2.5' is defined in DSO
> /lib/x86_64-linux-gnu/libpthread.so.0 so try adding it to the linker
> command line
> /lib/x86_64-linux-gnu/libpthread.so.0: could not read symbols: Invalid
> operation
> collect2: ld returned 1 exit status
> make: *** [xddp-echo] Error 1
> 
> Is this a xenomai bug or glibc library bug?

Linker wants to see references first, for pulling symbols. Does this help?

diff --git a/examples/rtdm/profiles/ipc/Makefile b/examples/rtdm/profiles/ipc/Makefile
index 15da135..4ea38f0 100644
--- a/examples/rtdm/profiles/ipc/Makefile
+++ b/examples/rtdm/profiles/ipc/Makefile
@@ -39,6 +39,9 @@ CFLAGS=$(shell $(XENOCONFIG) --skin=posix --cflags) $(MY_CFLAGS)
 
 LDFLAGS=$(shell $(XENOCONFIG) --skin=posix --ldflags) $(MY_LDFLAGS) -lrtdm
 
+%: %.c
+	$(CC) -o $@ $< $(CFLAGS) $(LDFLAGS)
+
 # Add the Xenomai libdir to the runtime library search path for the
 # binary, to make life easier for beginners if Xenomai's libs are not
 # in any default search path.

> 
> Thanks
> 
> Danilo
> _______________________________________________
> Xenomai mailing list
> Xenomai@xenomai.org
> http://www.xenomai.org/mailman/listinfo/xenomai
> 


-- 
Philippe.




  parent reply	other threads:[~2012-07-19 19:21 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CAHpmwf8eKDCN-4mzSpsgu64H+Kez_A+NPaqDCWOD8qHnU0oTmw@mail.gmail.com>
2012-07-19 17:18 ` [Xenomai] error on building xddp-echo example Danilo De Lorenzo
2012-07-19 17:37   ` Danilo De Lorenzo
2012-07-19 19:21   ` Philippe Gerum [this message]
2012-07-20  9:19     ` Danilo De Lorenzo
2012-07-21 18:35       ` Philippe Gerum

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=50085E4A.3090306@xenomai.org \
    --to=rpm@xenomai.org \
    --cc=Xenomai@xenomai.org \
    --cc=danilo.delorenzo@mail.polimi.it \
    /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.