Open Bug 1544576 Opened 5 years ago Updated 2 years ago

mach build did not rebuild gfx/layers/Unified_cpp_gfx_layers9.o when I changed gfx/layers/ipc/SharedRGBImage.cpp

Categories

(Firefox Build System :: General, defect, P3)

defect

Tracking

(Not tracked)

People

(Reporter: mstange, Unassigned)

References

(Blocks 1 open bug)

Details

(Keywords: in-triage)

Today I got in a state where an object file refused to be rebuilt after I touched a cpp file and a few header files that contributed to it.

This was on macOS 10.12.6, and I'm using sccache but I think that's not relevant here.

My base revision was mozilla-central rev 6b5221949e77.

The object file in question was gfx/layers/Unified_cpp_gfx_layers9.o. Unified_cpp_gfx_layers9.cpp includes gfx/layers/ipc/SharedRGBImage.cpp.

Markuss-MacBook-Pro:obj-m-opt mstange$ ls -l gfx/layers/Unified_cpp_gfx_layers9.cpp
-rw-r--r--  1 mstange  staff  7521  7 Apr 00:29 gfx/layers/Unified_cpp_gfx_layers9.cpp
Markuss-MacBook-Pro:obj-m-opt mstange$ ls -l gfx/layers/Unified_cpp_gfx_layers9.o
-rw-r-----  1 mstange  staff  13481508  9 Apr 22:27 gfx/layers/Unified_cpp_gfx_layers9.o
Markuss-MacBook-Pro:obj-m-opt mstange$ ls -l ../mozilla/gfx/layers/ipc/SharedRGBImage.cpp
-rw-r--r--  1 mstange  staff  6107 15 Apr 17:13 ../mozilla/gfx/layers/ipc/SharedRGBImage.cpp

As a result, when I made changes, the build system would happily recompile other code, but Unified_cpp_gfx_layers9.o would remain the same, and then mixed stuff would be linked together into XUL, and then things would crash at runtime because of incorrect vtables.

I have deleted Unified_cpp_gfx_layers9.o and things are working correctly again.

I think this is probably the same issue as bug 1540877. If you hit it again, can you post the content of the corresponding .pp file in .deps? Eg: obj/gfx/layers/Unified_cpp_gfx_layers9.o would have obj/gfx/layers/.deps/Unified_cpp_gfx_layers9.o.pp

I suspect what's happening is after a failure or perhaps a Ctrl-C'd build, the .pp file is created, but left empty, which removes make's dependency information for the .o file. The other bug was also associated with sccache, which may explain why we started seeing these recently.

See Also: → 1540877

Thanks, I will capture the .pp file the next time I hit this. I definitely Ctrl-C'd a build at some point before this started happening.

Blocks: clobber

I've hit a similar issue with nsCocoaWindow.mm, which is compiled into widget/cocoa/Unified_mm_widget_cocoa1.o. The .deps directory does not have a Unified_mm_widget_cocoa1.o.pp file, though!

Unified_mm_widget_cocoa0.o.pp exists, Unified_mm_widget_cocoa1.o.pp and Unified_mm_widget_cocoa2.o.pp do not exist.

I don't remember if I hit Ctrl+C within the last half hour.

Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.