'mach" failure: error: setupterm: could not find terminal

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

'mach" failure: error: setupterm: could not find terminal

ISHIKAWA,chiaki
I have updated local comm-central repository together with the
underlying mozilla subdirectory using "python client.py checkout".
That was late December.
Ever since I could not get compile TB due to the following error.
(I am invoking mozillla/mach for build-related commands).

This seems to be the crux of the error, but I am not sure what that is.
It seems termcap/termlib-related and so I checked TERM environment
variable and the configuration setup, etc. but to no avail.
 >error: setupterm: could not find terminal

After all, I had not seen such an error before and had compiled TB for a
few years without an issue.
(Caveat: my comm-central source tree was not updated since last summer
and so it is likely this problem crept in the 2nd half of 2017.)

The error:


Error running mach:

     ['build']

The error occurred in code that was called by the mach command. This is
either
a bug in the called code itself or in the way that mach is calling it.

You should consider filing a bug for this issue.

If filing a bug, please include the full output of mach, including this
error
message.

The details of the failure are as follows:

error: setupterm: could not find terminal

   File
"/NREF-COMM-CENTRAL/comm-central/mozilla/python/mozbuild/mozbuild/mach_commands.py",
line 171, in build
     mach_context=self._mach_context)
   File
"/NREF-COMM-CENTRAL/comm-central/mozilla/python/mozbuild/mozbuild/controller/building.py",
line 944, in build
     footer = BuildProgressFooter(self.log_manager.terminal, monitor)
   File
"/NREF-COMM-CENTRAL/comm-central/mozilla/python/mozbuild/mozbuild/controller/building.py",
line 576, in __init__
     Footer.__init__(self, terminal)
   File
"/NREF-COMM-CENTRAL/comm-central/mozilla/python/mozterm/mozterm/widgets.py",
line 12, in __init__
     self.term = terminal or Terminal()
   File
"/NREF-COMM-CENTRAL/comm-central/mozilla/python/mozterm/mozterm/terminal.py",
line 49, in Terminal
     return blessings.Terminal(**kwargs)
   File
"/NREF-COMM-CENTRAL/comm-central/mozilla/third_party/python/blessings/blessings/__init__.py",
line 105, in __init__
     self._init_descriptor)

real 0m0.290s
user 0m0.201s
sys 0m0.083s

TIA

PS: commands like "mach bootstrap" works without an issue, so is clean
and configure. Only build fails now.
_______________________________________________
dev-apps-thunderbird mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-apps-thunderbird
Reply | Threaded
Open this post in threaded view
|

Re: 'mach" failure: error: setupterm: could not find terminal

Philipp Kewisch-2
One recent bug comes to mind. Not exactly the same, but also involves
setupterm: https://bugzilla.mozilla.org/show_bug.cgi?id=1300577

Hope this helps get closer to the solution.

Philipp
_______________________________________________
dev-apps-thunderbird mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-apps-thunderbird
Reply | Threaded
Open this post in threaded view
|

Re: 'mach" failure: error: setupterm: could not find terminal

ISHIKAWA,chiaki
On 2018/01/14 9:59, Philipp Kewisch wrote:
> One recent bug comes to mind. Not exactly the same, but also involves
> setupterm: https://bugzilla.mozilla.org/show_bug.cgi?id=1300577
>
> Hope this helps get closer to the solution.
>
> Philipp
>

Thank you.
It seems like some TERM-related issue then.
I will investigate, but at the same time wonder why only a few people
seemed to be affected by this.
Maybe system-supplied libraries have an issue here, I suspect.

TIA

_______________________________________________
dev-apps-thunderbird mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-apps-thunderbird
Reply | Threaded
Open this post in threaded view
|

Re: 'mach" failure: error: setupterm: could not find terminal

mozilla
In reply to this post by ISHIKAWA,chiaki
This is https://bugzilla.mozilla.org/show_bug.cgi?id=1428494 which has a
temporary fix which will hopefully land soon.

-- Tom
_______________________________________________
dev-apps-thunderbird mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-apps-thunderbird
Reply | Threaded
Open this post in threaded view
|

Re: 'mach" failure: error: setupterm: could not find terminal

ISHIKAWA,chiaki
On 2018/01/16 11:37, Tom Prince wrote:
> This is https://bugzilla.mozilla.org/show_bug.cgi?id=1428494 which has a
> temporary fix which will hopefully land soon.
>
> -- Tom

Great.

I had updated all installed packages and still no go.
I had run |strace -ff ...| during |mach| invocation to see any tell-tale
signs of missing files, but no luck.

I was scratching my head since I was not even sure where to look further.

I will study the temporary fix and see if it applies to my local source
tree and solves the bug (hopefully!).

TIA

_______________________________________________
dev-apps-thunderbird mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-apps-thunderbird
Reply | Threaded
Open this post in threaded view
|

Re: 'mach" failure: error: setupterm: could not find terminal

ISHIKAWA,chiaki
In reply to this post by mozilla
On 2018年01月20日 02:43, ISHIKAWA,chiaki wrote:

> On 2018/01/16 11:37, Tom Prince wrote:
>> This is https://bugzilla.mozilla.org/show_bug.cgi?id=1428494 which has a
>> temporary fix which will hopefully land soon.
>>
>> -- Tom
>
> Great.
>
> I had updated all installed packages and still no go.
> I had run |strace -ff ...| during |mach| invocation to see any tell-tale
> signs of missing files, but no luck.
>
> I was scratching my head since I was not even sure where to look further.
>
> I will study the temporary fix and see if it applies to my local source tree
> and solves the bug (hopefully!).
>
> TIA
>

Strange.
I still could not get past the setupterm error on on PC where I tried it in
Debian GNU/Linux.

*HOWEVER*, I have a similar yet slightly different Debian GNU/Linux
installation at my office and on that PC, the |mach build| seems to work.
It is building now (!?)

The first Debian GNU/Linux installation I mention is my home PC.

So I suspect a slight Debian GNU/Linux issue. But nonetheless,  *I* need to
find a solution to this problem since my home PC is where I do the bulk of
my patch creation for TB.
Also, I am curious if there are *OTHER* Debian GNU/Linux users who suffer
from the problem.
Maybe not many developers use Debian distribution these days. Ubuntu,
derived from Debian, seems to be much more popular.

Anyway, the only difference between my home PC and the office PC
installations is that
my home PC installation refers to so-called Debian "testing" package archive
to install more up-to-date packages: Debian is known for its conservatism
when it comes to popular software packaging and often the version offered is
at least one generation old or even older.
However, the office installation does not refer to "testing" archive and
sticks to the default archive.: I need a very stable environment for the office.

So my guess is that there could have been a binary/configuration update in
terminfo-related package(s) on my home PC that broke "setupterm"
compatibility issue or something.
My cursory check confirmed, though, TERM environment variable is correctly
set, etc. on my home PC.
This drives me nuts.

Aha, I just realized that my office PC has not updated the packages since
Christmas. I will check if the update breaks the build process. I suppose it
won't.
(I updated the packages of my home PC a few times since I realized the problem.)
I just checked. The package update still does not break build on my office PC.
So the error / problem seems to be with newer packages of Debian from
"testing" archive :-(




_______________________________________________
dev-apps-thunderbird mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-apps-thunderbird
Reply | Threaded
Open this post in threaded view
|

Re: 'mach" failure: error: setupterm: could not find terminal

ISHIKAWA,chiaki
On 2018/01/22 17:03, ishikawa wrote:

> On 2018年01月20日 02:43, ISHIKAWA,chiaki wrote:
>> On 2018/01/16 11:37, Tom Prince wrote:
>>> This is https://bugzilla.mozilla.org/show_bug.cgi?id=1428494 which has a
>>> temporary fix which will hopefully land soon.
>>>
>>> -- Tom
>>
>> Great.
>>
>> I had updated all installed packages and still no go.
>> I had run |strace -ff ...| during |mach| invocation to see any tell-tale
>> signs of missing files, but no luck.
>>
>> I was scratching my head since I was not even sure where to look further.
>>
>> I will study the temporary fix and see if it applies to my local source tree
>> and solves the bug (hopefully!).
>>
>> TIA
>>
>
> Strange.
> I still could not get past the setupterm error on on PC where I tried it in
> Debian GNU/Linux.
>
> *HOWEVER*, I have a similar yet slightly different Debian GNU/Linux
> installation at my office and on that PC, the |mach build| seems to work.
> It is building now (!?)
>
> The first Debian GNU/Linux installation I mention is my home PC.
>
> So I suspect a slight Debian GNU/Linux issue. But nonetheless,  *I* need to
> find a solution to this problem since my home PC is where I do the bulk of
> my patch creation for TB.
> Also, I am curious if there are *OTHER* Debian GNU/Linux users who suffer
> from the problem.
> Maybe not many developers use Debian distribution these days. Ubuntu,
> derived from Debian, seems to be much more popular.
>
> Anyway, the only difference between my home PC and the office PC
> installations is that
> my home PC installation refers to so-called Debian "testing" package archive
> to install more up-to-date packages: Debian is known for its conservatism
> when it comes to popular software packaging and often the version offered is
> at least one generation old or even older.
> However, the office installation does not refer to "testing" archive and
> sticks to the default archive.: I need a very stable environment for the office.
>
> So my guess is that there could have been a binary/configuration update in
> terminfo-related package(s) on my home PC that broke "setupterm"
> compatibility issue or something.
> My cursory check confirmed, though, TERM environment variable is correctly
> set, etc. on my home PC.
> This drives me nuts.
>
> Aha, I just realized that my office PC has not updated the packages since
> Christmas. I will check if the update breaks the build process. I suppose it
> won't.
> (I updated the packages of my home PC a few times since I realized the problem.)
> I just checked. The package update still does not break build on my office PC.
> So the error / problem seems to be with newer packages of Debian from
> "testing" archive :-(
>
>
>

OK, I found the cause.
The new packages under Debian GNU/Linux does not seem to honor
TERM=emacs setting.
(It used to do before the package upgrade, I think.)

I set TERM=emacs in my build script so that the invocation of
the script under ordinary terminal emulator window and the invocation
under Emacs editor's shell-mode look similar visually.

I filed a bugzilla so that someone bitten by this (a developer of Debian
GNU/Linux) can find a solution or can become aware of the issue quickly.
https://bugzilla.mozilla.org/show_bug.cgi?id=1432867

I had to modify __init__.py to tinker with the code and dump the values
passed to setupterm to see what works and what does not.
Then I could figure out the system packages are now unfriendly and even
after I created terminfo entry for |emacs|, |mach build| still fails
with the same error :-(
(This last issue probably needs more investigation on Debian side.)

TIA
_______________________________________________
dev-apps-thunderbird mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-apps-thunderbird