From: Lange Norbert Date: Fri, 14 Sep 2018 16:03:44 +0000 Message-ID: References: <28fd59c00f574c5a987ff73d72ffbc4c@andritz.com> <4078e730-9293-12b4-e3c2-843f0de5f637@alaxarxa.net> , <89cbef00-21d4-eba1-2f49-4a1a0b822549@alaxarxa.net> In-Reply-To: <89cbef00-21d4-eba1-2f49-4a1a0b822549@alaxarxa.net> Content-Language: de-AT Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [Xenomai] Order options to build a Xenomai program List-Id: Discussions about the Xenomai project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Leopold Palomo-Avellaneda , "Xenomai@xenomai.org" >>> Norbert, I have followed your emails and your project. You did a good j= ob, >>> but I don't agree with your approach. My points are: >>> >>> - You are trying to convert Xenomai a CMake project and this probably w= ill >>> not happen because Upstream is very happy with the autotools. I don't l= ike >>> to touch anything from upstream. Maybe some patch, but incorporated in >>> Upstream. >> >> Sorry, that's nonsense, never thought about building Xenomai with CMake. > Sorry, you are right. It seemed that you tried to generated the config fi= les > generated usually with a cmake project. I do, but that's not happening during configuration or installation. I crea= ted the config templates with CMake as thast alot less error-prone and easier t= o maintain >>> - I would prefer follow the Upstream guidelines that recommends use xen= o- >>> 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 tried multiple approaches, using xeno-config fell out shortly. >> - it's (logically) an target "executable". >>=A0=A0=A0=A0 That imposes problems with CMake's normal search for those, >>=A0=A0=A0=A0 not to mention CI when your builder works in a partition wit= h noexec. >>=A0=A0=A0=A0 I would want to use config-files directly or with a host-exe= cutable, >>=A0=A0=A0=A0 like pkg-config uses .pc files. > > I have not found any important problem with the xeno-config generate info= or any > problem with cmake. I agree with you that you need to exec an script to g= enerate > the info and it could have problems with partitions with noexec, etc. Well, I did find problems if you eg. create a "buildroot" and then move it. >> - I need to extract all information and not just flags for ONE configu= ration > > I don't extract the information for one configuration. I extract ALL the = modules > installed. yes, and xeno-config was not conceived for that. >>=A0=A0=A0=A0 That=92s the most important issue, I need the "building bloc= ks" of the command >>=A0=A0=A0=A0 line, not ONE commandline. This means you need to know xeno-= config >>=A0=A0=A0=A0 and its flags precisely and figure out how to dissect multip= le outputs >>=A0=A0=A0=A0 in those "building blocks". >>=A0=A0=A0=A0 Fragile and not forwards-compatible. > > I don't agree. xeno-config is quite stable and well maintained. And it gi= ve you > the information that Upstream want that YOU use. figuring out the arguments and parsing them from within CMake is what I mea= nt with fragile and not forwards-compatible. If you have a project with Xenomai3 and a FindXenomai script, then you might have to update your code just to be able to use a future version. like for example if the linking order changed, which I suppose you= aren't deducing but use a fixed order. >> Whats left is two variants: >> >> FindXenomai - this would be placed in your project or up streamed in CMa= ke. >> Uses CMake functions to guess the paths, this might be hard to do with s= ome libdir / includedir >> Configurations and would need to be updated independently of Xenomai. > > this is one way. Currently it just works. It works for a couple projects you are using. >> CMake Config files - you place those in /cmake/xenomai. >> Those can be generated by config/install_cmakeconfig.sh from the repo (u= se same arguments as when configuring CMake). >> The previously mentioned patchset adds those files to Xenomai and does t= his automatically when installing (using the autotools system). >> Upstreaming in Xenomai would make everything hassle-free and forwards-co= mpatible (the config files would always match the version). >> >> The downside is of course that this would then be a burden to the Xenoma= i devs, but it should not need any changes outside of structural changes. >> At which point someone will have to adapt CMake integration, however its= done - I would prefer it to be done just once >> >> >> The repo contains other changes, attempting to sanitize the bootstrappin= g methods, >> Without those the provided examples might not work (only the upstream bo= otstrapping method will work). >> I hope atleast those can be upstreamed. > > So, maybe that config files generated by the autotools, are to me the bes= t > solution. Then, the responsible of compile and install xenomai in a syste= m > will generate the config files to use it. the config files are not generated from scratch but have placeholders, the same placeholders xeno-config has. That's using the information right from the source =3D) > But for this solution you need that Jan or Phillipe accept that and maint= ain > that. Yep. I have to start somewhere though. > And looking your code and I would prefer a more simple way without module= s > and simple, just fill some config vars. Because then it could be easy to = maintain. The repo deals with multiple issues, the config stuff is rather simple and = straightforward. not sure what you mean with modules? if you mean you prefer using CMake var= iables instead of imported libraries - sorry that's pretty much *the* CMake antipa= ttern. (To many reasons to list, just google for "modern CMake"). *Using* Xenomai is as hard as adding this: find_package(Xenomai REQUIRED) xenomai_target_bootstrap(default_exe SKINS posix ) Norbert ________________________________ This message and any attachments are solely for the use of the intended rec= ipients. They may contain privileged and/or confidential information or oth= er information protected from disclosure. If you are not an intended recipi= ent, you are hereby notified that you received this email in error and that= any review, dissemination, distribution or copying of this email and any a= ttachment is strictly prohibited. If you have received this email in error,= please contact the sender and delete the message and any attachment from y= our system. ANDRITZ HYDRO GmbH Rechtsform/ Legal form: Gesellschaft mit beschr=E4nkter Haftung / Corporati= on Firmensitz/ Registered seat: Wien Firmenbuchgericht/ Court of registry: Handelsgericht Wien Firmenbuchnummer/ Company registration: FN 61833 g DVR: 0605077 UID-Nr.: ATU14756806 Thank You ________________________________