linux: Bundle libstdc++.so for release (#57132)

Self-Review Checklist:

- [ ] I've reviewed my own diff for quality, security, and reliability
- [ ] Unsafe blocks (if any) have justifying comments
- [ ] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [ ] Tests cover the new/changed behavior
- [ ] Performance impact has been considered and is acceptable

Closes https://github.com/zed-industries/zed/issues/57073

Release Notes:

- Fixed running Zed on Ubuntu 20.04 installed via the installer by
bundling the required `libstdc++.so`.
This commit is contained in:
Jakub Konka 2026-05-19 23:43:35 +02:00 committed by GitHub
parent a11af20495
commit 7b6be29669
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -151,10 +151,12 @@ cp "${target_dir}/${target_triple}/release/zed" "${zed_dir}/libexec/zed-editor"
cp "${target_dir}/${target_triple}/release/cli" "${zed_dir}/bin/zed"
# Libs
# Bundle libstdc++ so older supported systems can run binaries built with our
# toolchain even when their system libstdc++.so.6 lacks required GLIBCXX symbols.
find_libs() {
ldd ${target_dir}/${target_triple}/release/zed |\
cut -d' ' -f3 |\
grep -v '\<\(libstdc++.so\|libc.so\|libgcc_s.so\|libm.so\|libpthread.so\|libdl.so\|libasound.so\)'
grep -v '\<\(libc.so\|libgcc_s.so\|libm.so\|libpthread.so\|libdl.so\|libasound.so\)'
}
mkdir -p "${zed_dir}/lib"