You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the problem
The dependencies of source files to their respective included header files are generated from the compiler into .d files. These are used by the Makefile to know when to recompile a target.
On an HPC system, I am using Singularity in such a way that the make command sees a different filesystem than the compiler commands, and therefore sees different files. Ultimately, this means that make will presume those header files are missing and will complain that there is no rule to generate them. This makes doing this sort of thing tricky.
There is another biproduct, which is to say that if the user were to move or rename a header file that is directly or indirectly used by a test, then the build would fail without a cleaning first.
Suggested Fix
Add the -MP flag to the DEPFLAGS variable within data/Makefile.in.
Stated from the GCC manual:
-MP This option instructs CPP to add a phony target for each dependency other
than the main file, causing each to depend on nothing. These dummy rules
work around errors make gives if you remove header files without updating
the Makefile to match.
This is typical output:
test.o: test.c test.h
test.h:
We may also be interested in the -MG flag.
Alternative approaches:
Not sure.
The text was updated successfully, but these errors were encountered:
Bug Report
Describe the problem
The dependencies of source files to their respective included header files are generated from the compiler into
.d
files. These are used by the Makefile to know when to recompile a target.On an HPC system, I am using Singularity in such a way that the
make
command sees a different filesystem than the compiler commands, and therefore sees different files. Ultimately, this means thatmake
will presume those header files are missing and will complain that there is no rule to generate them. This makes doing this sort of thing tricky.There is another biproduct, which is to say that if the user were to move or rename a header file that is directly or indirectly used by a test, then the build would fail without a cleaning first.
Suggested Fix
Add the
-MP
flag to theDEPFLAGS
variable withindata/Makefile.in
.Stated from the GCC manual:
We may also be interested in the
-MG
flag.Alternative approaches:
Not sure.
The text was updated successfully, but these errors were encountered: