conan-io / conan-center-index

Recipes for the ConanCenter repository
https://conan.io/center
MIT License
949 stars 1.73k forks source link

[QNX] support building Boost for QNX #98

Open SSE4 opened 5 years ago

SSE4 commented 5 years ago

moved from https://github.com/conan-community/community/issues/238, by @Johnnyxy

Hi, as Conan does support QNX Neutrino and its compiler QCC the conan-boost recipe could add support for QNX too. This thread should be the discussion for problems with the intercorporation between Conan, Boost and QNX.

I already have a fully working recipe locally (based on the official Conan-Boost-recipe) for QNX SDP 6.5 and QNX SDP 7.0 but to make those changes public I would like to hear opinions on how to approach certain problems to solve them in a more generic way.

obstacle - architecture

One obstacle is the architecture strings that Conan supplies and what QNX expects. For example:

Conan maps to QNX
armv7 -> armv7le
armv8 -> aarch64le

The Conan docs define armv8 as

armv8: The ARM 64 bit and 32 bit compatible version 8 architecture. It covers only the aarch64 instruction set.

Now one could use this as concrete mapping from armv8 to aarch64 but this still is missing the little endian notation.

As QNX 6.5 and 7.0 do not specify a different endianess setting except little endian (le) the mapping could be hardcoded to always postfix a le-specifier armv7le. Now what tickles me is that the ARM architecture supports both endians as bi-endianess. Thus this allows to run software with different endianess-specifications. This would make it difficult to map only to one endianess (e.g. armv7 -> armv7le) as maybe this could change in the future.

I am not that expert for ARM programming. Maybe someone with more insights could answer the following: Based on ARM's bi-endianess:

  1. Where is the border where one can switch the endianess? E.g. one endianess per process? I read that the endianess can be changed on the fly, even though this is not supported by all controllers or common at all.
  2. Can one compile a library for one endianess and link it with another library or binary which was compiled with an other endianess?

solution - architecture

  1. Ignore any endianess and hardcode the architecture mapping like in the table shown above.
  2. Introduce changes to the architecture settings in the Conan settings.yml. This would imply a change for all Boost-recipe users to provide the QNX architectures in their settings.yml. Such a topic has been discussed in the Conan issue tracker (see here). Adding the architectures is possible but this would introduce confusion about the usage of e.g. armv8 until now. And changing the string was reasonable declined after all because of breaking changes.

...

AliAskari commented 4 years ago

I'm trying to cross compile boost for qnx but I am having some issues. The log is attached to the issue here. Is there any work being done to address this issue?

perseoGI commented 1 month ago

I'm closing this issue as boost recipe has change A LOT since this issue was open.

If this issue remains, do not hesitate to reopen it! 😄

SSE4 commented 1 month ago

@perseoGI how do I re-open? I don't see the button

perseoGI commented 1 month ago

I'll reopen for you. Please add more updated information!