<div dir="ltr"><div>I'm using GCC 9 from Fedora 31. A few things have changed regarding dependency generation, and things are now broken for PETSc. I do not have a clean solution to propose.<br></div><div><br></div><div>The problem is the way targets are emitted :<div><br></div><div><font face="monospace">$ head -n 3 arch-linux2-c-debug/obj/sys/objects/init.d <br>init.o: /home/devel/petsc/dev/src/sys/objects/init.c \<br> /home/devel/petsc/dev/include/petscsys.h \<br> /home/devel/petsc/dev/arch-linux2-c-debug/include/petscconf.h \</font><br><div><br></div><div>GCC now generates a bare "init.o" target. Using GCC 8 in a Manjaro box I get instead:</div><div><br></div><div><font face="monospace">$ head -n 3 arch-linux2-c-debug/obj/sys/objects/init.d<br>arch-linux2-c-debug/obj/sys/objects/init.o: \<br> /home/devel/petsc/src/sys/objects/init.c \<br> /home/devel/petsc/include/petscsys.h \<br></font></div><div><br></div><div>These differences totally break our use of dependencies:</div><div><br></div><div><span style="font-family:monospace">$ touch include/petscsys.h</span><br></div><div><font face="monospace">$ make<br>...<br>gmake[2]: Nothing to be done for 'all'.<br>...<br></font></div><div><br></div><div><br></div><div>My quick workaround so far has been to add this in makefiles:</div><div><br></div><div>C_DEPFLAGS   += -MT $@<br>CXX_DEPFLAGS += -MT $@<br>FC_DEPFLAGS  += -MT $@<br></div><div><br></div><div>From the GCC info page</div><div><br></div><div>'-MT TARGET'<br><br>     Change the target of the rule emitted by dependency generation.  By<br>     default CPP takes the name of the main input file, deletes any<br>     directory components and any file suffix such as '.c', and appends<br>     the platform's usual object suffix.  The result is the target.<br><br>     An '-MT' option sets the target to be exactly the string you<br>     specify.  If you want multiple targets, you can specify them as a<br>     single argument to '-MT', or use multiple '-MT' options.<br><br>     For example, '-MT '$(objpfx)foo.o'' might give<br><br>          $(objpfx)foo.o: foo.c<br></div><div><br></div>-- <br><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div>Lisandro Dalcin<br>============<br>Research Scientist<br>Extreme Computing Research Center (ECRC)<br>King Abdullah University of Science and Technology (KAUST)<br><a href="http://ecrc.kaust.edu.sa/" target="_blank">http://ecrc.kaust.edu.sa/</a><br></div></div></div></div></div></div>