All of lore.kernel.org
 help / color / mirror / Atom feed
From: Per Oberg <pero@wolfram.com>
To: xenomai <xenomai@xenomai.org>
Subject: Re: [Xenomai] Order options to build a Xenomai program
Date: Fri, 14 Sep 2018 02:45:28 -0500 (CDT)	[thread overview]
Message-ID: <285343492.3950889.1536911128629.JavaMail.zimbra@wolfram.com> (raw)
In-Reply-To: <4078e730-9293-12b4-e3c2-843f0de5f637@alaxarxa.net>


----- Den 13 sep 2018, på kl 23:36, Leopold Palomo-Avellaneda leo@alaxarxa.net skrev:

> Hi,

> El 13/09/18 a les 14:42, Lange Norbert ha escrit:

>> link order is important and goes left-to-right, this seems to include
> > "wrappers",
>> which only wrap symbols that where already encountered (to the left of the
> > wrapper argument)

> [...]

>> The call to malloc is wrapped to __wrap_malloc and __real_malloc is wrapped to
> > malloc,
> > since there is no object file yet, this does nothing.
>> libmodechk exports __wrap_malloc and __real_malloc, yet no one cares and
> > --as-needed
> > will remove it as dependency
> > The app objects depend on malloc.

> > I am not sure where your dependency to __real_malloc comes from, but I suppose
>> It's from the bootstrap code, which would be needed to be linked before the
> > wrapper.
> > Probably weak dependencies further complicate things.

> I think that you got the point!!

> So, from my point of view it confirm my suspicious that the wrapper
> mechanism is fragile. I really didn't understand why Xenomai core team
> changed the native API for the POSIX. Although I saw the Jan Kiska
> conference video explaining it, tell me primitive or dump, but I prefer
> to have a RT API that links against RT libraries and you can mix the
> POSIX functions that you want in a clear way.

> OTOH I have to admit that convert a POSIX program to RT in an easy way
> is amazing.


This! 

Being able to use the same code, without patches or a lot of defines including other files is a very clean way of debugging your software. I often set up Simulations where I use my laptop running or our controller, possibly connected to remote hardware to debug stuff. For these cases  the POSIX skin is very useful.

> > As noted by Henning, please look at https://github.com/nolange/cmake_xenomai,
> > could use some feedback =).
> > Particularly look at the patchset which also removes some headaches with linking
> > precompiled object file for bootstrapping (but needs some upstream changes).

> Norbert, I have followed your emails and your project. You did a good
> job, but I don't agree with your approach. My points are:

> - You are trying to convert Xenomai a CMake project and this probably
> will not happen because Upstream is very happy with the autotools. I
> don't like to touch anything from upstream. Maybe some patch, but
> incorporated in Upstream.

What do you mean with "convert Xenomai a CMake project"? I feel that I am missing something...

Is it simply that  the "xeno-config" way of doing things isn't cmak-onic enough for a "real" CMake project or is there something deeper?

> - I would prefer follow the Upstream guidelines that recommends use
> xeno-config to obtain the needed parameters to build your application.
> So, any build tool should use xeno-config (maintained by upstream) that
> provide the correct flags or whatever to build your application.

> - I agree with Norbert that bootstraped code is not a good idea. But
> this change should be done by upstream. But if I'm not wrong, Phillipe
> said that it hasn't an easy solution.

> But for the curious, I have done this example:

> https://github.com/iocroblab/xenomai-cmake

> but it's not polished and had some mistakes. The idea is to use any
> Xenomai installation without touched and then use CMake to build your
> application.

> Cheers,

> Leopold

> --
> --
> Linux User 152692 GPG: 05F4A7A949A2D9AA
> Catalonia
> -------------------------------------
> A: Because it messes up the order in which people normally read text.
> Q: Why is top-posting such a bad thing?
> A: Top-posting.
> Q: What is the most annoying thing in e-mail?

> _______________________________________________
> Xenomai mailing list
> Xenomai@xenomai.org
> https://xenomai.org/mailman/listinfo/xenomai

Thanks,
Per Öberg 


  reply	other threads:[~2018-09-14  7:45 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-06  9:52 [Xenomai] Order options to build a Xenomai program Leopold Palomo-Avellaneda
2018-09-13  8:54 ` Henning Schild
2018-09-13  9:17   ` Per Oberg
2018-09-13 12:42 ` Lange Norbert
2018-09-13 21:36   ` Leopold Palomo-Avellaneda
2018-09-14  7:45     ` Per Oberg [this message]
2018-09-14  8:22       ` Julien Blanc
2018-09-14 13:54       ` Leopold Palomo-Avellaneda
2018-09-14  9:14     ` Lange Norbert
2018-09-14 12:19       ` Giulio Moro
2018-09-14 14:16       ` Leopold Palomo-Avellaneda
2018-09-14 16:03         ` Lange Norbert

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=285343492.3950889.1536911128629.JavaMail.zimbra@wolfram.com \
    --to=pero@wolfram.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.