-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
qt6: add ability to crossbuild #26529
Conversation
Log for Linux x86_64 -> armv8 build |
Thanks! Did you also manage to cross-compile a recipe consuming the cross-compiled Qt? I think it might have required some additional steps to get it working. I would also recommend deprecating the Cross-compilation support for optional but important modules like QtDeclarative needs some additional work as well. In particular, you'll have to make sure that the optional module is enabled correspondingly in the Qt tool_requires, so that the tools for the modules are built correctly, and also tweak I'll probably open a PR for the last issue at some point. |
Also - how did you handle the Edit: nevermind, I now saw that you cross-compiled for x86_64, which sidesteps this issue. |
We are able to crossbuild
We've done both, cross armv8->x86_64 and x86_64 -> armv8 - in both cases we are using Desktop OpenGL and x11, as provided by Ubuntu. This docker image can be used as an example: https://github.com/jcar87/cci-crossbuild-example - I reckon something like this would work:
For system dependencies when crossbuilding, we roughly see the following cases:
|
Summary
Changes to recipe: qt/6.x.x
Motivation
Provide ability to cross-build recipe
Details
Qt6HostInfoConfig.cmake
in the package folder - this is needed by Qt itself when crossbuilding (it does not define targets, just some meta-information about the build)QT_HOST_PATH
to point to the self-dependency in the build contextQt6CoreTools
- simply pre-include the target executable information that is already in the dependency in the build context - that will define things likeQt6::moc
and will use those insteadandroid_sdk
(is not an option)Tested on
Android may require additional work, as it requires an SDK setup (and not just the NDK). Not invalidating this, as it may be possible to inject the necessary variables via
tools.cmake.cmaketoolchain:extra_variables
to get a successful buildClose #20257
Close #8120