conan-io / conan

Conan - The open-source C and C++ package manager
https://conan.io
MIT License
8.25k stars 980 forks source link

[question] arm64 Linux binaries #15195

Closed battlmonstr closed 1 month ago

battlmonstr commented 11 months ago

What is your question?

At the moment conancenter provides Linux prebuilt binaries of popular projects only for x86_64 CPU architecture (Intel/AMD 64 bit), e.g. conan 1.58.0 shows:

% conan search -r=conancenter openssl/3.2.0@ -q 'os=Linux' | grep arch | uniq 
arch: x86_64
% conan search -r=conancenter boost/1.83.0@ -q 'os=Linux' | grep arch | uniq
arch: x86_64
% conan search -r=conancenter grpc/1.54.3@ -q 'os=Linux' | grep arch | uniq
arch: x86_64

The same is confirmed on the web site, e.g.: https://conan.io/center/recipes/grpc?version=1.54.3 "Available packages" section has "Linux", which shows arch = x86_64

While x86_64 is the de facto standard, a new generation of cloud services have started to offer arm64 (aka AArch64 or armv8) VMs which aim to improve performance and/or cost efficiency. I wish to get arm64 prebuilt binaries from conan that would be compatible with arm64-based VMs of popular cloud providers and CI vendors.

Questions:

  1. Is it up to the conancenter or the package maintainers to build and upload Linux arm64 binaries?
  2. If it is controlled by conancenter, are there plans to add Linux arm64 support? What are the considerations and issues with this?
  3. Are there any well-known alternative repositories having arm64 builds ready?

Have you read the CONTRIBUTING guide?

memsharded commented 11 months ago

Hi @battlmonstr

Thanks for your question.

At the moment there no plans to add arm-linux configurations to ConanCenter. And for 1.X we are currently dropping configurations while we add them to 2.0 builds. ConanCenter contributors only submit PRs with recipes, but it is ConanCenter who decides which configurations are built.

The goal of ConanCenter is not to provide binaries for all configurations, but to have a solid set of package recipes that will work and be able to create binaries for the widest possible number of configurations. In that regard, it is slightly more likely that we would be adding cross builds for android, emscripten, mingw or things like that in the future, to be able to test if recipes work fine for those configurations.

To be able to use ConanCenter packages in production for different architectures, etc, there are some guidelines in https://docs.conan.io/2/devops/using_conancenter.html, and this is an area we will keep working to improve the tooling and flows.

MP91 commented 7 months ago

Hi @memsharded, are there any updates in the plans regarding linux/arm64 packages? Our project would highly benefit from not building them manually all the time...

memsharded commented 7 months ago

Hi @MP91

I am afraid this hasn't changed. As commented above, it is more likely that other different builds like Android will be added than adding arm64 for Linux.

Our project would highly benefit from not building them manually all the time...

The recommendation would still be the same as above https://docs.conan.io/2/devops/using_conancenter.html, not building them from source all the time, but build them, put them in your own server and then re-use those binaries in exactly the same way you would do from ConanCenter packages. Haven't you considered this approach?

MP91 commented 7 months ago

Thanks for the update. Sure we considered this approach, but unfortunately for a small open source project it is not that easy to host and maintain an own server. Timewise and moneywise...

memsharded commented 7 months ago

Thanks for the update. Sure we considered this approach, but unfortunately for a small open source project it is not that easy to host and maintain an own server. Timewise and moneywise...

It seems that I was confused, due to the Linux/arm64, I thought that it was some private project, not an open source one. Can you share link to it?

If it is an open-source project, why it is so important the Linux/arm64? It is not that it is that mainstream for developers, still Linux/x86_64 would be way more common, isn't it?

MP91 commented 7 months ago

Here is a link to our CPP project: https://github.com/eclipse-velocitas/vehicle-app-cpp-template

We are developing container based applications for embedded devices and in this area arm64 devices are mostly used

memsharded commented 1 month ago

Closing as not planned at the moment. We are finishing the transition to Conan 2 in ConanCenter, and when it is done we will add some more configurations, but still it seems more likely that there will be other higher priorities like android. Thanks very much for the feedback!