Closed anagno closed 4 years ago
I think I found the mistake :)
If I remove the build_requires expat/2.2.9
from the profile and I add it in the recipe it seems to work:
def build_requirements(self):
if tools.cross_building(self.settings):
self.build_requires("expat/2.2.9")
And it is logical since this is not a build_requires for building in the host, but a build_requires of the library to be cross build. Sorry for opening early the report :)
Hi @anagno
It seems (https://github.com/conan-io/conan/issues/7423) that you are starting to try the new cross-build model. Please let us know if the --build=missing
would work in that case, in theory it should be building 2 different binaries, one in each context. Do not hesitate to re-open or open a new question for it. Thanks!
Hello Everyone,
I tried the new cross-building model (thanks for the great work!), but I think I found a bug (or I have not understood the documentation on how to use the new model). The bug is that the
--build=missing
flag is not respected for thebuild_requires
of the host system.Here is my use case:
I have a library that I would like to cross-build in Emscripten. So I defined my build profile:
and I defined my host profile:
The problem arises with the expat/2.2.9 dependency (which does not have pre-build binaries. Only the recipe for producing the binaries). This dependency is used to produce some source code, that will be used in the generation of the final library (so we also need the native binaries to use them on the build system). At the same time it is also a dependency in the produced library (https://github.com/anagno/gama/blob/master/conanfile.py). So it also has to be cross-compiled for the host system. Currently when I try (in a clean system) to build the library, conan is complaining for the missing prebuild binary of expat (although it is listed in the build_requires)
If I force the installation of the native binaries (
conan install Expat/2.2.9@pix4d/stable --build=missing;
), then everything works.Is it something that is expected or am I using the new model wrong?
Kind regards,
Vasileios
Possible related issues:
Environment Details (include every applicable attribute)
Steps to reproduce (Include if Applicable)
Logs (Executed commands with output) (Include/Attach if Applicable)
I have logs from the travis-ci. Let me know if you need links to them