-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
[Cross building model] Cross compiling packages with build requirements #3329
Comments
If I understood it correctly, your issue is the same as discussed in #2301. I am not aware of any native conan support for working with mixed architectures in a single package. |
Yes that looks to be pretty much the same issue I'm having. |
Currently the only way would be to create a separate package for |
Using |
Yes, because of that I suggested |
Cross-compilation model has massively changed since then, with the 2 profiles approach. Closing this ticket as outdated. |
I’ve had some issues when cross compiling a build requirement.
In my case I'm trying to cross compile a library (call it
PackageA
) that has a build requirement onflatbuffers
.flatbuffers
creates an executable,flatc
, that runs on the build machine and creates cpp files from some definitions.I cross compile
PackageA
from amd64 for arm with[env]
set in my profile:The issue is that when conan builds flatbuffers it's using the
env
from the profile, and thereforeflatc
gets built for arm. This means it won't run on the build machine which is amd64.PackageA
itself is a library and so can be added as a dependency from other packages.I've mentioned this on the slack channel and got some good suggestions, but it doesn't seem like a solved issue.
When I first ran in to this issue I expected to find
compiler_build
& maybeenv_build
settings in the profile to match theos_build
&arch_build
cross compilation options, though I'm not sure whether adding these would create other issues.What's the best way to solve this issue more generally? We have quite a few build requirements that I'd like to use from conan.
The text was updated successfully, but these errors were encountered: