Build fails inside tmux on macOS due to `_curses.error: setupterm: could not find terminfo database`
Categories
(Firefox Build System :: General, defect, P3)
Tracking
(Not tracked)
People
(Reporter: mcomella, Unassigned)
References
Details
When I try to build inside tmux on mozilla-central revision 0242545b34ca (from Jun 22), I get the following error:
_curses.error: setupterm: could not find terminfo database
File "/Users/mcomella/dev/mozilla-central/python/mozbuild/mozbuild/build_commands.py", line 221, in build
return driver.build(
File "/Users/mcomella/dev/mozilla-central/python/mozbuild/mozbuild/controller/building.py", line 1240, in build
footer = BuildProgressFooter(self.log_manager.terminal, monitor)
File "/Users/mcomella/dev/mozilla-central/python/mozbuild/mozbuild/controller/building.py", line 657, in __init__
Footer.__init__(self, terminal)
File "/Users/mcomella/dev/mozilla-central/python/mozterm/mozterm/widgets.py", line 12, in __init__
self.term = terminal or Terminal()
File "/Users/mcomella/dev/mozilla-central/python/mozterm/mozterm/terminal.py", line 53, in Terminal
return blessings.Terminal(**kwargs)
File "/Users/mcomella/dev/mozilla-central/third_party/python/blessings/blessings/__init__.py", line 97, in __init__
setupterm(kind or environ.get('TERM', 'unknown'),
I found bug 1432867, which suggests this is an issue in the blessings library where it doesn't recognize certain terminal configurations (in their case, emacs). My tmux $TERM is tmux-256color. As a workaround, I can build outside of tmux fine where $TERM is xterm-256color or by setting $TERM inside tmux to xterm-256color.
Related note: It seems problematic that blessings would crash for unknown values in this environment variable that can be set arbitrarily, especially since it fails on what I assume to be a common configuration (e.g. tmux on macOS). It seems like blessings isn't actively maintained (at least in 2019) so I wonder if we should find an alternative?
| Reporter | ||
Comment 1•3 years ago
|
||
Related note: It seems problematic that blessings would crash for unknown values in this environment variable that can be set arbitrarily,
I also get the same problem with lldb:
$ lldb
terminals database is inaccessible
So I wonder if failing if the terminfo is unavailable is a common behavior. I'm not sure what package was updated that caused all of this to start breaking.
Updated•3 years ago
|
| Reporter | ||
Comment 2•3 years ago
|
||
This comment might help us understand why this is happening: https://github.com/Homebrew/homebrew-core/issues/102748#issuecomment-1145378599
Description
•