Open Bug 1402303 Opened 8 years ago Updated 3 years ago

configure.py: Exception: Could not detect environment shell!

Categories

(Firefox Build System :: General, defect)

55 Branch
defect

Tracking

(Not tracked)

UNCONFIRMED

People

(Reporter: pmenzel+bugzilla.mozilla.org, Unassigned)

Details

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:55.0) Gecko/20100101 Firefox/55.0 Build ID: 20170830110123 Steps to reproduce: Build Firefox in a Docker container where the environment variable `SHELL` is normally not set. Actual results: The build fails with the messages below. ``` Creating config.status Traceback (most recent call last): File "../configure.py", line 107, in <module> sys.exit(main(sys.argv)) File "../configure.py", line 31, in main return config_status(config) File "../configure.py", line 92, in config_status from mozbuild.config_status import config_status File "/home/build/firefox-esr-52.3.0esr/build/mach_bootstrap.py", line 370, in __call__ module = self._original_import(name, globals, locals, fromlist, level) File "/home/build/firefox-esr-52.3.0esr/python/mozbuild/mozbuild/config_status.py", line 21, in <module> from mozbuild.base import MachCommandConditions File "/home/build/firefox-esr-52.3.0esr/build/mach_bootstrap.py", line 370, in __call__ module = self._original_import(name, globals, locals, fromlist, level) File "/home/build/firefox-esr-52.3.0esr/python/mozbuild/mozbuild/base.py", line 17, in <module> from mach.mixin.process import ProcessExecutionMixin File "/home/build/firefox-esr-52.3.0esr/build/mach_bootstrap.py", line 370, in __call__ module = self._original_import(name, globals, locals, fromlist, level) File "/home/build/firefox-esr-52.3.0esr/python/mach/mach/mixin/process.py", line 29, in <module> raise Exception('Could not detect environment shell!') Exception: Could not detect environment shell! ``` Even passing the shell with `SHELL=/bin/bash` fails. Expected results: The build should not fail and only a POSIX shell should be required. Programs using Autotools or CMake work fine in a Docker container.
Component: Untriaged → Build Config
Product: Firefox → Core
When Docker first came out and many programs were being executed in containers for the first time, a lot of random programs broke because of missing environment variables like SHELL and USER. Anyway, the build system could probably infer a reasonable default (like /bin/sh) in the absence of SHELL. So this feels like a fixable bug. But since I don't think the bug has been reported before, it feels like low priority.
Product: Core → Firefox Build System
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.