Closed adamrodger closed 1 year ago
Ubuntu 18.04 appears to support up to libc 2.27: https://www.ubuntuupdates.org/package/core/bionic/main/updates/glibc
We have a similar issue with the current most popular Node Image (16) - see https://github.com/pact-foundation/pact-js/issues/888.
It works on the latest (Node 18) however many will still be stuck on older versions. I'm comfortable recommending against Alpine and have recently improved our official guidance on that, but I wonder if we aren't using any particular features of glibc, could we link against an older version to increase compatibility across the ecosystems?
Hey folks. I did a run down of which Linux distributions include which version of glibc:
Distribution | glibc version |
---|---|
Arch Linux | 2.36 |
Alpine 3.13 | N/A |
CentOS 7 | 2.17 |
CentOS Stream 8 | 2.28 |
CentOS Stream 9 | 2.34 |
Debian 9 (Stretch) | 2.24 |
Debian 10 (Buster) | 2.28 |
Debian 11 (Bullseye) | 2.31 |
Fedora 35 | 2.34 |
Homebrew | 2.23 |
OpenSUSE Leap 15.3 | 2.31 |
OpenSUSE Tumbleweed | 2.35 |
RHEL 7 | 2.17 |
RHEL 8 | 2.28 |
RHEL 9 | 2.34 |
Ubuntu 18.04 | 2.27 |
Ubuntu 20.04 | 2.31 |
Ubuntu 22.04 | 2.35 |
You can see that requiring glibc 2.29 leaves out a number of large and popular distirubtions, including CentOS 7, CentOS 8, Debian 9, Debian 10, RHEL 7, RHEL 8, Ubuntu 18.04.
Would it be possible to revisit this decision and make the ffi library more compatible? IIRC, it's a matter of rebuilding in an environment that has an old version of glibc. Is there something I can do to help make that happen?
At the very least, this build would need to be ported to run on an older OS. As a starting point, pinning it to 20.04 would mean we don't make the problem worse when GH automatically migrates us to the latest.
It looks like GH have deprecated the Ubuntu 18.04 release, so presumably the only option will be to create our own runner, probably on CentOS 7 if you want to go back as far as possible and stick with an open distro.
I think SmartBear (my and several other Core Maintainers current employer) will be willing to foot the bill, but somebody needs to do the work to create an image that would work.
Library built on Ubuntu 18.04 seems to work on 20.04 and 22.04.
We could just continue to run the build on ubuntu-latest
VM, but run the builds (ci or otherwise) inside a container. That will allow us to easily run CI on multiple Linux distributions too. I am prototyping that now.
Using an official Rust Debian stretch image, the built shared lib works on Ubuntu 18.04.
Of course, docker. makes sense 🤦♂️
On Fri, 19 Aug 2022, 10:13 Ronald Holshausen, @.***> wrote:
Using an official Rust Debian stretch image, the built shared lib works on Ubuntu 18.04.
— Reply to this email directly, view it on GitHub https://github.com/pact-foundation/pact-reference/issues/202#issuecomment-1220098942, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAANFDBRXIZQJ47YE7BXZXTVZ3GS3ANCNFSM5ZGTKQZA . You are receiving this because you commented.Message ID: @.***>
Thanks, @rholshausen! I think that gets us to glibc 2.24, which means that only CentOS 7 and RHEL 7 from the matrix above are not covered. I suppose that's something we can live with?
Is there anything remaining here that I can help with?
I think it's a great start and is going to make a big difference already.
Building on a centos 7 image would get us the best traction obviously, but I don't think it's urgent just yet. Perhaps we wait for demand on those images before we go back that far? I'd prefer to run on a debian based image if possible.
That works for me. (I reserve the right to change my mind :wink: )
Do you know when I should expect a release that works with glibc 2.24?
I see https://github.com/pact-foundation/pact-reference/releases/tag/libpact_ffi-v0.3.8. Thanks!
That works for me. (I reserve the right to change my mind 😉 )
hahaha
I think it's on the way out, so stay tuned on the releases page as the actions run all of the builds
On Fri, Aug 19, 2022 at 12:19 PM Omair Majid @.***> wrote:
That works for me. (I reserve the right to change my mind 😉 )
Do you know when I should expect a release that works with glibc 2.24?
— Reply to this email directly, view it on GitHub https://github.com/pact-foundation/pact-reference/issues/202#issuecomment-1220166269, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAANFDFYCK3UQKXCCBKKIP3VZ3VJ3ANCNFSM5ZGTKQZA . You are receiving this because you commented.Message ID: @.***>
-- Matt Fellows www.onegeek.com.au calendly.com/mfellows
Ok, release build has completed.
@omajid Thanks for all the help. Your table of versions was really useful.
Closing this, as I think it is reasonable to have the min version run on Centos/RHEL 8.
The
libpact_ffi.so
file requires GLIBC 2.28 and 2.29 by the looks of things, which is missing on Ubuntu 18.04 containers. See https://github.com/pact-foundation/pact-net/issues/402 for further details.From inside an Ubuntu 18.04 container: