opencode-pty icon indicating copy to clipboard operation
opencode-pty copied to clipboard

PTY spawn fails on Ubuntu 22.04: bun-pty requires GLIBC 2.39, system has 2.35

Open carlesoctav opened this issue 11 months ago • 7 comments

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

carlesoctav avatar Dec 19 '25 03:12 carlesoctav

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?

shekohex avatar Dec 19 '25 23:12 shekohex

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.

shekohex avatar Dec 20 '25 00:12 shekohex

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

remorses avatar Dec 23 '25 20:12 remorses

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

yuguorui avatar Jan 11 '26 00:01 yuguorui

Hi, another PR has been raised with glibc-2.17 support, old distributions should also be improved.

sursaone/bun-pty#30

@shekohex does it work now on ubuntu 22.04 with this/would it work now?

manorit2001 avatar Jan 27 '26 09:01 manorit2001

Nice, will update to the latest version and publish a new version.

shekohex avatar Jan 30 '26 15:01 shekohex

Updated: https://github.com/shekohex/opencode-pty/releases/tag/v0.1.5

Please upgrade.

shekohex avatar Jan 30 '26 15:01 shekohex