Closed Bug 1322025 Opened 8 years ago Closed 8 years ago

./configure --help does not work

Categories

(Firefox Build System :: General, defect)

All
Unspecified
defect
Not set
normal

Tracking

(firefox52 unaffected, firefox53 fixed, firefox54 fixed)

RESOLVED FIXED
mozilla54
Tracking Status
firefox52 --- unaffected
firefox53 --- fixed
firefox54 --- fixed

People

(Reporter: terabit.funtoo, Assigned: glandium)

References

()

Details

Attachments

(7 files)

User Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.116 Safari/537.36 Steps to reproduce: r./configure --help #on a fresh clone and bootstrap Actual results: checking for a shell... Traceback (most recent call last): File "./configure.py", line 107, in <module> sys.exit(main(sys.argv)) File "./configure.py", line 26, in main sandbox.run(os.path.join(os.path.dirname(__file__), 'moz.configure')) File "/crypt/firefox/firefox/python/mozbuild/mozbuild/configure/__init__.py", line 334, in run self.include_file(path) File "/crypt/firefox/firefox/python/mozbuild/mozbuild/configure/__init__.py", line 325, in include_file exec_(code, self) File "/crypt/firefox/firefox/python/mozbuild/mozbuild/util.py", line 59, in exec_ exec(object, globals, locals) File "/crypt/firefox/firefox/moz.configure", line 112, in <module> when='--enable-compile-environment') File "/crypt/firefox/firefox/python/mozbuild/mozbuild/configure/__init__.py", line 630, in include_impl self.include_file(what) File "/crypt/firefox/firefox/python/mozbuild/mozbuild/configure/__init__.py", line 325, in include_file exec_(code, self) File "/crypt/firefox/firefox/python/mozbuild/mozbuild/util.py", line 59, in exec_ exec(object, globals, locals) File "/crypt/firefox/firefox/build/moz.configure/toolchain.configure", line 974, in <module> include('windows.configure', when=is_windows) File "/crypt/firefox/firefox/python/mozbuild/mozbuild/configure/__init__.py", line 630, in include_impl self.include_file(what) File "/crypt/firefox/firefox/python/mozbuild/mozbuild/configure/__init__.py", line 325, in include_file exec_(code, self) File "/crypt/firefox/firefox/python/mozbuild/mozbuild/util.py", line 59, in exec_ exec(object, globals, locals) File "/crypt/firefox/firefox/build/moz.configure/windows.configure", line 8, in <module> help='Windows SDK version to target. Win 8.1 (603) is currently' File "/crypt/firefox/firefox/python/mozbuild/mozbuild/configure/__init__.py", line 562, in option_impl self._value_for(when, need_help_dependency=True)): File "/crypt/firefox/firefox/python/mozbuild/mozbuild/configure/__init__.py", line 409, in _value_for return self._value_for_depends(obj, need_help_dependency) File "/crypt/firefox/firefox/python/mozbuild/mozbuild/util.py", line 925, in method_call cache[args] = self.func(instance, *args) File "/crypt/firefox/firefox/python/mozbuild/mozbuild/configure/__init__.py", line 419, in _value_for_depends return obj.result File "/crypt/firefox/firefox/python/mozbuild/mozbuild/util.py", line 943, in __get__ setattr(instance, name, self.func(instance)) File "/crypt/firefox/firefox/python/mozbuild/mozbuild/configure/__init__.py", line 134, in result resolved_args = [self.sandbox._value_for(d) for d in deps] File "/crypt/firefox/firefox/python/mozbuild/mozbuild/configure/__init__.py", line 409, in _value_for return self._value_for_depends(obj, need_help_dependency) File "/crypt/firefox/firefox/python/mozbuild/mozbuild/util.py", line 925, in method_call cache[args] = self.func(instance, *args) File "/crypt/firefox/firefox/python/mozbuild/mozbuild/configure/__init__.py", line 419, in _value_for_depends return obj.result File "/crypt/firefox/firefox/python/mozbuild/mozbuild/util.py", line 943, in __get__ setattr(instance, name, self.func(instance)) File "/crypt/firefox/firefox/python/mozbuild/mozbuild/configure/__init__.py", line 89, in result resolved_args = [self.sandbox._value_for(d) for d in self.dependencies] File "/crypt/firefox/firefox/python/mozbuild/mozbuild/configure/__init__.py", line 409, in _value_for return self._value_for_depends(obj, need_help_dependency) File "/crypt/firefox/firefox/python/mozbuild/mozbuild/util.py", line 925, in method_call cache[args] = self.func(instance, *args) File "/crypt/firefox/firefox/python/mozbuild/mozbuild/configure/__init__.py", line 419, in _value_for_depends return obj.result File "/crypt/firefox/firefox/python/mozbuild/mozbuild/util.py", line 943, in __get__ setattr(instance, name, self.func(instance)) File "/crypt/firefox/firefox/python/mozbuild/mozbuild/configure/__init__.py", line 89, in result resolved_args = [self.sandbox._value_for(d) for d in self.dependencies] File "/crypt/firefox/firefox/python/mozbuild/mozbuild/configure/__init__.py", line 409, in _value_for return self._value_for_depends(obj, need_help_dependency) File "/crypt/firefox/firefox/python/mozbuild/mozbuild/util.py", line 925, in method_call cache[args] = self.func(instance, *args) File "/crypt/firefox/firefox/python/mozbuild/mozbuild/configure/__init__.py", line 419, in _value_for_depends return obj.result File "/crypt/firefox/firefox/python/mozbuild/mozbuild/util.py", line 943, in __get__ setattr(instance, name, self.func(instance)) File "/crypt/firefox/firefox/python/mozbuild/mozbuild/configure/__init__.py", line 89, in result resolved_args = [self.sandbox._value_for(d) for d in self.dependencies] File "/crypt/firefox/firefox/python/mozbuild/mozbuild/configure/__init__.py", line 409, in _value_for return self._value_for_depends(obj, need_help_dependency) File "/crypt/firefox/firefox/python/mozbuild/mozbuild/util.py", line 925, in method_call cache[args] = self.func(instance, *args) File "/crypt/firefox/firefox/python/mozbuild/mozbuild/configure/__init__.py", line 419, in _value_for_depends return obj.result File "/crypt/firefox/firefox/python/mozbuild/mozbuild/util.py", line 943, in __get__ setattr(instance, name, self.func(instance)) File "/crypt/firefox/firefox/python/mozbuild/mozbuild/configure/__init__.py", line 90, in result return self.func(*resolved_args) File "/crypt/firefox/firefox/python/mozbuild/mozbuild/configure/__init__.py", line 938, in wrapped return new_func(*args, **kwargs) File "/crypt/firefox/firefox/python/mozbuild/mozbuild/configure/__init__.py", line 671, in wrapper ret = template(*args, **kwargs) File "/crypt/firefox/firefox/build/moz.configure/checks.configure", line 53, in wrapped ret = func(*args, **kwargs) File "/crypt/firefox/firefox/python/mozbuild/mozbuild/configure/__init__.py", line 938, in wrapped return new_func(*args, **kwargs) File "/crypt/firefox/firefox/build/moz.configure/init.configure", line 286, in shell return find_program(shell) File "/crypt/firefox/firefox/python/mozbuild/mozbuild/configure/__init__.py", line 936, in wrapped self._apply_imports(func, glob) File "/crypt/firefox/firefox/python/mozbuild/mozbuild/configure/__init__.py", line 736, in _apply_imports glob[what] = self._get_one_import('%s%s' % (_from, what)) File "/crypt/firefox/firefox/python/mozbuild/mozbuild/configure/__init__.py", line 756, in _get_one_import exec_(import_line, {}, glob) File "/crypt/firefox/firefox/python/mozbuild/mozbuild/util.py", line 59, in exec_ exec(object, globals, locals) File "<string>", line 1, in <module> ImportError: No module named which Expected results: It should have listed configure options as documented and instructed in https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Build_Instructions/Configuring_Build_Options
On that last link , it says "The full list of options can be obtained by running ./configure --help." I need to know all the available build options so I can disable the problematic ones. all in all this should work but it doesn't.
Hardware: Unspecified → All
Component: Untriaged → Build Config
Product: Firefox → Core
Bisected to bug 1316957
Blocks: 1316957
Assignee: nobody → mh+mozilla
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Comment on attachment 8830193 [details] Bug 1322025 - Enforce --help requirement on indirect dependencies. https://reviewboard.mozilla.org/r/107084/#review108692
Attachment #8830193 - Flags: review?(cmanchester) → review+
Comment on attachment 8830194 [details] Bug 1322025 - Enforce --help requirement on option's when argument. https://reviewboard.mozilla.org/r/107086/#review108694
Attachment #8830194 - Flags: review?(cmanchester) → review+
Attachment #8830195 - Flags: review?(cmanchester) → review+
Comment on attachment 8830196 [details] Bug 1322025 - Don't wrap the combination function in CombinedDependsFunction. https://reviewboard.mozilla.org/r/107090/#review108740 ::: python/mozbuild/mozbuild/test/configure/test_configure.py:875 (Diff revision 1) > + with self.moz_configure(''' > + @depends(when=True) > + def always(): > + return True > + @depends(when=True) > + def always2(): > + return True > + with only_when(always2): > + option('--with-foo', help='foo', when=always) > + set_config('FOO', depends('--with-foo', when=always)(lambda x: x)) > + '''): > + self.get_config() Does this raise without the other changes in this commit? I don't see exactly how it's testing this issue.
Attachment #8830196 - Flags: review?(cmanchester)
Comment on attachment 8830197 [details] Bug 1322025 - Don't automatically add --help dependencies to CombinedDependsFunctions. https://reviewboard.mozilla.org/r/107092/#review108742
Attachment #8830197 - Flags: review?(cmanchester) → review+
Comment on attachment 8830196 [details] Bug 1322025 - Don't wrap the combination function in CombinedDependsFunction. https://reviewboard.mozilla.org/r/107090/#review108744 ::: python/mozbuild/mozbuild/test/configure/test_configure.py:875 (Diff revision 1) > + with self.moz_configure(''' > + @depends(when=True) > + def always(): > + return True > + @depends(when=True) > + def always2(): > + return True > + with only_when(always2): > + option('--with-foo', help='foo', when=always) > + set_config('FOO', depends('--with-foo', when=always)(lambda x: x)) > + '''): > + self.get_config() Yeah, it's not entirely testing it. That is, it passes by chance without the patch, while it does pass for a good reason with it. I'll try to make it fail without the patch.
Comment on attachment 8830198 [details] Bug 1322025 - Allow to combine two DependsFunctions with "|". https://reviewboard.mozilla.org/r/107094/#review108750 ::: python/mozbuild/mozbuild/configure/__init__.py:125 (Diff revision 1) > + def any(iterable): > + # Like the builtin any(), but returns the first element that is true, > + # instead of True. If none are true, returns the last element. > + for i in iterable: This is fine, I guess `first` be a better name.
Attachment #8830198 - Flags: review?(cmanchester) → review+
Comment on attachment 8830199 [details] Bug 1322025 - Provide variants of host and target that depend on --help. https://reviewboard.mozilla.org/r/107096/#review108772 ::: python/mozbuild/mozbuild/test/configure/lint.py:60 (Diff revision 1) > def lint(self, project): > sandbox = LintSandbox({ > 'OLD_CONFIGURE': os.path.join(topsrcdir, 'old-configure'), > 'MOZCONFIG': os.path.join(os.path.dirname(test_path), 'data', > 'empty_mozconfig'), > - }, ['--enable-project=%s' % project]) > + }, ['--enable-project=%s' % project, '--help']) Would it be interesting to run the lint with help as well as without it? It doesn't look like it, but it's not entirely obvious to me.
Attachment #8830199 - Flags: review?(cmanchester) → review+
(In reply to Chris Manchester (:chmanchester) from comment #18) > Comment on attachment 8830199 [details] > Bug 1322025 - Provide variants of host and target that depend on --help. > > https://reviewboard.mozilla.org/r/107096/#review108772 > > ::: python/mozbuild/mozbuild/test/configure/lint.py:60 > (Diff revision 1) > > def lint(self, project): > > sandbox = LintSandbox({ > > 'OLD_CONFIGURE': os.path.join(topsrcdir, 'old-configure'), > > 'MOZCONFIG': os.path.join(os.path.dirname(test_path), 'data', > > 'empty_mozconfig'), > > - }, ['--enable-project=%s' % project]) > > + }, ['--enable-project=%s' % project, '--help']) > > Would it be interesting to run the lint with help as well as without it? It > doesn't look like it, but it's not entirely obvious to me. Without --help, it would say there's a missing --help dependency on target.
Comment on attachment 8830198 [details] Bug 1322025 - Allow to combine two DependsFunctions with "|". https://reviewboard.mozilla.org/r/107094/#review108750 > This is fine, I guess `first` be a better name. I made it `first_true`
Comment on attachment 8830196 [details] Bug 1322025 - Don't wrap the combination function in CombinedDependsFunction. https://reviewboard.mozilla.org/r/107090/#review108802
Attachment #8830196 - Flags: review?(cmanchester) → review+
Pushed by mh@glandium.org: https://hg.mozilla.org/integration/autoland/rev/97c019e39b8f Enforce --help requirement on indirect dependencies. r=chmanchester https://hg.mozilla.org/integration/autoland/rev/42f5b6502a64 Enforce --help requirement on option's when argument. r=chmanchester https://hg.mozilla.org/integration/autoland/rev/175dabab373b Make DependsFunction.func less public. r=chmanchester https://hg.mozilla.org/integration/autoland/rev/0b17ca34cb2e Don't wrap the combination function in CombinedDependsFunction. r=chmanchester https://hg.mozilla.org/integration/autoland/rev/5e9a5b5829d1 Don't automatically add --help dependencies to CombinedDependsFunctions. r=chmanchester https://hg.mozilla.org/integration/autoland/rev/9c02acca893d Allow to combine two DependsFunctions with "|". r=chmanchester https://hg.mozilla.org/integration/autoland/rev/c78a57144263 Provide variants of host and target that depend on --help. r=chmanchester
Product: Core → Firefox Build System
Depends on: 1520410
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: