[GH-ISSUE #144] Build on OpenBSD: undefined: Termios #726

Closed
opened 2026-03-15 10:02:10 +03:00 by kerem · 8 comments
Owner

Originally created by @ligurio on GitHub (Feb 7, 2016).
Original GitHub issue: https://github.com/asciinema/asciinema/issues/144

5.8 GENERIC.MP#1236

$ go get github.com/asciinema/asciinema

github.com/asciinema/asciinema/Godeps/_workspace/src/github.com/creack/termios/raw

source/go/src/github.com/asciinema/asciinema/Godeps/_workspace/src/github.com/creack/termios/raw/raw.go:10: undefined: Termios
source/go/src/github.com/asciinema/asciinema/Godeps/_workspace/src/github.com/creack/termios/raw/raw.go:11: undefined: setTermios
source/go/src/github.com/asciinema/asciinema/Godeps/_workspace/src/github.com/creack/termios/raw/raw.go:18: undefined: Termios
source/go/src/github.com/asciinema/asciinema/Godeps/_workspace/src/github.com/creack/termios/raw/raw.go:19: undefined: Termios
source/go/src/github.com/asciinema/asciinema/Godeps/_workspace/src/github.com/creack/termios/raw/raw.go:20: undefined: getTermios
source/go/src/github.com/asciinema/asciinema/Godeps/_workspace/src/github.com/creack/termios/raw/raw.go:36: undefined: Termios
source/go/src/github.com/asciinema/asciinema/Godeps/_workspace/src/github.com/creack/termios/raw/raw.go:49: undefined: Termios

github.com/asciinema/asciinema/util

source/go/src/github.com/asciinema/asciinema/util/copy.go:34: undefined: FD_SET
source/go/src/github.com/asciinema/asciinema/util/copy.go:35: undefined: FD_SET
source/go/src/github.com/asciinema/asciinema/util/copy.go:37: undefined: Select
source/go/src/github.com/asciinema/asciinema/util/copy.go:47: undefined: FD_ISSET
source/go/src/github.com/asciinema/asciinema/util/copy.go:72: undefined: FD_ISSET
$

Originally created by @ligurio on GitHub (Feb 7, 2016). Original GitHub issue: https://github.com/asciinema/asciinema/issues/144 5.8 GENERIC.MP#1236 $ go get github.com/asciinema/asciinema # github.com/asciinema/asciinema/Godeps/_workspace/src/github.com/creack/termios/raw source/go/src/github.com/asciinema/asciinema/Godeps/_workspace/src/github.com/creack/termios/raw/raw.go:10: undefined: Termios source/go/src/github.com/asciinema/asciinema/Godeps/_workspace/src/github.com/creack/termios/raw/raw.go:11: undefined: setTermios source/go/src/github.com/asciinema/asciinema/Godeps/_workspace/src/github.com/creack/termios/raw/raw.go:18: undefined: Termios source/go/src/github.com/asciinema/asciinema/Godeps/_workspace/src/github.com/creack/termios/raw/raw.go:19: undefined: Termios source/go/src/github.com/asciinema/asciinema/Godeps/_workspace/src/github.com/creack/termios/raw/raw.go:20: undefined: getTermios source/go/src/github.com/asciinema/asciinema/Godeps/_workspace/src/github.com/creack/termios/raw/raw.go:36: undefined: Termios source/go/src/github.com/asciinema/asciinema/Godeps/_workspace/src/github.com/creack/termios/raw/raw.go:49: undefined: Termios # github.com/asciinema/asciinema/util source/go/src/github.com/asciinema/asciinema/util/copy.go:34: undefined: FD_SET source/go/src/github.com/asciinema/asciinema/util/copy.go:35: undefined: FD_SET source/go/src/github.com/asciinema/asciinema/util/copy.go:37: undefined: Select source/go/src/github.com/asciinema/asciinema/util/copy.go:47: undefined: FD_ISSET source/go/src/github.com/asciinema/asciinema/util/copy.go:72: undefined: FD_ISSET $
kerem 2026-03-15 10:02:10 +03:00
  • closed this issue
  • added the
    packaging
    label
Author
Owner

@aerth commented on GitHub (Feb 12, 2016):

Similar error building on netbsd 😢

# github.com/asciinema/asciinema/Godeps/_workspace/src/github.com/creack/termios/raw
Godeps/_workspace/src/github.com/creack/termios/raw/raw.go:10: undefined: Termios
Godeps/_workspace/src/github.com/creack/termios/raw/raw.go:11: undefined: setTermios
Godeps/_workspace/src/github.com/creack/termios/raw/raw.go:18: undefined: Termios
Godeps/_workspace/src/github.com/creack/termios/raw/raw.go:19: undefined: Termios
Godeps/_workspace/src/github.com/creack/termios/raw/raw.go:20: undefined: getTermios
Godeps/_workspace/src/github.com/creack/termios/raw/raw.go:36: undefined: Termios
Godeps/_workspace/src/github.com/creack/termios/raw/raw.go:49: undefined: Termios
# github.com/asciinema/asciinema/util
util/copy.go:34: undefined: FD_SET
util/copy.go:35: undefined: FD_SET
util/copy.go:37: undefined: Select
util/copy.go:47: undefined: FD_ISSET
util/copy.go:72: undefined: FD_ISSET
*** Error code 2
<!-- gh-comment-id:183211239 --> @aerth commented on GitHub (Feb 12, 2016): Similar error building on netbsd :cry: ``` # github.com/asciinema/asciinema/Godeps/_workspace/src/github.com/creack/termios/raw Godeps/_workspace/src/github.com/creack/termios/raw/raw.go:10: undefined: Termios Godeps/_workspace/src/github.com/creack/termios/raw/raw.go:11: undefined: setTermios Godeps/_workspace/src/github.com/creack/termios/raw/raw.go:18: undefined: Termios Godeps/_workspace/src/github.com/creack/termios/raw/raw.go:19: undefined: Termios Godeps/_workspace/src/github.com/creack/termios/raw/raw.go:20: undefined: getTermios Godeps/_workspace/src/github.com/creack/termios/raw/raw.go:36: undefined: Termios Godeps/_workspace/src/github.com/creack/termios/raw/raw.go:49: undefined: Termios # github.com/asciinema/asciinema/util util/copy.go:34: undefined: FD_SET util/copy.go:35: undefined: FD_SET util/copy.go:37: undefined: Select util/copy.go:47: undefined: FD_ISSET util/copy.go:72: undefined: FD_ISSET *** Error code 2 ```
Author
Owner

@ku1ik commented on GitHub (Feb 13, 2016):

Looks like creack/termios lib doesn't support OpenBSD and NetBSD....

<!-- gh-comment-id:183641754 --> @ku1ik commented on GitHub (Feb 13, 2016): Looks like `creack/termios` lib doesn't support OpenBSD and NetBSD....
Author
Owner

@ku1ik commented on GitHub (Feb 21, 2016):

I'm not really familiar with *BSD systems but if anyone can look at this I'd be happy to accept a PR!

<!-- gh-comment-id:186850685 --> @ku1ik commented on GitHub (Feb 21, 2016): I'm not really familiar with *BSD systems but if anyone can look at this I'd be happy to accept a PR!
Author
Owner

@ligurio commented on GitHub (May 31, 2016):

These patches fix creack/termios and asciinema for OpenBSD:

But in rest we have a problem with undefined syscall.Termios:

-bash-4.2$ go build
# golang.org/x/crypto/ssh/terminal
../../../golang.org/x/crypto/ssh/terminal/util.go:27: undefined: syscall.Termios
-bash-4.2$

and I don't know how to resolve it.

<!-- gh-comment-id:222708299 --> @ligurio commented on GitHub (May 31, 2016): These patches fix creack/termios and asciinema for OpenBSD: - https://bronevichok.ru/trash/0001-Update-creack-termios-lib-to-the-last-commit.patch - https://bronevichok.ru/trash/0002-creack-termios-Allow-to-use-termios-struct-and-funcs.patch - https://bronevichok.ru/trash/0003-Fix-compilation-on-OpenBSD.patch But in rest we have a problem with undefined syscall.Termios: ``` -bash-4.2$ go build # golang.org/x/crypto/ssh/terminal ../../../golang.org/x/crypto/ssh/terminal/util.go:27: undefined: syscall.Termios -bash-4.2$ ``` and I don't know how to resolve it.
Author
Owner

@ku1ik commented on GitHub (Jul 13, 2016):

@ligurio Thanks for the patches! I don't know how to resolve the last problem either.

Anyway, I just released v1.3.0. It solves this problem (and many others!) because it's implemented in Python (it's based on v0.9.8 codebase) so it doesn't have a compilation step. Can you check it out? sudo pip3 install asciinema.

<!-- gh-comment-id:232301512 --> @ku1ik commented on GitHub (Jul 13, 2016): @ligurio Thanks for the patches! I don't know how to resolve the last problem either. Anyway, I just released v1.3.0. It solves this problem (and many others!) because it's implemented in Python (it's based on v0.9.8 codebase) so it doesn't have a compilation step. Can you check it out? `sudo pip3 install asciinema`.
Author
Owner

@ligurio commented on GitHub (Jul 13, 2016):

Works fine. https://asciinema.org/a/79462

<!-- gh-comment-id:232314554 --> @ligurio commented on GitHub (Jul 13, 2016): Works fine. https://asciinema.org/a/79462
Author
Owner

@ku1ik commented on GitHub (Jul 13, 2016):

Thanks! I'll update the site to so it says we support OpenBSD now :)

<!-- gh-comment-id:232317516 --> @ku1ik commented on GitHub (Jul 13, 2016): Thanks! I'll update the site to so it says we support OpenBSD now :)
Author
Owner

@ligurio commented on GitHub (Jul 13, 2016):

Thank you!

<!-- gh-comment-id:232326007 --> @ligurio commented on GitHub (Jul 13, 2016): Thank you!
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/asciinema#726
No description provided.