Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 689080 - x11-terms/xterm-351: fails to start with 'open ttydev: I/O error' on musl-libc
Summary: x11-terms/xterm-351: fails to start with 'open ttydev: I/O error' on musl-libc
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Hardened (show other bugs)
Hardware: AMD64 Linux
: Normal major (vote)
Assignee: Gentoo musl team
URL:
Whiteboard:
Keywords: NeedPatch, PullRequest
Depends on:
Blocks:
 
Reported: 2019-07-01 13:31 UTC by Yed
Modified: 2024-05-16 02:39 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Yed 2019-07-01 13:31:34 UTC
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
Comment 1 Max Tottenham 2020-05-03 22:46:27 UTC
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.
Comment 2 Michael 'veremitz' Everitt 2020-05-04 06:06:36 UTC
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.
Comment 3 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-05-16 02:36:35 UTC
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.
Comment 4 Larry the Git Cow gentoo-dev 2024-05-16 02:39:20 UTC
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(+)