Skip to content
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

[feature] Add multiarch(any?) arch option to settings.yml #6384

Closed
bog-dan-ro opened this issue Jan 17, 2020 · 7 comments
Closed

[feature] Add multiarch(any?) arch option to settings.yml #6384

bog-dan-ro opened this issue Jan 17, 2020 · 7 comments

Comments

@bog-dan-ro
Copy link

This feature is very useful (mostly?) for Android as it supports multiple ABIs in the same apk/aab.

Starting with Qt 5.14.0, Qt for Android provides a way to build the apps for all Android ABIs in one go, and without a multiarch/Any/None in arch settings it's impossible to create an Android multilib Qt package for conan.

@bog-dan-ro
Copy link
Author

An even better option is to allow multiple archs: e.g.

#~/.conan/profiles/android_any

# ...
[settings]
arch=[x86, x86_64, armv7, armv8]

@Minimonium
Copy link
Contributor

@a4z is also experiencing the need for this feature but for the iOS toolchain.

The current workaround is to introduce custom multi-arch settings, but it's a very inflexible solution.

@a4z
Copy link
Contributor

a4z commented Jan 26, 2020

yes, this is needed for mobile development, for both iOS, and also for Android (which I will do after all iOS packages are done) . So my need is not limited to just iOS ;-)

@dmn-star
Copy link

This will be a very helpful extension. Together with universal libs conan-io/conan-extensions#59

@a4z
Copy link
Contributor

a4z commented Mar 2, 2020

just some notes, while this will work for CMake more or less out of the box,
just add a toolchain file, and or a cmake wrapper.

everything that is not cmake and has no xcode build that can be configured would need to

  • have the packages with the wanted architectures as dependencies
  • install, probably build those packages
  • maybe import the libraries from those packages
  • run lipo on the packages for the libraries of the wanted arch, and have a new one

those packages == the same package name/version , just in a the wanted arch , armv7 armv7s arm64

so this seems to be some how a problem

so I understand why the multiarch flag could be a huge problem, some builds would not support them, or , they would become pretty complex

but it would be nice if I could , for example

  • have a package curl_fat
  • that requires curl armv7, curl armv7s, curl arm64
  • installs the packages and lipo the fat binary

and I think this could be possible already today, by using settings via the settings.yml that I give a specific meaning. But this I would have need to test

@dmn-star
Copy link

dmn-star commented Mar 3, 2020

Yes, have android/iOS prebuilt packages from CCI would be great.

conan-io/conan-center-index#537

@memsharded
Copy link
Member

Multi-arch support was added back then in Conan 2.2 in #15775, see docs in https://docs.conan.io/2/reference/tools/cmake/cmaketoolchain.html#support-for-universal-binaries-in-macos

It will be limited to iOS, no idea how to get CMake to do multi-archs builds too.

So I suggest:

  • Lets close this issue, at the light of the new feature, addressing iOS and proposing a syntax that could be valid for Android too.
  • For Android users interested in this, we would need your feedback to know how CMake can be instructed to do multi-archs builds, what needs to be adapted in CMakeToolchain. Please create a new ticket for it, and we can take it from there specifically for Android

Thanks for your feedback!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants