If ncurses isn't installed then the following error is received: $ gomuks __________ < Oh noes! > ‾‾‾\‾‾‾‾‾‾ \ ^__^ \ (XX)\_______ (__)\ )\/\ U ||----W | || || A fatal error has occurred. The stack trace has been saved to /tmp/gomuks/panic-2022-04-11--16-07-46.txt You can file an issue at https://github.com/tulir/gomuks/issues. Please provide the contents of that file when filing an issue. $ less /tmp/gomuks/panic-2022-04-11--16-07-46.txt exec: "infocmp": executable file not found in $PATH goroutine 1 [running]: runtime/debug.Stack() runtime/debug/stack.go:24 +0x65 maunium.net/go/gomuks/debug.PrettyPanic({0x2b00a0, 0xc0004b8000}) maunium.net/go/gomuks/debug/debug.go:133 +0x19a maunium.net/go/gomuks/debug.Recover() maunium.net/go/gomuks/debug/debug.go:107 +0x5a panic({0x2b00a0, 0xc0004b8000}) runtime/panic.go:838 +0x207 main.(*Gomuks).Start(0xc00052be60) maunium.net/go/gomuks/gomuks.go:116 +0x151 main.main() maunium.net/go/gomuks/main.go:89 +0x60f Installing ncurses fixes the issue.
So far I have not been able to reproduce the issue. A default FreeBSD installation comes shipped with ncurses from base: # ldconfig -r | grep -i curses 36:-lncursesw.9 => /lib/libncursesw.so.9 I just created a jail, installed gomuks from pkg and was able to launch it. Did you build your FreeBSD without nucrses?
(In reply to Emanuel Haupt from comment #1) I cannot find the issue in the source, but to reproduce you need to try and launch gomuks from a tmux session. It seems that it calls out to the infocmp utility to retrieve terminal capabilities when running from tmux, and I assume it must have some built in settings that are sufficient for the regular console.
(In reply to Duane from comment #2) Found it: https://github.com/tulir/tcell/blob/bb9a2b9b1937b1ede6a00450b2650b7b0befe2fc/terminfo/dynamic/dynamic.go#L121
(In reply to Duane from comment #3) More digging... Turns out the reason I couldn't figure out what is going on is that the author of gomuks is using a fork of the tcell library which he has modified to specifically override the TERM variable if TMUX is being used, but he overrides it to a setting which isn't compiled in to his fork (but is in the original project). I will submit a bug with gomuks, but in the meantime if you could please add a dependency on ncurses. Thanks.
(In reply to Duane from comment #4) Actually, better than adding the ncurses dependency, could you please just revert https://github.com/tulir/tcell/commit/aef08b141333dfbaad8a7f0c187d7ab7d2b203c9 in a patch. This will return gomuks to using the provided TERM variable rather than overriding it, and the definitions for screen (which tmux defaults to) are included so everything works fine.
Confirmed with tmux. Good digging. I'm looking into the reverting that breaking change with a local patch. Can you please open an issue upstream and follow up with the URL so we can track the progress and preserve history.
(In reply to Emanuel Haupt from comment #6) Upstream issue: https://github.com/tulir/gomuks/issues/363
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=fa4b531894f88d21307b3e8640b197fbe99038ec commit fa4b531894f88d21307b3e8640b197fbe99038ec Author: Emanuel Haupt <ehaupt@FreeBSD.org> AuthorDate: 2022-04-12 13:01:37 +0000 Commit: Emanuel Haupt <ehaupt@FreeBSD.org> CommitDate: 2022-04-12 13:01:54 +0000 net-im/gomuks: Fix runtime within a tmux session An upstream change [1] made it a requirement to have `infocmp` installed for parsing terminal capabilities within a tmux session. While ncurses from base works perfectly fine with gomuks, base does not ship with `infocmp` thus creating a hard dependency to devel/ncurses. Patch port to revert upstream change. [1] https://github.com/tulir/tcell/commit/aef08b141333dfbaad8a7f0c187d7ab7d2b203c9 https://github.com/tulir/tcell/blob/bb9a2b9b1937b1ede6a00450b2650b7b0befe2fc/terminfo/dynamic/dynamic.go#L121 PR: 263213 Upstream issue: https://github.com/tulir/gomuks/issues/363 Reported by: parakleta@darkreality.org net-im/gomuks/Makefile | 2 +- .../patch-vendor_maunium.net_go_tcell_tscreen.go (new) | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-)
A commit in branch 2022Q2 references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=b5a08339f85294c93af1af5abeb68c4074e2b1d8 commit b5a08339f85294c93af1af5abeb68c4074e2b1d8 Author: Emanuel Haupt <ehaupt@FreeBSD.org> AuthorDate: 2022-04-12 13:01:37 +0000 Commit: Emanuel Haupt <ehaupt@FreeBSD.org> CommitDate: 2022-04-12 13:06:25 +0000 net-im/gomuks: Fix runtime within a tmux session An upstream change [1] made it a requirement to have `infocmp` installed for parsing terminal capabilities within a tmux session. While ncurses from base works perfectly fine with gomuks, base does not ship with `infocmp` thus creating a hard dependency to devel/ncurses. Patch port to revert upstream change. [1] https://github.com/tulir/tcell/commit/aef08b141333dfbaad8a7f0c187d7ab7d2b203c9 https://github.com/tulir/tcell/blob/bb9a2b9b1937b1ede6a00450b2650b7b0befe2fc/terminfo/dynamic/dynamic.go#L121 PR: 263213 Upstream issue: https://github.com/tulir/gomuks/issues/363 Reported by: parakleta@darkreality.org (cherry picked from commit fa4b531894f88d21307b3e8640b197fbe99038ec) net-im/gomuks/Makefile | 2 +- .../patch-vendor_maunium.net_go_tcell_tscreen.go (new) | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-)
Committed (a while ago).