On a gentoo hardened musl new system, xterm fails to start. There is a patch from alpine linux that fix the problem: https://git.alpinelinux.org/aports/tree/community/xterm/posix-ptys.patch?h=3.10-stable
Confirmed. I have been able to duplicate this issue. When started xterm produces: open ttydev: I/O error open ttydev: I/O error open ttydev: I/O error open ttydev: I/O error .... With the applied patch xterm starts normally.
Verified same issue here also. Patch fixes on -351 and -353. @johu, do you might carrying patch in ::gentoo ? shouldn't affect glibc builds adversely.
xterm-391 has: ``` + * build-fix for musl (report by Jonáš Vidra, adapted patch by Khem + Raj): + + modify ifdef for USE_OPENPTY, changing test for __GLIBC__ to + __linux__ + + change ifdef's for _POSIX_SOURCE to _POSIX_VERSION + + modify ifdef for setsid to use a configure-script check for + that function's existence and move the old check to imake + fallbacks. ``` There may be more to do still though.
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=93a38c258ec111a701892185761b860bc6d91abe commit 93a38c258ec111a701892185761b860bc6d91abe Author: Sam James <sam@gentoo.org> AuthorDate: 2024-05-16 02:36:51 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2024-05-16 02:36:51 +0000 x11-terms/xterm: add 391 Bug: https://bugs.gentoo.org/689080 Signed-off-by: Sam James <sam@gentoo.org> x11-terms/xterm/Manifest | 2 + x11-terms/xterm/xterm-391.ebuild | 110 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 112 insertions(+)
The old patch fails to apply with the latest stabilized version (393) but it doesn't matter as it is not needed anymore. xterm starts fine and the error "open ttydev: I/O error" is gone now. I tested on two different system with musl.
I can also confirm x11-terms/xterm-393 is working fine.