Closed Bug 1241613 Opened 4 years ago Closed 4 years ago

build-backend -b CompileDB doesn't work after only running ./mach configure

Categories

(Firefox Build System :: General, defect)

defect
Not set

Tracking

(firefox47 fixed)

RESOLVED FIXED
mozilla47
Tracking Status
firefox47 --- fixed

People

(Reporter: ehsan, Assigned: glandium)

References

Details

Attachments

(1 file)

STR:

1. Clobber.
2. $ ./mach configure
3. $ ./mach build-backend -b CompileDB
 0:01.07 /Users/ehsan/moz/src.landing/obj-ff-dbg.noindex/_virtualenv/bin/python /Users/ehsan/moz/src.landing/obj-ff-dbg.noindex/config.status --backend CompileDB
 0:00.37 /usr/bin/make -C /Users/ehsan/moz/src.landing/obj-ff-dbg.noindex/config -s showbuild
 ...
 6:55.97 /usr/bin/make -C /Users/ehsan/moz/src.landing/obj-ff-dbg.noindex/toolkit/xre -s showbuild
Traceback (most recent call last):
  File "/Users/ehsan/moz/src.landing/obj-ff-dbg.noindex/config.status", line 1025, in <module>
    config_status(**args)
  File "/Users/ehsan/moz/src.landing/python/mozbuild/mozbuild/config_status.py", line 159, in config_status
    the_backend.consume(definitions)
  File "/Users/ehsan/moz/src.landing/python/mozbuild/mozbuild/backend/base.py", line 120, in consume
    if not self.consume_object(obj):
  File "/Users/ehsan/moz/src.landing/python/mozbuild/mozbuild/compilation/database.py", line 53, in consume_object
    flags = self._get_dir_flags(obj.objdir)
  File "/Users/ehsan/moz/src.landing/python/mozbuild/mozbuild/compilation/database.py", line 105, in _get_dir_flags
    build_vars = util.get_build_vars(directory, self._cmd)
  File "/Users/ehsan/moz/src.landing/python/mozbuild/mozbuild/compilation/util.py", line 31, in get_build_vars
    line_handler=on_line)
  File "/Users/ehsan/moz/src.landing/python/mozbuild/mozbuild/base.py", line 590, in _run_make
    return fn(**params)
  File "/Users/ehsan/moz/src.landing/python/mozbuild/mozbuild/base.py", line 645, in _run_command_in_objdir
    return self.run_process(cwd=self.topobjdir, **args)
  File "/Users/ehsan/moz/src.landing/python/mach/mach/mixin/process.py", line 147, in run_process
    raise Exception('Process executed with non-0 exit code %d: %s' % (status, args))
Exception: Process executed with non-0 exit code 2: [u'/usr/bin/make', u'-C', u'/Users/ehsan/moz/src.landing/obj-ff-dbg.noindex/toolkit/xre', u'-s', 'showbuild']

Running that make command yields:

$ make -C /Users/ehsan/moz/src.landing/obj-ff-dbg.noindex/toolkit/xre -s showbuild
Makefile:47: *** Variable GRE_BUILDID does not contain a value.  Stop.

This doesn't happen after doing a full rebuild.
You need to at least run `mach build export`. That's a known issue, and will be fixed by bug 1224450.
Thanks.  Should we close this as a dupe of bug 1224450 then?
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: fast-compiledb
The last patch on bug 1246881 will actually fix this.
Duplicate of bug: 1246881
Actually, since that last patch is not specifically bound to that bug, let's move it here.
Assignee: nobody → mh+mozilla
Status: RESOLVED → REOPENED
Resolution: DUPLICATE → ---
Depends on: 1246881
Comment on attachment 8717755 [details] [diff] [review]
Only pass MOZ_BUILDID to the one source that requires it in toolkit/xre

Seems reasonable, though this doesn't fix the issue in #c0 yet. (I have this patch & bug 1246881 applied). Is there something else I'm missing?
Attachment #8717755 - Flags: review?(mshal) → review+
I thought it'd be enough, but bug 1224450 definitely fixes it anyways, so I won't look further why it's not enough.
https://hg.mozilla.org/mozilla-central/rev/33fd2913ce4a
Status: REOPENED → RESOLVED
Closed: 4 years ago4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla47
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.