Hi. I am compiling in and aarch64 qemu chroot, if that matters. Configuration fails with Creating config.status Traceback (most recent call last): File "/var/tmp/portage/dev-lang/spidermonkey-52.9.1_pre1/work/mozjs-52.9.1pre1/js/src/../../configure.py", line 107, in <module> sys.exit(main(sys.argv)) File "/var/tmp/portage/dev-lang/spidermonkey-52.9.1_pre1/work/mozjs-52.9.1pre1/js/src/../../configure.py", line 31, in main return config_status(config) File "/var/tmp/portage/dev-lang/spidermonkey-52.9.1_pre1/work/mozjs-52.9.1pre1/js/src/../../configure.py", line 92, in config_status from mozbuild.config_status import config_status File "/var/tmp/portage/dev-lang/spidermonkey-52.9.1_pre1/work/mozjs-52.9.1pre1/build/mach_bootstrap.py", line 370, in __call__ module = self._original_import(name, globals, locals, fromlist, level) File "/var/tmp/portage/dev-lang/spidermonkey-52.9.1_pre1/work/mozjs-52.9.1pre1/python/mozbuild/mozbuild/config_status.py", line 21, in <module> from mozbuild.base import MachCommandConditions File "/var/tmp/portage/dev-lang/spidermonkey-52.9.1_pre1/work/mozjs-52.9.1pre1/build/mach_bootstrap.py", line 370, in __call__ module = self._original_import(name, globals, locals, fromlist, level) File "/var/tmp/portage/dev-lang/spidermonkey-52.9.1_pre1/work/mozjs-52.9.1pre1/python/mozbuild/mozbuild/base.py", line 17, in <module> from mach.mixin.process import ProcessExecutionMixin File "/var/tmp/portage/dev-lang/spidermonkey-52.9.1_pre1/work/mozjs-52.9.1pre1/build/mach_bootstrap.py", line 370, in __call__ module = self._original_import(name, globals, locals, fromlist, level) File "/var/tmp/portage/dev-lang/spidermonkey-52.9.1_pre1/work/mozjs-52.9.1pre1/python/mach/mach/mixin/process.py", line 29, in <module> raise Exception('Could not detect environment shell!') Exception: Could not detect environment shell! The environment variable SHELL is set to /bin/bash.
Created attachment 547506 [details] build.log
Created attachment 547508 [details] emerge --info
Created attachment 547510 [details] emerge -pqv
Runnning `export SHELL=/bin/bash` before emerge fixes this. But shouldn't this be somehow automatic?
To be clear: I see this on amd64, so it does not seem to be architecture specific.
This problem occurs on Firefoz and Thunderbird too. It seems many of the Mozilla written packages start their builds by deleting akk the environment variables to "cleanse" the build environment. I normally fix it ny putting an export command in the pkg_setup() function of the ebuild and then recalculating the manifest.
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5457e2f4fb34e39402ce387a67788022ef53d414 commit 5457e2f4fb34e39402ce387a67788022ef53d414 Author: Ian Stakenvicius <axs@gentoo.org> AuthorDate: 2018-11-17 15:57:20 +0000 Commit: Ian Stakenvicius <axs@gentoo.org> CommitDate: 2018-11-17 16:51:29 +0000 dev-lang/spidermonkey: fix SHELL every way possible The changes in this commit are overkill, but with v60 built using mach there isn't any form of precedent to set with this code, and ensuring these assignments occur will squash this bug once and for all no matter how it manifests. Bug: https://bugs.gentoo.org/666732 Signed-off-by: Ian Stakenvicius <axs@gentoo.org> Package-Manager: Portage-2.3.49, Repoman-2.3.11 dev-lang/spidermonkey/spidermonkey-52.9.1_pre1.ebuild | 5 +++++ 1 file changed, 5 insertions(+)
If any of you could try to reproduce this bug but find you can't, please let me know and I'll consider it finally closed.
timeout, assume fixed; please reopen or file a new bug if not fixed.
I've now been bitten by this as well, trying to compile dev-lang/spidermonkey-60.5.2_p0-r1 from a chroot environment (systemd-nspawn actually). I checked that really by default SHELL is unset in the chroot, and then this error occurs despite these provisions. If I edit the environment file and replace declare -- SHELL=... by declare -x SHELL=... configuration will succeed. Probably it's necessary to do it like debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=876354 and export SHELL in the global environment.
Sorry for the lack of feedback, I have been rather busy with life. I also still have this problem, now with with dev-lang/spidermonkey-60.5.2_p0-r1. I will try to reopen this bug now.
Same here, not in a chroot but with mksh as sh: > eselect sh list Available POSIX shell implementations: [1] bash [2] dash [3] mksh *
Happened again to me on dev-lang/spidermonkey-60.5.2_p0-r1.
From configure: > Ignoring --build : Unknown option > Ignoring --mandir : Unknown option > Ignoring --infodir : Unknown option > Ignoring --sysconfdir : Unknown option > Ignoring --localstatedir : Unknown option > Ignoring SHELL : Unknown option > Ignoring AR : Unknown option > Ignoring RANLIB : Unknown option Seems like something's not working right at least. Looks like the code in mozjs-60.5.2/python/mach/mach/mixin/process.py that fails is: # Perform detection of operating system environment. This is used by command # execution. We only do this once to save redundancy. Yes, this can fail module # loading. That is arguably OK. if 'SHELL' in os.environ: _current_shell = os.environ['SHELL'] elif 'MOZILLABUILD' in os.environ: _current_shell = os.environ['MOZILLABUILD'] + '/msys/bin/sh.exe' elif 'COMSPEC' in os.environ: _current_shell = os.environ['COMSPEC'] else: raise Exception('Could not detect environment shell!') Certainly looks like it depends on SHELL being set properly.
(In reply to Bernd Feige from comment #10) > I've now been bitten by this as well, trying to compile > dev-lang/spidermonkey-60.5.2_p0-r1 from a chroot environment (systemd-nspawn > actually). > > I checked that really by default SHELL is unset in the chroot, and then this > error occurs despite these provisions. I think this is it. When I try to emerge spidermonkey in an nspawn container with sometheing like > systemd-run --pty --machine hsw /usr/bin/emerge -1 spidermonkey configure fails. When I just run > /usr/bin/emerge -1 spidermonkey from a shell inside the container (that is, after running machinectl shell hsw) it works. I'm thinking SHELL is unset in the first case but not the second *and* the ebuild is setting SHELL in such a way that it's ignored.
(In reply to Matt Turner from comment #14) > From configure: > > > Ignoring --build : Unknown option > > Ignoring --mandir : Unknown option > > Ignoring --infodir : Unknown option > > Ignoring --sysconfdir : Unknown option > > Ignoring --localstatedir : Unknown option > > Ignoring SHELL : Unknown option > > Ignoring AR : Unknown option > > Ignoring RANLIB : Unknown option > > Seems like something's not working right at least. > > Looks like the code in mozjs-60.5.2/python/mach/mach/mixin/process.py that > fails is: > > # Perform detection of operating system environment. This is used by command > # execution. We only do this once to save redundancy. Yes, this can fail > module > # loading. That is arguably OK. > if 'SHELL' in os.environ: > _current_shell = os.environ['SHELL'] > elif 'MOZILLABUILD' in os.environ: > _current_shell = os.environ['MOZILLABUILD'] + '/msys/bin/sh.exe' > elif 'COMSPEC' in os.environ: > _current_shell = os.environ['COMSPEC'] > else: > raise Exception('Could not detect environment shell!') > > Certainly looks like it depends on SHELL being set properly. ...but apparently not via commandline to the now python-based configure script, the way these things are supposed to work. OK, I can work with this.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=162e8a929b04e5d7f00308afb6616e89c3ae6ed2 commit 162e8a929b04e5d7f00308afb6616e89c3ae6ed2 Author: Ian Stakenvicius <axs@gentoo.org> AuthorDate: 2019-04-26 13:47:26 +0000 Commit: Ian Stakenvicius <axs@gentoo.org> CommitDate: 2019-04-26 16:58:24 +0000 dev-lang/spidermonkey: use CONFIG_SHELL instead of SHELL Closes: https://bugs.gentoo.org/666732 Signed-off-by: Ian Stakenvicius <axs@gentoo.org> Package-Manager: Portage-2.3.62, Repoman-2.3.11 dev-lang/spidermonkey/spidermonkey-60.5.2_p0-r1.ebuild | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Not fixed. Simply run the following command to reproduce problem: env -u SHELL ebuild spidermonkey-60.5.2_p0-r1.ebuild configure
with ZSH I getting: checking for autoconf... /usr/bin/autoconf-2.13 Refreshing /var/tmp/notmpfs/portage/dev-lang/spidermonkey-60.5.2_p0-r1/work/mozjs-60.5.2/js/src/old-configure with /usr/bin/autoconf-2.13 /usr/bin/autoconf-2.13:132: read-only variable: status Traceback (most recent call last): File "/var/tmp/notmpfs/portage/dev-lang/spidermonkey-60.5.2_p0-r1/work/mozjs-60.5.2/js/src/../../configure.py", line 127, in <module> sys.exit(main(sys.argv)) File "/var/tmp/notmpfs/portage/dev-lang/spidermonkey-60.5.2_p0-r1/work/mozjs-60.5.2/js/src/../../configure.py", line 29, in main sandbox.run(os.path.join(os.path.dirname(__file__), 'moz.configure')) File "/var/tmp/notmpfs/portage/dev-lang/spidermonkey-60.5.2_p0-r1/work/mozjs-60.5.2/python/mozbuild/mozbuild/configure/__init__.py", line 428, in run func(*args) File "/var/tmp/notmpfs/portage/dev-lang/spidermonkey-60.5.2_p0-r1/work/mozjs-60.5.2/python/mozbuild/mozbuild/configure/__init__.py", line 474, in _value_for return self._value_for_depends(obj, need_help_dependency) File "/var/tmp/notmpfs/portage/dev-lang/spidermonkey-60.5.2_p0-r1/work/mozjs-60.5.2/python/mozbuild/mozbuild/util.py", line 944, in method_call cache[args] = self.func(instance, *args) File "/var/tmp/notmpfs/portage/dev-lang/spidermonkey-60.5.2_p0-r1/work/mozjs-60.5.2/python/mozbuild/mozbuild/configure/__init__.py", line 483, in _value_for_depends return obj.result(need_help_dependency) File "/var/tmp/notmpfs/portage/dev-lang/spidermonkey-60.5.2_p0-r1/work/mozjs-60.5.2/python/mozbuild/mozbuild/util.py", line 944, in method_call cache[args] = self.func(instance, *args) File "/var/tmp/notmpfs/portage/dev-lang/spidermonkey-60.5.2_p0-r1/work/mozjs-60.5.2/python/mozbuild/mozbuild/configure/__init__.py", line 123, in result return self._func(*resolved_args) File "/var/tmp/notmpfs/portage/dev-lang/spidermonkey-60.5.2_p0-r1/work/mozjs-60.5.2/python/mozbuild/mozbuild/configure/__init__.py", line 1003, in wrapped return new_func(*args, **kwargs) File "/var/tmp/notmpfs/portage/dev-lang/spidermonkey-60.5.2_p0-r1/work/mozjs-60.5.2/build/moz.configure/old.configure", line 110, in prepare_configure old_configure + '.in']) File "/usr/lib64/python2.7/subprocess.py", line 223, in check_output raise CalledProcessError(retcode, cmd, output=output) subprocess.CalledProcessError: Command '[u'/bin/zsh', u'/usr/bin/autoconf-2.13', u'--localdir=/var/tmp/notmpfs/portage/dev-lang/spidermonkey-60.5.2_p0-r1/work/mozjs-60.5.2/js/src', u'/var/tmp/notmpfs/portage/dev-lang/spidermonkey-60.5.2_p0-r1/work/mozjs-60.5.2/js/src/old-configure.in']' returned non-zero exit status 1 !!! Please attach the following file when seeking support: !!! /var/tmp/notmpfs/portage/dev-lang/spidermonkey-60.5.2_p0-r1/work/mozjs-60.5.2/jsobj/config.log * ERROR: dev-lang/spidermonkey-60.5.2_p0-r1::gentoo failed (configure phase): * econf failed ```
-r2 has been pushed which reverts shell to previous behaviour we have in Gentoo. Thanks for reporting.
(In reply to Jory A. Pratt from comment #20) > -r2 has been pushed which reverts shell to previous behaviour we have in > Gentoo. Thanks for reporting. Unfortunately, still not fixed. See comment #18. (In reply to Arfrever Frehtes Taifersar Arahesis from comment #18) > Not fixed. > Simply run the following command to reproduce problem: > env -u SHELL ebuild spidermonkey-60.5.2_p0-r1.ebuild configure
same here, running into this bug again, whatever I set sh to.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f76b0c8f379e33fd0c75bfb77649cfdd6b73d13a commit f76b0c8f379e33fd0c75bfb77649cfdd6b73d13a Author: Ian Stakenvicius <axs@gentoo.org> AuthorDate: 2019-05-02 19:04:32 +0000 Commit: Ian Stakenvicius <axs@gentoo.org> CommitDate: 2019-05-02 19:05:10 +0000 dev-lang/spidermonkey:60 set both SHELL and CONFIG_SHELL to bash Ensure the requirement of bash for shell is satisfied in the environment and build system once and for all. Closes: https://bugs.gentoo.org/666732 Signed-off-by: Ian Stakenvicius <axs@gentoo.org> Package-Manager: Portage-2.3.62, Repoman-2.3.11 dev-lang/spidermonkey/spidermonkey-60.5.2_p0-r2.ebuild | 1 + 1 file changed, 1 insertion(+)
Thanks! I can confirm that this is finally fixed.