Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[BACKPORT 2.16][#17502] Fix the shared library interpreter used for y…
…ugabyted-ui Summary: Original commit: 75a83fe / D25752 Recently, around the time we upgraded Go on our build hosts from 1.18 to 1.20, the yugabyted-ui executable stopped working in x86_64 release builds. The yugabyted-ui executable ended up having the wrong dynamic linker (ld.so from Linuxbrew). This is most likely due to changes in the mechanism of linker selection by the Go compiler driver. https://tip.golang.org/doc/go1.20 says "On Linux, the linker now selects the dynamic interpreter for glibc or musl at link time." Apparently, before the change Go would use the system linker (/bin/ld or /usr/bin/ld) and now it uses the ld binary available on the PATH, which happens to be the Linuxbrew version of ld in the Linuxbrew build. The Linuxbrew ld binary makes its output executables use the Linuxbrew dynamic linker. To counteract this, we are removing Linuxbrew bin directory from PATH when building yugabyted-ui. Also adding a check in yugabyted-ui/build.sh script that a valid system-wide dynamic linker is used, and if that is not the case for whatever reason, attempting to fix it using the patchelf tool. Test Plan: Jenkins: compile only Reviewers: mbautin Reviewed By: mbautin Subscribers: ybase Differential Revision: https://phorge.dev.yugabyte.com/D25768
- Loading branch information