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

[question] Conan recipe for a C library from pre-built upstream release #23373

Open
oteffahi opened this issue Apr 4, 2024 · 6 comments
Open
Labels
question Further information is requested

Comments

@oteffahi
Copy link

oteffahi commented Apr 4, 2024

What is your question?

Hello,

I am trying to make a Conan recipe for Zenoh-C to publish it on CCI. It is a C library that wraps the Rust implementation of the Zenoh protocol.

At first I made a recipe which builds the project from source. However, since we require the Rust Toolchain to compile the library, it seems that for now this is not supported on CCI as this PR is still in development. Furthermore, it seems to only add Rust v1.76 and v1.77 which may be too recent for the version of Zenoh-C we wish to publish on CCI (if I understand correctly, we require exactly Rust v1.72).

This led me to work on another recipe that uses the pre-built library from the upstream release. For Linux targets, it is a shared library that requires glibc 1.29. It's easy to filter targets in the recipe and require glibc >= 1.29, but the issue is that from what I see on conan-docker-tools, there doesn't seem to be any image that has glibc 1.29, which means that the test package will never run on CCI's PR build tests. This makes me wonder if what I am attempting to do is even allowed on CCI.

In short, my questions are the following:

  • Is it correct to publish on CCI a recipe for a library made from a pre-built release from upstream? As we only plan on supporting targets for which we build in our releases, this seems to work best for us.
  • If yes, what should be done about the missing glibc 1.29 on CCI's runners?

I am not well acquainted with the C/C++ ecosystem, please excuse me if my explanation is ambiguous.

Thank you for your time.

@oteffahi oteffahi added the question Further information is requested label Apr 4, 2024
@valgur
Copy link
Contributor

valgur commented Apr 4, 2024

What a fantastic coincidence. I opened a PR for Zenoh C API here moments ago: #23374. 😃

zenoh-c built fine with Rust v1.76.0 for v0.10.1-rc and v0.11-pre locally. The development version supported v1.77.1, the latest stable Rust release, as well. v0.10.1 was being built with Rust v1.72.0 in the upstream CI.

@valgur
Copy link
Contributor

valgur commented Apr 4, 2024

@oteffahi Thanks for mentioning the glibc limitation, I was not aware of that. What is the reason for the incompatibility with older glibc versions? Maybe it can be worked around?

@valgur
Copy link
Contributor

valgur commented Apr 4, 2024

AFAIK, pre-release and snapshot versions are allowed on CCI if there are no stable releases available or if there is specific demand for them.

@oteffahi
Copy link
Author

oteffahi commented Apr 4, 2024

@valgur Thank you for your response, and for initiating the PR for Zenoh-C. Seeing that the Rust PR has been open for a while, we were looking to use the pre-built release in order to have Zenoh-C on CCI ASAP.

I may not understand this correctly due to my limited knowledge of C's ecosystem. Our release CI for Linux runs on Ubuntu 20.04, which is why the library is linked with glibc 1.29. I am not sure if it requires that specific version or not to build from source, but our pre-built artefacts do require it as far as I can tell.

@oteffahi
Copy link
Author

oteffahi commented Apr 5, 2024

AFAIK, pre-release and snapshot versions are allowed on CCI if there are no stable releases available or if there is specific demand for them.

@valgur Thank you for the info. However my question is not about this aspect, but rather about creating a library recipe that does not compile from source, but rather uses pre-compiled artefacts from an upstream release (similar to a package_type = "application" conan recipe). Would that be allowed on CCI?

@valgur
Copy link
Contributor

valgur commented Apr 5, 2024

@oteffahi Pre-built binaries for a library should be acceptable on CCI. There are some existing cases of this. Here's one example: https://github.com/conan-io/conan-center-index/blob/master/recipes/archicad-apidevkit/all/conanfile.py

While I prefer being able to build it from scratch in the recipe, the prebuilt binaries would have the benefit of needing to set up a 1.5 GB Rust toolchain plus another 1.5 GB to build the library, which is pretty hefty.

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

No branches or pull requests

2 participants