Skip to content

Fix gccdeps.scan() returning nodes that no longer exist on disk.

Hello,

There is an issue with gccdeps (doesn't happen with c_preproc), a bit annoying, reproduced by compiling and then renaming a .h file. When reproduced, waf crashes while trying to read the old file. To recompile I have to clean first...

I have debugged a while and found that gccdeps.scan() returns nodes of files that no longer exist on disk. This is what triggers that afterwards, at Task.compute_sig_implicit_deps() -> Node.get_bld_sig() -> self.h_file(), waf crashes.

This change request is to prevent gccdeps.scan() from returning nodes that are removed or renamed. After this, the signature changes (because one or more dependencies disappeared), the C file is recompiled, and the new .d fixes the dependencies.

Let me know if I missed something or there's a better fix.

Thanks! Andreu

Merge request reports