|
1 | 1 | You are strongly encouraged to test the produced Envoy binary on CentOS 7 yourselves to ensure that it satisfies your required functionality and operates as expected. |
2 | 2 |
|
| 3 | +## Version 1.25.x |
| 4 | +If you need to run this version of Envoy on CentOS 7, your best bet is to use an Envoy binary built on Oracle Linux 8 and an updated version of glibc. CentOS 7 only comes with glibc 2.17, but the Envoy binary built on Oracle Linux 8 depends on a newer version of glibc, so you have to install a newer version on your system. Be careful not to override the existing version of glibc. Here are the rough instructions for accomplishing this: |
| 5 | +1. Use the Oracle Linux 8 image in this repo to build envoy. |
| 6 | +2. Copy the resulting Envoy binary to a CentOS 7 host. |
| 7 | +3. Install glibc 2.28 on the CentOS 7 host. This is the only version of glibc that has been tested with Envoy 1.25.x on CentOS 7. |
| 8 | + 1. One option is to compile it from source. |
| 9 | + ``` |
| 10 | + wget https://ftp.gnu.org/gnu/glibc/glibc-2.28.tar.gz |
| 11 | + tar zxvf glibc-2.28.tar.gz |
| 12 | + cd glibc-2.28 |
| 13 | + mkdir build |
| 14 | + cd build |
| 15 | + ../configure --prefix=/opt/glibc-2.28 |
| 16 | + make -j4 |
| 17 | + sudo make install |
| 18 | + ``` |
| 19 | + 2. Another option is to download a pre-built RPM and extract it to a specific directory. |
| 20 | + ``` |
| 21 | + mkdir /opt/glibc-2.28 |
| 22 | + cd /opt/glibc-2.28 |
| 23 | + wget https://rpmfind.net/linux/centos/8-stream/BaseOS/x86_64/os/Packages/glibc-2.28-155.el8.x86_64.rpm |
| 24 | + rpm2cpio glibc-2.28-155.el8.x86_64.rpm | cpio -idmv |
| 25 | + rm glibc-2.28-155.el8.x86_64.rpm |
| 26 | + ``` |
| 27 | +4. Use [patchelf](https://github.com/NixOS/patchelf) to patch the Oracle Linux 8 Envoy binary to use the updated version of glibc ld-linux for its interpreter and set the rpath to include the libs from glibc. This allows you to start the binary using a newer glibc version that includes the features required by the Oracle Linux 8 binary. Without this, it will run the system ld-linux which is from glibc 2.17 on CentOS 7. |
| 28 | +``` |
| 29 | +patchelf --set-interpreter '/opt/glibc-2.28/lib64/ld-linux-x86-64.so.2' --set-rpath '/opt/glibc-2.28/lib64/' ${path_to_envoy_binary} |
| 30 | +``` |
| 31 | +5. You should now be able to run the Envoy binary on your CentOS 7 host. |
| 32 | +
|
3 | 33 | ## Version 1.21.x |
4 | 34 | Envoy version 1.21 onwards cannot currently be compiled on CentOS 7. |
5 | 35 |
|
@@ -48,4 +78,4 @@ Further investigation is needed to resolve this problem. Contributions are welco |
48 | 78 | Envoy version 1.20 can be compiled on CentOS 7 using `clang and libc++`, but not `clang and libstdc++`, which throws an ambiguous function error. For more detail on this issue and a proposed fix see [here](https://github.com/envoyproxy/envoy/issues/19978). |
49 | 79 |
|
50 | 80 | ## Version 1.19.x |
51 | | -Envoy version 1.19 can be built using either `clang and libc++` or `clang and libstdc++` on CentOS 7. |
| 81 | +Envoy version 1.19 can be built using either `clang and libc++` or `clang and libstdc++` on CentOS 7. |
0 commit comments