Bug 28922 - The .d dependency files aren't always generated
Summary: The .d dependency files aren't always generated
Status: RESOLVED FIXED
Alias: None
Product: glibc
Classification: Unclassified
Component: build (show other bugs)
Version: 2.35
: P2 normal
Target Milestone: 2.36
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-02-24 17:57 UTC by H.J. Lu
Modified: 2022-03-16 02:13 UTC (History)
3 users (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description H.J. Lu 2022-02-24 17:57:22 UTC
"make -j8" doesn't always generate .d dependency files:

[hjl@gnu-tgl-3 build-x86_64-linux]$ ls */*.dt | wc -l 
3817
[hjl@gnu-tgl-3 build-x86_64-linux]$ ls */*.d | wc -l 
4377
[hjl@gnu-tgl-3 build-x86_64-linux]$ 

As the result, many dependencies are missing.
Comment 1 Andreas Schwab 2022-02-24 18:13:49 UTC
The generation of *.d from *.dt only happens on the second round through the respective subdir, so for example if you run make check the first time all the *.dt files from compiling the testsuite sources will still be around.
Comment 2 H.J. Lu 2022-02-25 18:39:29 UTC
Fixed for 2.36 by

1fe00d3eb6 build: Properly generate .d dependency files [BZ #28922]
c12c2a41b0 benchtests: Generate .d dependency files [BZ #28922]
Comment 3 Sunil Pandey 2022-03-16 02:13:57 UTC
c12c2a41b0 benchtests: Generate .d dependency files [BZ #28922] breaks libmvec benchmark build and silently ignore it.

libmvec benchmark used to build with "make bench" command, but now it ignores it.

Reverting Rule line to its previous location fixes the libmvec benchmark issue.


$ cat 0001-benchtests-Revert-Rules-include-line-to-its-previous.patch
From 87e6cdd5cee293c178982e486eeeac3343e1d5ff Mon Sep 17 00:00:00 2001
From: Sunil K Pandey <skpgkp2@gmail.com>
Date: Tue, 15 Mar 2022 18:52:19 -0700
Subject: [PATCH] benchtests: Revert Rules include line to its previous
 location.

---
 benchtests/Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/benchtests/Makefile b/benchtests/Makefile
index d513b29903..873bbe3fa8 100644
--- a/benchtests/Makefile
+++ b/benchtests/Makefile
@@ -296,6 +296,8 @@ bench-extra-objs = json-lib.o
 extra-objs += $(bench-extra-objs)
 others-extras = $(bench-extra-objs)
 
+include ../Rules
+
 binaries-bench := $(addprefix $(objpfx)bench-,$(bench))
 extra-objs += $(addsuffix .o,$(addprefix bench-,$(bench)))
 binaries-benchset := $(addprefix $(objpfx)bench-,$(benchset))
@@ -337,8 +339,6 @@ run-bench = $(test-wrapper-env) \
 timing-type := $(objpfx)bench-timing-type
 extra-objs += bench-timing-type.o
 
-include ../Rules
-
 # This makes sure CPPFLAGS-nonlib and CFLAGS-nonlib are passed
 # for all these modules.
 cpp-srcs-left := $(binaries-benchset:=.c) $(binaries-bench:=.c) \
-- 
2.35.1