PTY spawn fails on Ubuntu 22.04: bun-pty requires GLIBC 2.39, system has 2.35
The opencode-pty plugin fails to spawn PTY sessions on Ubuntu 22.04 LTS with the error:
TypeError: undefined is not an object (evaluating 'lib.symbols')
The underlying [email protected] dependency ships a prebuilt librust_pty.so that was compiled against GLIBC 2.39, which is not available on Ubuntu 22.04 (ships with GLIBC 2.35).
$ ldd ~/.bun/install/cache/[email protected]@@@1/rust-pty/target/release/librust_pty.so
/lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.39' not found (required by librust_pty.so)
Environment
| Component | Version |
|---|---|
| OS | Ubuntu 22.04.5 LTS (Jammy) |
| Kernel | 5.19.0-1022-gcp |
| Bun | 1.3.5 |
| Node | v22.21.1 |
| GLIBC | 2.35 |
| opencode-pty | 0.1.0 |
| bun-pty | 0.4.2 |
I guess this is from bun-pty, also wdyt about moving to bun native pty, i'm not really sure if all the api is there yet, https://bun.com/blog/bun-v1.3.5
We will eventually move to bun native pty, but the only thing holding us right now is opencode itself, they will need to update bun to that version.
About your issue though, I'm afraid that there is nothing I can think of here as a solution other than you update your system? Ubuntu 24 is the new TLS afaik, right?
Ok, looks like you can build bun-pty from source? https://github.com/sursaone/bun-pty#-building-from-source not sure how that could be used here, but it is an option.
Simplest solution is to open a PR in bun-pty to use a lower version ubuntu runner so that Rust links against older glibc during publish
https://github.com/sursaone/bun-pty/blob/bdcb87f83ea7c69cbf469c6956b32d15cf016ff2/.github/workflows/publish.yml#L21
Hi, another PR has been raised with glibc-2.17 support, old distributions should also be improved.
https://github.com/sursaone/bun-pty/pull/30
Hi, another PR has been raised with glibc-2.17 support, old distributions should also be improved.
@shekohex does it work now on ubuntu 22.04 with this/would it work now?
Nice, will update to the latest version and publish a new version.
Updated: https://github.com/shekohex/opencode-pty/releases/tag/v0.1.5
Please upgrade.