$ docker run --rm -it rockylinux:8.9
[root@930ea1285788 /]# curl -sSfLo launchpad https://github.com/Mirantis/launchpad/releases/download/v1.5.3/launchpad-linux-x64
[root@930ea1285788 /]# chmod +x launchpad
[root@930ea1285788 /]# ./launchpad version
./launchpad: /lib64/libc.so.6: version `GLIBC_2.34' not found (required by ./launchpad)
./launchpad: /lib64/libc.so.6: version `GLIBC_2.32' not found (required by ./launchpad)
[root@930ea1285788 /]# /lib64/libc.so.6 --version
GNU C Library (GNU libc) stable release version 2.28.
Copyright (C) 2018 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
Compiled by GNU CC version 8.5.0 20210514 (Red Hat 8.5.0-20).
libc ABIs: UNIQUE IFUNC ABSOLUTE
For bug reporting instructions, please see:
<http://www.gnu.org/software/libc/bugs.html>.
The launchpad binary is dynamically-linked against libc, and unfortunately linked to a more recent version of libc than is available on EL8 distros. Luckily glibc libraries are backwards-compatible with software dynamically linked against an older glibc so this is easily solved by building launchpad on an OS which uses an older version of glibc. You do not necessarily have to go all the way down to EL7 (glibc 2.17) to build a binary that is compatible with EL7. It depends on which glibc symbols are used. For instance, Fipster is built on Ubuntu 20.04 (glibc 2.31) but is compatible all the way down to glibc 2.2.5 because it does not link against symbols with any newer version. Fipster is built in a CentOS 7 container, for example.
root@2370a9da25ba:/# readelf -V launchpad-linux-x64
Version needs section '.gnu.version_r' contains 1 entry:
Addr: 0x0000000000b9bec0 Offset: 0x79bec0 Link: 10 (.dynstr)
000000: Version: 1 File: libc.so.6 Cnt: 4
0x0010: Name: GLIBC_2.34 Flags: none Version: 2
0x0020: Name: GLIBC_2.32 Flags: none Version: 3
0x0030: Name: GLIBC_2.3.2 Flags: none Version: 4
0x0040: Name: GLIBC_2.2.5 Flags: none Version: 5
Version symbols section '.gnu.version' contains 44 entries:
Addr: 0x0000000000b9bf20 Offset: 0x79bf20 Link: 11 (.dynsym)
000: 0 (*local*) 1 (*global*) 1 (*global*) 1 (*global*)
004: 5 (GLIBC_2.2.5) 5 (GLIBC_2.2.5) 5 (GLIBC_2.2.5) 5 (GLIBC_2.2.5)
008: 5 (GLIBC_2.2.5) 5 (GLIBC_2.2.5) 5 (GLIBC_2.2.5) 5 (GLIBC_2.2.5)
00c: 5 (GLIBC_2.2.5) 5 (GLIBC_2.2.5) 5 (GLIBC_2.2.5) 4 (GLIBC_2.3.2)
010: 5 (GLIBC_2.2.5) 2 (GLIBC_2.34) 2 (GLIBC_2.34) 4 (GLIBC_2.3.2)
014: 2 (GLIBC_2.34) 5 (GLIBC_2.2.5) 2 (GLIBC_2.34) 5 (GLIBC_2.2.5)
018: 5 (GLIBC_2.2.5) 5 (GLIBC_2.2.5) 5 (GLIBC_2.2.5) 5 (GLIBC_2.2.5)
01c: 2 (GLIBC_2.34) 5 (GLIBC_2.2.5) 5 (GLIBC_2.2.5) 5 (GLIBC_2.2.5)
020: 3 (GLIBC_2.32) 5 (GLIBC_2.2.5) 5 (GLIBC_2.2.5) 5 (GLIBC_2.2.5)
024: 5 (GLIBC_2.2.5) 5 (GLIBC_2.2.5) 5 (GLIBC_2.2.5) 5 (GLIBC_2.2.5)
028: 5 (GLIBC_2.2.5) 5 (GLIBC_2.2.5) 3 (GLIBC_2.32) 2 (GLIBC_2.34)
Since all the symbol versions incompatible with EL7/8 are version >= 2.32, Ubuntu 20.04 should be sufficient to build a launchpad binary compatible with every Linux distro release we officially support, and then some.
Building with CGO_ENABLED=0 would also work, if Launchpad does not depend on any native C code outside the standard library.
The launchpad binary is dynamically-linked against libc, and unfortunately linked to a more recent version of libc than is available on EL8 distros. Luckily glibc libraries are backwards-compatible with software dynamically linked against an older glibc so this is easily solved by building launchpad on an OS which uses an older version of glibc.
You do not necessarily have to go all the way down to EL7 (glibc 2.17) to build a binary that is compatible with EL7. It depends on which glibc symbols are used. For instance, Fipster is built on Ubuntu 20.04 (glibc 2.31) but is compatible all the way down to glibc 2.2.5 because it does not link against symbols with any newer version.Fipster is built in a CentOS 7 container, for example.Since all the symbol versions incompatible with EL7/8 are version >= 2.32, Ubuntu 20.04 should be sufficient to build a launchpad binary compatible with every Linux distro release we officially support, and then some.
Building with
CGO_ENABLED=0would also work, if Launchpad does not depend on any native C code outside the standard library.