All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Cédric Chépied" <cedric.chepied@drotek.com>
To: "Cédric Chépied" <cedric.chepied@drotek.com>
Cc: xenomai@lists.linux.dev
Subject: Re: Posix timer creation failure
Date: Tue, 16 Apr 2024 16:06:05 +0200	[thread overview]
Message-ID: <661e85bd.5d0a0220.a8214.d5f4@mx.google.com> (raw)
In-Reply-To: <661e49af.df0a0220.ffef6.a7bc@mx.google.com>

Cédric Chépied wrote:
> I'm trying to execute a simple posix timer example (see code below). When I
> compile it "normally", it works fine but when I add xeno-config generated flags
> (to add RT tasks later) the create_timer function fails (invalid argument).
>
> Here are compilation flags :
> 
> sdk/sysroots/x86_64-fslcsdk-linux/usr/bin/arm-fslc-linux-gnueabi/arm-fslc-linux-gnueabi-gcc   -mthumb -mfpu=neon -mfloat-abi=hard -mcpu=cortex-a7 -fstack-protector-strong  -O2 -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security --sysroot=sdk/sysroots/cortexa7t2hf-neon-fslc-linux-gnueabi --sysroot=sdk/sysroots/cortexa7t2hf-neon-fslc-linux-gnueabi  -O2 -pipe -g -feliminate-unused-debug-types  -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed  -Wl,-z,relro,-z,now -Wl,--no-as-needed -Wl,@sdk/sysroots/cortexa7t2hf-neon-fslc-linux-gnueabi/usr/lib/modechk.wrappers -lalchemy -lcopperplate sdk/sysroots/cortexa7t2hf-neon-fslc-linux-gnueabi/usr/lib/xenomai/bootstrap.o -Wl,--wrap=main -Wl,--dynamic-list=sdk/sysroots/cortexa7t2hf-neon-fslc-linux-gnueabi/usr/lib/dynlist.ld -Lsdk/sysroots/cortexa7t2hf-neon-fslc-linux-gnueabi/usr/lib -lcobalt -lmodechk -lpthread -lrt -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed -fmacro-prefix-map=/workdir/build/tmp/work/cortexa7t2hf-neon-fslc-linux-gnueabi/xenomai/3.2.4-r0=/usr/src/debug/xenomai/3.2.4-r0 -fdebug-prefix-map=/workdir/build/tmp/work/cortexa7t2hf-neon-fslc-linux-gnueabi/xenomai/3.2.4-r0=/usr/src/debug/xenomai/3.2.4-r0 -fdebug-prefix-map=sdk/sysroots/cortexa7t2hf-neon-fslc-linux-gnueabi= -fdebug-prefix-map=sdk/sysroots/cortexa7t2hf-neon-fslc-linux-gnueabi-native= -Wl,-z,relro,-z,now -Wl,@sdk/sysroots/cortexa7t2hf-neon-fslc-linux-gnueabi/usr/lib/cobalt.wrappers -Wl,@sdk/sysroots/cortexa7t2hf-neon-fslc-linux-gnueabi/usr/lib/cobalt-glibc-time64.wrappers CMakeFiles/timer.dir/timer.c.o -o timer 
> 
 

Wrappers seem to be the problem. When I link without
"-Wl,@sdk/sysroots/cortexa7t2hf-neon-fslc-linux-gnueabi/usr/lib/cobalt.wrappers
-Wl,@sdk/sysroots/cortexa7t2hf-neon-fslc-linux-gnueabi/usr/lib/cobalt-glibc-time64.wrappers",
timers work. But I won't be able to use the rtcan driver (I won't be able to
call ioctl on the socket).

It seems to work by adding "-nostdlib" when linking but then I got "undefined
reference to symbol '__aeabi_unwind_cpp_pr0@@GCC_3.5'".
If I disable exceptions with "-fno-exceptions" it compiles and runs fine. But I
need C++ exceptions for my "real" code.

What is the correct way to fix this ?

Thanks,
-- 
Cédric Chépied
<cedric.chepied@drotek.com>

<http://events.drotek.com/>

      reply	other threads:[~2024-04-16 14:05 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-16  9:49 Posix timer creation failure Cédric Chépied
2024-04-16 14:06 ` Cédric Chépied [this message]

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=661e85bd.5d0a0220.a8214.d5f4@mx.google.com \
    --to=cedric.chepied@drotek.com \
    --cc=xenomai@lists.linux.dev \
    /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.