Closed Bug 976853 Opened 6 years ago Closed 6 years ago

.pp files being considered as prerequisites of binaries

Categories

(Firefox Build System :: General, defect)

All
Linux
defect
Not set

Tracking

(Not tracked)

RESOLVED FIXED
mozilla30

People

(Reporter: gps, Assigned: glandium)

Details

Attachments

(1 file)

:roc was opining on #developers about how js/src/host_jskwgen is being rebuilt on every build. I asked him to send me his |make -d| output. The relevant parts:

GNU Make 3.82
Built for x86_64-redhat-linux-gnu
Reading makefile `.deps/host_jskwgen.o.pp' (search path) (don't care) (no ~ expansion)...
Reading makefile `.deps/host_jskwgen.pp' (search path) (don't care) (no ~ expansion)...
Considering target file `.deps/host_jskwgen.pp'.
  Looking for an implicit rule for `.deps/host_jskwgen.pp'.
  No implicit rule found for `.deps/host_jskwgen.pp'.
  Finished prerequisites of target file `.deps/host_jskwgen.pp'.
 No recipe for `.deps/host_jskwgen.pp' and no prerequisites actually changed.
 No need to remake target `.deps/host_jskwgen.pp'.
 Considering target file `.deps/host_jskwgen.o.pp'.
  Looking for an implicit rule for `.deps/host_jskwgen.o.pp'.
  No implicit rule found for `.deps/host_jskwgen.o.pp'.
  Finished prerequisites of target file `.deps/host_jskwgen.o.pp'.
 No need to remake target `.deps/host_jskwgen.o.pp'.
Considering target file `host_jskwgen'.
  Considering target file `host_jskwgen.o'.
Finished prerequisites of target file `host_jskwgen.o'.
   Prerequisite `/home/roc/mozilla-inbound/js/src/jskwgen.cpp' is older than target `host_jskwgen.o'.
   Prerequisite `.deps/.mkdir.done' is older than target `host_jskwgen.o'.
   Prerequisite `backend.mk' is older than target `host_jskwgen.o'.
   Prerequisite `Makefile' is older than target `host_jskwgen.o'.
   Prerequisite `../../config/autoconf.mk' is older than target `host_jskwgen.o'.
   Prerequisite `/home/roc/mozilla-inbound/config/config.mk' is older than target `host_jskwgen.o'.
   Prerequisite `backend.mk' is older than target `host_jskwgen.o'.
   Prerequisite `Makefile' is older than target `host_jskwgen.o'.
   Prerequisite `../../config/autoconf.mk' is older than target `host_jskwgen.o'.
   Prerequisite `/home/roc/mozilla-inbound/config/config.mk' is older than target `host_jskwgen.o'.
   Prerequisite `/home/roc/mozilla-inbound/js/src/jskwgen.cpp' is older than target `host_jskwgen.o'.
   Prerequisite `/usr/include/stdc-predef.h' is older than target `host_jskwgen.o'.
   <Lots of .h files snipped>
   Prerequisite `/home/roc/mozilla-inbound/js/src/vm/Keywords.h' is older than target `host_jskwgen.o'.
  No need to remake target `host_jskwgen.o'.
  Pruning file `backend.mk'.
  Pruning file `Makefile'.
  Pruning file `../../config/autoconf.mk'.
  Pruning file `/home/roc/mozilla-inbound/config/config.mk'.
  Considering target file `.deps/host_jskwgen.pp'.
  File `.deps/host_jskwgen.pp' was considered already.
  Pruning file `host_jskwgen.o'.
 Finished prerequisites of target file `host_jskwgen'.
 Prerequisite `host_jskwgen.o' is older than target `host_jskwgen'.
 Prerequisite `backend.mk' is older than target `host_jskwgen'.
 Prerequisite `Makefile' is older than target `host_jskwgen'.
 Prerequisite `../../config/autoconf.mk' is older than target `host_jskwgen'.
 Prerequisite `/home/roc/mozilla-inbound/config/config.mk' is older than target `host_jskwgen'.
 Prerequisite `.deps/host_jskwgen.pp' is newer than target `host_jskwgen'.
 Prerequisite `host_jskwgen.o' is older than target `host_jskwgen'.
Must remake target `host_jskwgen'.
host_jskwgen
Need a job token; we don't have children
Invoking recipe from /home/roc/mozilla-inbound/config/rules.mk:825 to update target `host_jskwgen'.
Putting child 0x8cbac0 (host_jskwgen) PID 29328 on the chain.
Recipe of `host_jskwgen' is being run.
Live child 0x8cbac0 (host_jskwgen) PID 29328 
Reaping winning child 0x8cbac0 PID 29328 
Removing child 0x8cbac0 PID 29328 from chain.
Considering target file `host_jskwgen'.
File `host_jskwgen' was considered already.

The most significant line in there:

   Prerequisite `.deps/host_jskwgen.pp' is newer than target `host_jskwgen'.

That, uh, shouldn't happen!

GNU Make 3.81 on OS X and "mozmake" 4.0-23-g9d58570 on Windows don't add the .pp file as a dependency. I wonder why roc's machine is different.

roc: can you paste the contents of the js/src/.deps/host_jskwgen* files?
Flags: needinfo?(roc)
[roc@eternity mozilla-inbound]$ cat obj-ff-debug/js/src/.deps/host_jskwgen.pp 
host_jskwgen: .deps/host_jskwgen.pp host_jskwgen.o
.deps/host_jskwgen.pp host_jskwgen.o:
Flags: needinfo?(roc)
[roc@eternity mozilla-inbound]$ make --version
GNU Make 3.82
Built for x86_64-redhat-linux-gnu
How about host_jskwgen.o.pp ?
Ok, could reproduce, and found the problem.
Let's go with this simple workaround. I'm going to kill expandlibs soon enough.
Attachment #8381912 - Flags: review?(gps)
Assignee: nobody → mh+mozilla
Status: NEW → ASSIGNED
Attachment #8381912 - Flags: review?(gps) → review+
https://hg.mozilla.org/mozilla-central/rev/29f7aa21c9e2
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla30
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.