Skip to content

Problem building make -j 4 all check on Linux + GNU make #1860

Open
@jimklimov

Description

@jimklimov

Originally discussed in #1853 (comment)

Reproduced across CentOS 7 (GNU make-3.82-24.el7.x86_64, automake-1.13.4-3.el7.noarch, autoconf-2.69-11.el7.noarch) - Debian 11 (GNU make 4.3-4.1, autoconf 2.69-14, automake 1.16.3-2) - Ubuntu 21.10 (GNU make 4.3-4ubuntu1, autoconf 2.69-14, automake 1.16.4-2) range.

NOT reproduced on OpenIndiana (Sun make, automake 1.16.5, autoconf 2.71) and OpenBSD 6.5 (BSD make, AUTOCONF_VERSION=2.69, AUTOMAKE_VERSION=1.13).

It seems that the two CLI goals are processed independently by GNU make (there are indeed no explicit lines like check: all to bind them in a Makefile.am) so the two trees of make child processes build same things, overwriting each other, moving away temporary files, etc. Per evidence, other Make implementations handle this more smartly to queue deeper "shared" recipes for these goals.

A quick shot at adding check: all in the top-level Makefile.am did not help; should try adding this to all of them. Or maybe try with check-local.

Notably, de-facto at the moment the make check alone builds everything from make all (the latter has nothing to do if called after a check made from scratch) and then some for test code, but generally this should not be relied upon - in projects I've seen, scopes did differ without a 100% overlap with all sometimes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    CIEntries related to continuous integration infrastructure (historically also recipes like Makefiles)bugdocumentationpackaging

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions