Open andiwand opened 2 years ago
They were several attempt in CCI to support cross-build in Meson based recipes, but without luck as you can see in https://github.com/conan-io/conan-center-index/pull/6678 and https://github.com/conan-io/conan-center-index/pull/7360. I think there is no straightforward solution currently without automagic handling of https://mesonbuild.com/Cross-compilation.html in Meson helpers.
/cc @SSE4
there is some ongoing effort in #10174 and #9710
A couple of related issue reports in Conan Center: conan-io/conan-center-index#11332 and conan-io/conan-center-index#11362
thank you @jwillikers ! but for now we have to go with custom recipes right? no CCI meson cross builds there as far as I can tell
@andiwand At the moment, I'm not aware of any that use the new MesonToolchain generator in CCI. I'm not sure when that will be possible, but perhaps before too long it will be allowed as things transition to supporting Conan V2.
For the Wayland package specifically, I have a fork available here that uses the new MesonToolchain generator and can be used to cross-compile the package. It requires Conan version 1.50.0 at this time.
I have an ongoing effort to convert GLib
recipe to use MesonToolchain
: https://github.com/conan-io/conan-center-index/pull/11053
still, there are several flaws in conan cliient itself, and recipe needs several workarounds. I've opened some issues, hopefully in 1.51 it will be much better:
https://github.com/conan-io/conan/issues/9713
https://github.com/conan-io/conan/issues/11398
https://github.com/conan-io/conan/issues/10683
https://github.com/conan-io/conan/issues/11397
thank you @jwillikers and @SSE4 ! I will use your resources and try to create a recipe that works for me until conan catches up on this
I tried to cross compile fribidi and glib from CCI and noticed that it does not work out of the box.
After searching I found this closed ticket https://github.com/conan-io/conan/issues/4529 which introduced
MesonToolchain
and a newMeson
class documented here https://docs.conan.io/en/latest/reference/conanfile/tools/meson.html.Now I wondered what is best practice to enable cross compile for meson packages on CCI. I could refactor the existing recipes to use the new
MesonToolchain
andMeson
class but those are experimental and the interface ofMeson
seems to be incompatible. (new vs old)