-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[boost_system/1.66.0] Can't cross compile for qnx #1041
Comments
I've updated the conan recipe for boost_generator locally to support qnx os and toolset but now I am getting the following error:
|
Hi there, QNX generalQNX uses a GCC variant for their systems. One Boost and QNXBoost supports QNX theoretically out-of-the-box. But I think it is more of an feature by request as I got the impression that it is not specifically tested. Thus there are some problems with QNX in general (e.g. see here, here, here) and specifically with QNX 7 (e.g. see here). I recommend to use the latest Boost versions 1.70.0 or 1.71.0 as those have some fixes for QNX included (but some are still missing). Conan and QNXConan started a preliminary support for QNX with Conan version 1.60.0. But there are still some tasks which have to be done. As Conan cannot deduce the correct settings for the target architecture etc. This is something that can do only someone who is actively using QNX, its compiler and Conan as it involves quite some testing (like always with QNX). I already did some work in this regard but did not have the time to generalize the code to merge it into the Conan code base. Boost recipeTo start with Conan, Boost and QNX you have to specify the correct settings for the QNX compiler in the Boost recipe. You can try the recipe I have uploaded here. Be aware this is an old one. I have already integrated the current Boost recipes for versions Boost 1.70.0 and 1.71.0 to support QNX and it works. I build Boost for several targets (QNX 6.5, QNX 7: x86_64, armv7, aarch64, etc.). I am using Conan to build around 50 targets (e.g. Windows and Visual Studio 2010-2017, some Linux targets, some QNX targets, ... with multiple build types like Release and Debug). Anyway, in the meantime I can help you if you have problems with compiling for QNX in general. CMake and QNXI did not deeply look into all your posted output here, but I think your CMake configuration is not quite appropriate for the QCC. I will investigate it further and will get back at you. |
thanks for the detailed reply @Johnnyxy, very informative. My current goal is to build a minimal version of boost and use it in a proof of concept project. I did use the recipe and conan/cmake profiles and toolchain files you have provided but it only builds zlib and doesn't build boost itself, which is very odd. However when I use your conan profile and cmake cross toolchain file and run
it tries to build boost but fails with hundreds of compile errors and all errors seem to show there's a problem finding the compiler,
I was expecting conan to use to QCC environmet variable but it is not. Below is the effective profile that conan uses:
|
@Johnnyxy if you could give me some tips on how I can get the environment to find the path to QCC I would really appreciate it. |
I have to prepare some files to give you a full example. But as hint:
Now any subsequent call of This includes Boost's "B2" that calls |
I can't believe I missed that. So after sourcing the bash file it actually starts to compile but it fails to compile 4 files:
I wish there was an option to disable asio/locale libraries. These are the errors that I get while installing the |
This problem is related to Boost in combination with the QNX 7.0 and its changes to the original GCC variant. For a workaround you can take a look here: boostorg/config#288 When I finally provide a all-in-one-solution with Conan this issue will be solved too. Hopefully I can do it until X-Mas. But until then you have to go with a solution by yourself from the links I provided. |
Hi,
If you use CMake for your main project (not for Boost) all necessary modifications are incorporated too if you invoke the build by Conan's create command. ProfilesFirst you use a conan profile for your projects which need Boost. I have added a Boost recipeTo support compilation of Boost's source with the QNX 7.0 compiler I had to extend the recipe with some flags. To use this recipe instead of the official one from Conan-Index you have to export it into your local Conan repository: Execute this in the Your projectAfter that you can E.g. in your project folder with your DownloadEverything can be found in the attached archive: NoteThis shows my current state of changes to support building Boost through Conan at the moment. I am sure there could be made changes to Conan and Boost recipe to minimize the changes. I am working on that. The changes to the Boost recipe can be used for QNX 6.x too. No further modifications to build Boost for QNX 6.x are required. |
@Johnnyxy thanks for the detailed reply. Things seem to work but I had to modify the boost recipe:
The boost package seems to have been compiled and packaged properly. Will try to actually use it and report back if anything doesn't work. Thanks! |
Hi, |
I have updated the ZIP file in my previous post. Could you try that recipe to test it? |
@Johnnyxy
However the static build is working, only the test_package fails to configure. |
Hi @derived-coder , |
@Johnnyxy Here the static build works, but I fail the test_package to configure: In the meantime I will try out your suggestion with the relative paths and the setup file. |
The problem with your Boost build is that Boost's "B2" does not call the q++ compiler with your chosen architecture. Have a look at line 450 in your log. You will see the appropriate settings for target selection (like Use the recipe provided in my ZIP file. It has the necessary changes and provides Boost with the correct parameters. Additionally my modified recipe works around some Boost bug/problems with QNX 7.0. |
@Johnnyxy
I modified:
to
besides that the only other modifications were: Here are the logs of the working static build, just a few lines, this compile went through: I compile from linux to qnx and you from windows to qnx right? |
Yes, normally I am cross compiling Boost from Windows for QNX. But this should not make any difference as there is no difference to the execution of the That the modified recipe had one bug is known and documented here. Regarding your build log. I am not sure the build will work. Have a look at line 489 in your log there you can see that the wrong archiver (ar) gets executed Can you elaborate what the |
The |
Testing was actual using from other software. But to see if everything compiled fine I was looking fir the built targets report at the end when compiling boost. |
Hi @Johnnyxy here is the report of a The error pops up again. However this time no python changes regarding the PS: Are you also contactable in the conan slack channel? |
I answered you on slack regarding the config inclusion. But I cannot help you with the pkconfig as I am not using this. Besides the attached log is 1 byte in size :). |
I uploaded the log again. Sorry for that. |
The error |
Package and Environment Details (include every applicable attribute)
Conan profile (output of
conan profile show default
orconan profile show <profile>
if custom profile is in use)Steps to reproduce (Include if Applicable)
I am trying to install
boost_system/1.66.0@bincrafters/stable
for my QNX target, using the above profile like sobut the conan installation fails when conan is preparing to build
Logs (Include/Attach if Applicable)
The text was updated successfully, but these errors were encountered: