[Bug build/34439] New: parallel make install fails on multi-ABI targets: no rule to make $(inst_includedir)/gnu/lib-names-$(abi).h in csu

rudi at heitbaum dot com via Glibc-bugs <[email protected]> Mon, 27 Jul 2026 04:12:36 +0000
Newsgroups gmane.comp.lib.glibc.bugs
Message-ID <[email protected]/bugzilla/>
https://sourceware.org/bugzilla/show_bug.cgi?id=3D34439

            Bug ID: 34439
           Summary: parallel make install fails on multi-ABI targets: no
                    rule to make $(inst_includedir)/gnu/lib-names-$(abi).h
                    in csu
           Product: glibc
           Version: 2.44
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: build
          Assignee: unassigned at sourceware dot org
          Reporter: rudi at heitbaum dot com
                CC: carlos at redhat dot com
  Target Milestone: ---

make[3]: *** No rule to make target '/dest/usr/include/gnu/lib-names-hard.h=
',
   needed by 'install-others-nosubdir'.  Stop.
   make[2]: *** [Makefile:488: csu/subdir_install] Error 2

Cause: Makerules:305 adds that prerequisite in every directory, but the
$(inst_includedir)/%.h install rules exist only where $(headers) is non-emp=
ty
(Makerules:1123-1141). csu sets no headers, so it works only if the top lev=
el
installed the header first =E2=80=94 .NOTPARALLEL guaranteed that until 7ca=
c99621e96
("Makefile: Run the subdirectory recursion in parallel") dropped it without
adding an edge.

Reproducible: make -j$(nproc), then two make install DESTDIR=3D=E2=80=A6 -j=
$(nproc) runs
=E2=80=94 the second (nothing to build) races. Affects arm / aarch64 / x86 =
(all set
abi-variants); workaround -j1.


From 8b24036663eb5c8a644ca76ba8193afadc8100a7 Mon Sep 17 00:00:00 2001=20=
=20=20=20=20=20=20=20=20=20
From: Rudi Heitbaum <[email protected]>
Date: Mon, 27 Jul 2026 10:30:00 +1000
Subject: [PATCH] Makerules: install the ABI lib-names header from the top
 level only

For multi-ABI configurations Makerules adds

  install-others-nosubdir: $(inst_includedir)/$(lib-names-h-abi)

in every directory, but the $(inst_includedir)/%.h install rules are
defined only where $(headers) is non-empty.  csu defines no headers, so
in csu the prerequisite has no rule and only succeeds if the file has
already been installed by the top level, which does have $(headers).

Removing the top-level .NOTPARALLEL dropped that ordering: with
'make install -jN' the csu sub-make can run before the top-level
install-others-nosubdir and then fails with

  make[3]: *** No rule to make target
  '.../usr/include/gnu/lib-names-hard.h', needed by
  'install-others-nosubdir'.  Stop.

Restrict the dependency to the top level, where the rules to install the
header always exist.  Observed installing an armv7 hard-float build; all
multi-ABI targets (arm, aarch64, x86) are affected.
---
 Makerules | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/Makerules b/Makerules=20=20=20=20=20=20=20=20=20=20=20=20=20=
=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=
=20=20=20=20=20=20=20=20
index 6bef57e..e3666d3 100644
--- a/Makerules
+++ b/Makerules
@@ -302,7 +302,14 @@ lib-names-h-abi =3D gnu/lib-names-$(default-abi).h
 lib-names-stmp-abi =3D gnu/lib-names-$(default-abi).stmp
 before-compile +=3D $(common-objpfx)$(lib-names-h-abi)
 common-generated +=3D gnu/lib-names.h
+ifndef subdir
 install-others-nosubdir: $(inst_includedir)/$(lib-names-h-abi)
+endif
 $(common-objpfx)gnu/lib-names.h:
        $(make-target-directory)
        { \
--=20
2.47.1

--=20
You are receiving this mail because:
You are on the CC list for the bug.=