Skip to content

Commit

Permalink
bash: fix parallel build failure on unwind_prot.o
Browse files Browse the repository at this point in the history
As reported by Robert Scott in NixOS#245066
without the change `make -j8` build of `make` occasionally fails to
buildin parallel. The simplest reproducer is:

    $$ ./configure
    $$ make unwind_prot.o
    ...
    In file included from unwind_prot.c:51:
    In file included from ./bashintl.h:30:
    ./include/gettext.h:27:11: fatal error: 'libintl.h' file not found
    # include <libintl.h>
              ^~~~~~~~~~~
    1 error generated.
    make: * [Makefile:106: unwind_prot.o] Error 1

The change adds missing ttransitive `${LIBINTL_H}` dependency for
unwind_prot.o.
  • Loading branch information
trofi committed Jul 24, 2023
1 parent 5867d14 commit 99e148d
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkgs/shells/bash/5.nix
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,10 @@ stdenv.mkDerivation rec {
url = "https://cgit.freebsd.org/ports/plain/shells/bash/files/patch-configure?id=3e147a1f594751a68fea00a28090d0792bee0b51";
sha256 = "XHFMQ6eXTReNoywdETyrfQEv1rKF8+XFbQZP4YoVKFk=";
})
# Apply parallel build fix pending upstream inclusion:
# https://savannah.gnu.org/patch/index.php?10373
# Had to fetch manually to workaround -p0 default.
./parallel.patch
];

configureFlags = [
Expand Down
12 changes: 12 additions & 0 deletions pkgs/shells/bash/parallel.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
From https://savannah.gnu.org/patch/index.php?10373
https://savannah.gnu.org/patch/download.php?file_id=54964
--- Makefile.in
+++ Makefile.in
@@ -1432,6 +1432,7 @@ siglist.o: bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h
subst.o: bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h
test.o: bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h
trap.o: bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h
+unwind_prot.o: bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h
variables.o: bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h
version.o: bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h
xmalloc.o: bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h

0 comments on commit 99e148d

Please sign in to comment.