GNU bug report logs - #76409
Failure in parallel make?

Previous Next

Package: coreutils;

Reported by: "Philip Rowlands" <phr+coreutils <at> dimebar.com>

Date: Tue, 18 Feb 2025 23:51:02 UTC

Severity: normal

To reply to this bug, email your comments to 76409 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-coreutils <at> gnu.org:
bug#76409; Package coreutils. (Tue, 18 Feb 2025 23:51:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to "Philip Rowlands" <phr+coreutils <at> dimebar.com>:
New bug report received and forwarded. Copy sent to bug-coreutils <at> gnu.org. (Tue, 18 Feb 2025 23:51:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: "Philip Rowlands" <phr+coreutils <at> dimebar.com>
To: bug-coreutils <at> gnu.org
Subject: Failure in parallel make?
Date: Tue, 18 Feb 2025 23:49:28 +0000
Using coreutils 9.6 on a vanilla Fedora 40 system, with no ./configure customizations,

This works:
$ make src/sort
...
$ src/sort --version
sort (GNU coreutils) 9.6

This fails:
$ ./configure && make -j2 src/sort
...
  GEN      src/version.c
  CC       lib/libcoreutils_a-hard-locale.o
  CC       lib/libcoreutils_a-hash.o
lib/hard-locale.c: In function 'hard_locale':
lib/hard-locale.c:30:15: error: 'SETLOCALE_NULL_MAX' undeclared (first use in this function); did you mean 'SETLOCALE_NULL_ALL_MTSAFE'?
   30 |   char locale[SETLOCALE_NULL_MAX];
      |               ^~~~~~~~~~~~~~~~~~
      |               SETLOCALE_NULL_ALL_MTSAFE
lib/hard-locale.c:30:15: note: each undeclared identifier is reported only once for each function it appears in
lib/hard-locale.c:32:7: error: implicit declaration of function 'setlocale_null_r' [-Wimplicit-function-declaration]
   32 |   if (setlocale_null_r (category, locale, sizeof (locale)))
      |       ^~~~~~~~~~~~~~~~
make: *** [Makefile:15454: lib/libcoreutils_a-hard-locale.o] Error 1
make: *** Waiting for unfinished jobs....


Let's try again:
$ make -j2 src/sort
  CC       src/sort.o
  CC       src/version.o
src/version.c:2:10: fatal error: version.h: No such file or directory
    2 | #include "version.h"
      |          ^~~~~~~~~~~
compilation terminated.
make: *** [Makefile:12848: src/version.o] Error 1
make: *** Waiting for unfinished jobs....
In file included from src/sort.c:32:
src/system.h:41:10: fatal error: configmake.h: No such file or directory
   41 | #include "configmake.h"
      |          ^~~~~~~~~~~~~~
compilation terminated.
make: *** [Makefile:12848: src/sort.o] Error 1

$ make --version
GNU Make 4.4.1
Built for x86_64-redhat-linux-gnu


Is there a dependency problem in the generated Makefile? FWIW I see similar errors trying to build src/cp and src/mv.

src/sort$(EXEEXT): $(src_sort_OBJECTS) $(src_sort_DEPENDENCIES) $(EXTRA_src_sort_DEPENDENCIES) src/$(am__dirstamp)
        @rm -f src/sort$(EXEEXT)
        $(AM_V_CCLD)$(LINK) $(src_sort_OBJECTS) $(src_sort_LDADD) $(LIBS)
src/split.$(OBJEXT): src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp)
src/temp-stream.$(OBJEXT): src/$(am__dirstamp) \
        src/$(DEPDIR)/$(am__dirstamp)


Cheers,
Phil




Information forwarded to bug-coreutils <at> gnu.org:
bug#76409; Package coreutils. (Wed, 19 Feb 2025 00:30:03 GMT) Full text and rfc822 format available.

Message #8 received at 76409 <at> debbugs.gnu.org (full text, mbox):

From: Collin Funk <collin.funk1 <at> gmail.com>
To: "Philip Rowlands" <phr+coreutils <at> dimebar.com>
Cc: 76409 <at> debbugs.gnu.org
Subject: Re: bug#76409: Failure in parallel make?
Date: Tue, 18 Feb 2025 16:29:31 -0800
"Philip Rowlands" <phr+coreutils <at> dimebar.com> writes:

> Is there a dependency problem in the generated Makefile? FWIW I see similar errors trying to build src/cp and src/mv.
>
> src/sort$(EXEEXT): $(src_sort_OBJECTS) $(src_sort_DEPENDENCIES) $(EXTRA_src_sort_DEPENDENCIES) src/$(am__dirstamp)
>         @rm -f src/sort$(EXEEXT)
>         $(AM_V_CCLD)$(LINK) $(src_sort_OBJECTS) $(src_sort_LDADD) $(LIBS)
> src/split.$(OBJEXT): src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp)
> src/temp-stream.$(OBJEXT): src/$(am__dirstamp) \
>         src/$(DEPDIR)/$(am__dirstamp)

Neither 'make -j2 src/sort' or 'make src/sort' work for me.

Running an individual target wont work since the dependencies in
src/.deps/sort.Po, for example, aren't generated.

To demonstrate:

    $ git clean -xdf
    $ ./bootstrap
    $ ./configure
    $ make src/sort
      CC       src/sort.o
    In file included from src/sort.c:32:
    src/system.h:41:10: fatal error: configmake.h: No such file or directory
       41 | #include "configmake.h"
          |          ^~~~~~~~~~~~~~
    compilation terminated.
    make: *** [Makefile:12898: src/sort.o] Error 1
    $ cat src/.deps/sort.Po
    # dummy
    $ make
    $ make clean
    $ head -n 5 src/.deps/sort.Po
    src/sort.o: src/sort.c /usr/include/stdc-predef.h lib/config.h \
     /usr/lib/gcc/x86_64-redhat-linux/14/include/stdbool.h \
     /usr/include/assert.h /usr/include/features.h \
     /usr/include/features-time64.h /usr/include/bits/wordsize.h \
     /usr/include/bits/timesize.h /usr/include/sys/cdefs.h \
    $ make src/sort
    $ ./src/sort --version
    sort (GNU coreutils) 9.6.22-7eada

Collin




Information forwarded to bug-coreutils <at> gnu.org:
bug#76409; Package coreutils. (Sat, 22 Feb 2025 13:25:02 GMT) Full text and rfc822 format available.

Message #11 received at 76409 <at> debbugs.gnu.org (full text, mbox):

From: Pádraig Brady <P <at> draigBrady.com>
To: Collin Funk <collin.funk1 <at> gmail.com>,
 Philip Rowlands <phr+coreutils <at> dimebar.com>
Cc: 76409 <at> debbugs.gnu.org
Subject: Re: bug#76409: Failure in parallel make?
Date: Sat, 22 Feb 2025 13:24:42 +0000
On 19/02/2025 00:29, Collin Funk wrote:
> "Philip Rowlands" <phr+coreutils <at> dimebar.com> writes:
> 
>> Is there a dependency problem in the generated Makefile? FWIW I see similar errors trying to build src/cp and src/mv.
>>
>> src/sort$(EXEEXT): $(src_sort_OBJECTS) $(src_sort_DEPENDENCIES) $(EXTRA_src_sort_DEPENDENCIES) src/$(am__dirstamp)
>>          @rm -f src/sort$(EXEEXT)
>>          $(AM_V_CCLD)$(LINK) $(src_sort_OBJECTS) $(src_sort_LDADD) $(LIBS)
>> src/split.$(OBJEXT): src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp)
>> src/temp-stream.$(OBJEXT): src/$(am__dirstamp) \
>>          src/$(DEPDIR)/$(am__dirstamp)
> 
> Neither 'make -j2 src/sort' or 'make src/sort' work for me.
> 
> Running an individual target wont work since the dependencies in
> src/.deps/sort.Po, for example, aren't generated.

Right. That's an automake limitation discussed at:
https://www.gnu.org/software/automake/manual/html_node/Sources.html
I.e. BUILT_SOURCES aren't dependencies of arbitrary targets,
only top level ones like 'all', 'check' etc.

cheers,
Pádraig




This bug report was last modified 9 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.