apr: allow recipes which support cross_building to consume exising apr binaries#16782
Conversation
As discussed in conan-io#6622 (comment) conan 1.38.0 and up have the new conan.tools.build.cross_building which compares build vs host settings, without the fallback on os_build/arch_build that the old tools.cross_compiling has. The recipe was converted in conan-io#14797 to use conan.tools.build.cross_building and required_conan_version = ">=1.53.0", making the workaround is obsolete.
From all the discussion I found in conan-io#6622, the issue which motivated a "doesn't support cross-build yet" is the use of is AC_TRY_RUN checks in ./configure. That's not an issue when consuming existing binaries, so this check belongs in validate_build (since conan 1.51.0). It also doesn't apply to MSVC which uses CMake rather than autoconf; There's no use of try_compile or try_run in the CMake project.
This comment has been minimized.
This comment has been minimized.
The
Any idea what the bot's objecting to, or a more detailed log? |
|
Found the more detailed logs, and he failures came back from "[required] apr/1.7.0@ macOS, Clang (M1/arm64)", specifically https://c3i.jfrog.io/c3i/misc/summary.html?json=https://c3i.jfrog.io/c3i/misc/logs/pr/16782/1-configs/macos-m1-clang/apr/1.7.0//summary.json Which seems to have worked as intended. To pick on one specific example, it was trying to cross-compile from x86_64 to armv8 and was told it can't:
This wasn't in build() - unlike the successes, there's no "apr/1.7.0: Calling build()" message printed like there is for ones that could be built, because vaidate_build() failed first. These same configurations show INVALID_CONFIGURATION in e.g. #14797 https://c3i.jfrog.io/c3i/misc/summary.html?json=https://c3i.jfrog.io/c3i/misc/logs/pr/14797/5/apr/1.7.0//summary.json. As expected, given that apr indeed cannot cross-compile. So it seems like the difference has got to be something that changed about c3i? |
|
Oh duh, it's probably just picking up on the fact that armv8-Macos-clang binaries would now be allowed to exist, even though c3i still can't build them, since it only has a cross-compiler agent and not a native apple silicon one). So now it tried, and failed. So apparently whatever implements this check:
Must have evaluated the graph ahead of time and pruned INVALID_CONFIGURATION, but either it ignored graph.Node.cant_build, or did that preliminary evaluation of the graph (deciding which package_ids to attempt building) without specifying |
|
Nevermind, the old code (in |
|
I detected other pull requests that are modifying apr/all recipe: This message is automatically generated by https://github.com/ericLemanissier/conan-center-conflicting-prs so don't hesitate to report issues/improvements there. |
|
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
Raising InvalidConfiguration from |
Conan v1 pipeline ✔️All green in build 4 (
Conan v2 pipeline ✔️
All green in build 2 (
|
|
@puetzk thanks a lot for your contribution and patience while we implemented the necessary logic in the CI to handle cases like this, sorry that we did not communicate properly that work was underway to have this PR merged. Also, thanks for such a detailed investigation and description of the problem, it has helped a lot when reviewing the change itself! |
…onsume exising apr binaries * apr: Remove settings_build workaround for tools.cross_building As discussed in conan-io#6622 (comment) conan 1.38.0 and up have the new conan.tools.build.cross_building which compares build vs host settings, without the fallback on os_build/arch_build that the old tools.cross_compiling has. The recipe was converted in conan-io#14797 to use conan.tools.build.cross_building and required_conan_version = ">=1.53.0", making the workaround is obsolete. * apr: Loosen the cross-building restriction From all the discussion I found in conan-io#6622, the issue which motivated a "doesn't support cross-build yet" is the use of is AC_TRY_RUN checks in ./configure. That's not an issue when consuming existing binaries, so this check belongs in validate_build (since conan 1.51.0). It also doesn't apply to MSVC which uses CMake rather than autoconf; There's no use of try_compile or try_run in the CMake project. --------- Co-authored-by: Rubén Rincón Blanco <rubenrb@jfrog.com>
Since conancenter only provides x86_64 binaries on windows, it's frequently for necessary for an overall build which uses
--settings:host arch=x86 --build missingto produce 32-bit requires from conancenter recipes to need--settings:build=x86-64in order to satisfy tool_requires.There are cross_building scenarios apr can't support, but that one would be fine, the current recipe validation is just stricter than it needed to be.