Comment #4 on issue 4171 by [email protected]: make sometimes "misses" dependencies on natives and will not rebuild the external startup blobs
https://code.google.com/p/v8/issues/detail?id=4171

If, instead of the 2nd make, you run:
$ make BUILDTYPE=Release -n -d

... you will get a load of output, containing something like this:
    Finished prerequisites of target file `Release/natives_blob.bin'.
Prerequisite `../tools/concatenate-files.py' is older than target `Release/natives_blob.bin'. Prerequisite `Release/obj/gen/libraries.bin' is older than target `Release/natives_blob.bin'. Prerequisite `Release/obj/gen/libraries-experimental.bin' is older than target `Release/natives_blob.bin'. Prerequisite `Release/obj/gen/libraries-extras.bin' is older than target `Release/natives_blob.bin'. Prerequisite `FORCE_DO_CMD' of target `Release/natives_blob.bin' does not exist. Prerequisite `Release/obj.target/tools/gyp/js2c.stamp' is order-only for target `Release/natives_blob.bin'.
  Must remake target `Release/natives_blob.bin'.
Need a job token; we don't have children
  Successfully remade target file `Release/natives_blob.bin'.

This nicely highlights all the bizarreness of gyp-generated makefiles:
- Note that it decides "Must remake target Release/natives_blob.bin"
- Note it says "Successfully remade target file Release/natives_blob.bin"
- Note that it didn't actually do anything in the middle.
- That's the result of FORCE_DO_CMD + $(call do_cmd,...).
- The gyp generated makefile *always* runs commands. That's for FORCE_DO_CMD does. - Then, the do_cmd macro figures out whether it had to rebuilt in the first place.
  - This, apparently, works as intended.
- The interesting part is that it claims all prerequisites are older.
- This includes Release/obj/gen/libraries-experimental.bin which was, in fact, changed in the CL.

Earlier in the same log, you will find:
Finished prerequisites of target file `Release/obj/gen/libraries-experimental.bin'. Prerequisite `_mnt_vogelheim_chrome_v8_v8_tools_gyp_v8_gyp_js2c_target_js2c_experimental.intermediate' of target `Release/obj/gen/libraries-experimental.bin' does not exist. No commands for `Release/obj/gen/libraries-experimental.bin' and no prerequisites actually changed.
  No need to remake target `Release/obj/gen/libraries-experimental.bin'.

- Note the line: "No commands for .../libraries-experimental.bin and no prerequisites actually changes." - Here, make decided that libraries-experimental.bin did not change, even though it did.

What this means is that make tried making the inputs, but did not see the inputs being changed/generated DURING EXECUTION OF THE RESPECTIVE RULES.


Now, examine out/tools/gyp/js2c.target.mk:

$(obj)/gen/libraries.cc $(obj)/gen/libraries.bin: _mnt_vogelheim_chrome_v8_v8_tools_gyp_v8_gyp_js2c_target_js2c.intermediate .INTERMEDIATE: _mnt_vogelheim_chrome_v8_v8_tools_gyp_v8_gyp_js2c_target_js2c.intermediate _mnt_vogelheim_chrome_v8_v8_tools_gyp_v8_gyp_js2c_target_js2c.intermediate: $(srcdir)/tools/js2c.py [.. all the args ..] FORCE_DO_CMD $(call do_cmd,_mnt_vogelheim_chrome_v8_v8_tools_gyp_v8_gyp_js2c_target_js2c)

These rules use an intermediate rule, to properly handle a rule with multiple outputs. Note that the nominal targets of those rules are not, in fact, generated or modified in those rules. I think this is what causes the behaviour above.

Adding a 'touch' to each of those rules should solve the problem.



--
You received this message because this project is configured to send all issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to