make[6]: *** No rule to make target `platform.ini'. Stop.

RESOLVED FIXED in Firefox 46

Status

defect
RESOLVED FIXED
4 years ago
Last year

People

(Reporter: gps, Assigned: gps)

Tracking

unspecified
mozilla46
Dependency tree / graph

Firefox Tracking Flags

(firefox46 fixed)

Details

Attachments

(3 attachments)

On OS X using GNU Make 3.81, I'm getting a failure building in artifact mode after bug 1239217:

/Applications/Xcode.app/Contents/Developer/usr/bin/make -C /Users/gps/src/firefox/objdir/toolkit/xre/ platform.ini
/Users/gps/src/firefox/objdir/_virtualenv/bin/python /Users/gps/src/firefox/toolkit/xre/make-platformini.py --buildid=20160122153750 --sourcestamp=7104d650a97d895cbbc64d53462bf86a04658abe /Users/gps/src/firefox/config/milestone.txt > platform.ini
/Applications/Xcode.app/Contents/Developer/usr/bin/make -C /Users/gps/src/firefox/objdir/dist/bin/ platform.ini
make[4]: *** No rule to make target `platform.ini'.  Stop.
make[3]: *** [/Users/gps/src/firefox/objdir/dist/bin/platform.ini] Error 2
make[2]: *** [faster] Error 2
make[1]: *** [pre-export] Error 2
make: *** [default] Error 2

From `make --debug`:

   File `/Users/gps/src/firefox/objdir/dist/bin/platform.ini' does not exist.
     Prerequisite `FORCE' of target `/Users/gps/src/firefox/objdir/toolkit/xre/platform.ini' does not exist.
     Prerequisite `/Users/gps/src/firefox/objdir/config/buildid' is newer than target `/Users/gps/src/firefox/objdir/toolkit/xre/platform.ini'.
    Must remake target `/Users/gps/src/firefox/objdir/toolkit/xre/platform.ini'.
/Applications/Xcode.app/Contents/Developer/usr/bin/make -C /Users/gps/src/firefox/objdir/toolkit/xre/ platform.ini
...
Updating goal targets....
   File `FORCE' does not exist.
  Must remake target `FORCE'.
  Successfully remade target file `FORCE'.
 Prerequisite `FORCE' of target `platform.ini' does not exist.
Must remake target `platform.ini'.
/Users/gps/src/firefox/objdir/_virtualenv/bin/python /Users/gps/src/firefox/toolkit/xre/make-platformini.py --buildid=20160122153837 --sourcestamp=7104d650a97d895cbbc64d53462bf86a04658abe /Users/gps/src/firefox/config/milestone.txt > platform.ini
Successfully remade target file `platform.ini'.
    Successfully remade target file `/Users/gps/src/firefox/objdir/toolkit/xre/platform.ini'.
  Must remake target `/Users/gps/src/firefox/objdir/dist/bin/platform.ini'.
/Applications/Xcode.app/Contents/Developer/usr/bin/make -C /Users/gps/src/firefox/objdir/dist/bin/ platform.ini
Updating goal targets....
 File `platform.ini' does not exist.
Must remake target `platform.ini'.
make[4]: *** No rule to make target `platform.ini'.  Stop.
make[3]: *** [/Users/gps/src/firefox/objdir/dist/bin/platform.ini] Error 2
make[2]: *** [faster] Error 2
make[1]: *** [pre-export] Error 2
make: *** [default] Error 2

---

From config/faster/rules.mk:

$(TOPOBJDIR)/%: FORCE
	$(MAKE) -C $(dir $@) $(notdir $@)

$(TOPOBJDIR)/faster/%: ;

$(TOPOBJDIR)/dist/%:
	rm -f $@
	mkdir -p $(@D)
	cp $< $@

Due to an apparent bug in GNU Make 3.81, the $(TOPOBJDIR)/% rule is being used instead of $(TOPOBJDIR)/dest/%. (The static pattern rule with the shortest stem is supposed to be used.) This issue is not present in GNU Make 4.1.

Patch forthcoming.
Recent changes in bug 1239217 added the faster backend to the default
build mechanism for artifact builds. This seems to have uncovered a bug
in GNU Make 3.81 where the static pattern rule with the shortest stem
wasn't executed as it should be.

We re-define the install rule for platform.ini to work around this bug.

Review commit: https://reviewboard.mozilla.org/r/32027/diff/#index_header
See other reviews: https://reviewboard.mozilla.org/r/32027/
Attachment #8711220 - Flags: review?(mh+mozilla)
Comment on attachment 8711220 [details]
MozReview Request: Bug 1242074 - Reorder pattern rules to placate GNU Make 3.81; r?glandium

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/32027/diff/1-2/
Attachment #8711220 - Attachment description: MozReview Request: Bug 1242074 - Define rule for platform.ini to work around GNU Make 3.81 bug; r?glandium → MozReview Request: Bug 1242074 - Reorder pattern rules to placate GNU Make 3.81; r?glandium
Comment on attachment 8711220 [details]
MozReview Request: Bug 1242074 - Reorder pattern rules to placate GNU Make 3.81; r?glandium

https://reviewboard.mozilla.org/r/32027/#review28781

Please wait before landing, I have additional 3.81 related fixes incoming that I will attach to this bug and want landed alongside.

::: config/faster/rules.mk:82
(Diff revision 2)
> +# Generic rule to fall back to the recursive make backend

Please add a comment that this needs to stay after the other $(TOPOBJDIR)/foo stuff because.
Attachment #8711220 - Flags: review?(mh+mozilla) → review+
For some reason, recent changes with the install-dist/% rules broke the
dummy wrapper used by `mach build faster`, leading to `Nothing to be done
for install-dist_idl.`, subsequently failing to build xpt files because
of the missing idls in dist/idl.
FasterMake needs some RecursiveMake install manifests to have been
processed before doing its work, so we can actually end up processing
them twice because of the going back and forth from FasterMake in the
hybrid build system.

Set the dependency at the RecursiveMake level when doing an hybrid
build.
Attachment #8711238 - Flags: review?(gps)
Attachment #8711239 - Flags: review?(gps)
Attachment #8711238 - Flags: review?(gps) → review+
Attachment #8711239 - Flags: review?(gps) → review+
https://hg.mozilla.org/mozilla-central/rev/6e3530547a81
https://hg.mozilla.org/mozilla-central/rev/8acdf3c85c6a
https://hg.mozilla.org/mozilla-central/rev/1378b39a9085
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla46
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.