GNU bug report logs - #31157
Advice for help2man does not work for parallel builds

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: automake; Severity: minor; Reported by: Reuben Thomas <rrt@HIDDEN>; dated Sat, 14 Apr 2018 23:50:02 UTC; Maintainer for automake is bug-automake@HIDDEN.
Severity set to 'minor' from 'normal' Request was from Mathieu Lirzin <mthl@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at 31157 <at> debbugs.gnu.org:


Received: (at 31157) by debbugs.gnu.org; 21 Apr 2018 15:14:14 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Apr 21 11:14:14 2018
Received: from localhost ([127.0.0.1]:35141 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1f9uDM-0000Ue-IT
	for submit <at> debbugs.gnu.org; Sat, 21 Apr 2018 11:14:14 -0400
Received: from eggs.gnu.org ([208.118.235.92]:59674)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <mthl@HIDDEN>) id 1f9uDK-0000UR-PH
 for 31157 <at> debbugs.gnu.org; Sat, 21 Apr 2018 11:14:11 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <mthl@HIDDEN>) id 1f9uDB-0004Cb-4t
 for 31157 <at> debbugs.gnu.org; Sat, 21 Apr 2018 11:14:05 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50 autolearn=disabled
 version=3.3.2
Received: from fencepost.gnu.org ([2001:4830:134:3::e]:34884)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <mthl@HIDDEN>)
 id 1f9uDB-0004CS-0h; Sat, 21 Apr 2018 11:14:01 -0400
Received: from 176-179-165-201.abo.bbox.fr ([176.169.165.201]:38200 helo=godel)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <mthl@HIDDEN>)
 id 1f9uDA-0005qg-H1; Sat, 21 Apr 2018 11:14:00 -0400
From: Mathieu Lirzin <mthl@HIDDEN>
To: Reuben Thomas <rrt@HIDDEN>
Subject: Re: bug#31157: Advice for help2man does not work for parallel builds
References: <CAOnWdoiR3yGdPoAixbkw_6QDCD65uaa2b=a-HXTJysrE0eLTgA@HIDDEN>
Date: Sat, 21 Apr 2018 17:13:58 +0200
In-Reply-To: <CAOnWdoiR3yGdPoAixbkw_6QDCD65uaa2b=a-HXTJysrE0eLTgA@HIDDEN>
 (Reuben Thomas's message of "Sun, 15 Apr 2018 00:48:59 +0100")
Message-ID: <87o9ica8y1.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Received-From: 2001:4830:134:3::e
X-Spam-Score: -5.0 (-----)
X-Debbugs-Envelope-To: 31157
Cc: 31157 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -6.0 (------)

Hello Reuben,

Reuben Thomas <rrt@HIDDEN> writes:

> In the manual, we are given the following pattern for using help2man
> without breaking make distcheck:
>
> foo.1: foo.c $(top_srcdir)/configure.ac
> $(MAKE) $(AM_MAKEFLAGS) foo$(EXEEXT)
> help2man --output=3Dfoo.1 ./foo$(EXEEXT)
>
> The problem is that with make -j this can result in two attempts to
> make a library in parallel (suppose that we have:
>
> foo_LDADD =3D libfoo.la
> lib_LTLIBRARIES =3D libfoo.la
>
> ). This can fail, and in any case is wasteful.

Have you identified the reason why this can fail?  because=20

> I'm using automake 1.15. I can't see anything since then that fixes this =
problem.

Yes, this problem is likely to still be present in 1.16.1.

> The best workaround I could come up with was to revert the dependency to=
=E2=80=8B
>
> =E2=80=8B foo.1: foo$(EXEEXT)
>
> and then set distcleancheck_listfiles appropriately. Obviously, since
> this could hide other problems in the build system, it's not ideal.

This is not ideal since this result in making =E2=80=98help2man=E2=80=99 (a=
nd =E2=80=98perl=E2=80=99
transitively) a build dependency for tarball builders.

> Am I missing a better solution? If so, it should be added to the
> manual. If not, this problem should probably be documented. I'm
> finding that parallel make is becoming a must-have rather than a nice
> boost, given the proliferation of slow multi-core machines (for
> example: -j makes it feasible to hack on my phone; without it, builds
> are painfully slow).

I agree that it is important to provide a solution that support parallel
builds.  I remember that the issue has been adressed by Guix with
something like this (untested):

--8<---------------cut here---------------start------------->8---
$(srcdir)/foo.1: foo.c foo$(EXEEXT)
	-@case '$?' in \
	  *foo.c*) $(AM_V_P) && set -x || echo "  HELP2MAN $@"; \
	           LANGUAGE=3D help2man --output=3D"$(srcdir)/foo.1" ./foo$(EXEEXT=
);; \
	  *) : ;; \
	esac;
--8<---------------cut here---------------end--------------->8---

This solution handles silent rules and possible localization of the
=E2=80=98./foo --help=E2=80=99 output.  However its limitation is that if y=
ou have
another rule with =E2=80=98$(srcdir)/foo.1=E2=80=99 as a prerequisite then =
it will be
triggered at every build.

WDYT?

Thanks for the report.

--=20
Mathieu Lirzin
GPG: F2A3 8D7E EB2B 6640 5761  070D 0ADE E100 9460 4D37




Information forwarded to bug-automake@HIDDEN:
bug#31157; Package automake. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 14 Apr 2018 23:49:17 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Apr 14 19:49:17 2018
Received: from localhost ([127.0.0.1]:52886 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1f7Uuz-000860-2Q
	for submit <at> debbugs.gnu.org; Sat, 14 Apr 2018 19:49:17 -0400
Received: from eggs.gnu.org ([208.118.235.92]:42866)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <rrt@HIDDEN>) id 1f7Uuv-00085l-U6
 for submit <at> debbugs.gnu.org; Sat, 14 Apr 2018 19:49:14 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <rrt@HIDDEN>) id 1f7Uup-0007Y9-Oh
 for submit <at> debbugs.gnu.org; Sat, 14 Apr 2018 19:49:08 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=0.0 required=5.0 tests=BAYES_40,HTML_MESSAGE,
 T_DKIM_INVALID autolearn=disabled version=3.3.2
Received: from lists.gnu.org ([2001:4830:134:3::11]:53617)
 by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)
 (Exim 4.71) (envelope-from <rrt@HIDDEN>) id 1f7Uup-0007Y5-Kd
 for submit <at> debbugs.gnu.org; Sat, 14 Apr 2018 19:49:07 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:33828)
 by lists.gnu.org with esmtp (Exim 4.71)
 (envelope-from <rrt@HIDDEN>) id 1f7Uum-0006qu-Eh
 for bug-automake@HIDDEN; Sat, 14 Apr 2018 19:49:07 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <rrt@HIDDEN>) id 1f7Uuj-0007We-Vk
 for bug-automake@HIDDEN; Sat, 14 Apr 2018 19:49:04 -0400
Received: from mail-ot0-x229.google.com ([2607:f8b0:4003:c0f::229]:35002)
 by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16)
 (Exim 4.71) (envelope-from <rrt@HIDDEN>) id 1f7Uuj-0007W2-Oz
 for bug-automake@HIDDEN; Sat, 14 Apr 2018 19:49:01 -0400
Received: by mail-ot0-x229.google.com with SMTP id f47-v6so13675413oth.2
 for <bug-automake@HIDDEN>; Sat, 14 Apr 2018 16:49:01 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sc3d.org; s=google;
 h=mime-version:from:date:message-id:subject:to;
 bh=6/ZjnnnY35jE0x1YEMZZgeXJ9eACvl8eWPFTQ+32VT4=;
 b=vLUX7gvDuOi9BM6ka6Tic6PSF12gW7yy50GOS9Nm9qapcXVh3F/GrGCHLTB7yTBxy/
 4H81o4Xm5rMHj805W7S3NrUVZ2J0E8zvEDwI6KZF4Ufcst+dotTmTWIMT87ITc8xXoGG
 rMrDgCPv5ypfb/fnbEINesWHJJsQB4BTUIDXo=
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:mime-version:from:date:message-id:subject:to;
 bh=6/ZjnnnY35jE0x1YEMZZgeXJ9eACvl8eWPFTQ+32VT4=;
 b=XsCm8U24uOGxIdjbo8LvjEa4xsN9wLxVzXbf2mTOCLHxV87CjVsXVvdWJZZyzDlOOz
 RudT+Ke2CZTt42Fzc43b3jVO4dhEo8bIzN85rOr7tOjUvY5lGqXQz/Mu0xtclAnvOm/f
 in8DDBgyeky/01J2Z8W0C8TaeYt8v+/WVUXJdVxJ2tQ3Euyix6vtU5FJZtmK7EOIFkj7
 qpgTVAs5UuQiz3NGgULPFf+ZjJSQqz9dJvTtqerxc6PcShusszimcRwxdVKsWvskEMxc
 +e8GvMZeD4IFl72tEu1XI5HNGBMaA8mHAx8hBTqMeb2DIsl07PRcs9e9Gf7/fPfMrkzc
 ZOxw==
X-Gm-Message-State: ALQs6tDsAPXVQaSXyHmFJ4q+DJG1vOMsc2RcZycitqvSrr/tFNIC1XAO
 9Nq+bAmTfwPzTQet2SYzkLTZtJIV72jRjQnoMfXPJzUy
X-Google-Smtp-Source: AIpwx48ehsbuxjMWjcykXS9psmlo83Qt4HexlzA45oINooxDUKQC5u4EOL2/2Z7BWC6utqUUfDxvYvpBhhEON0agpwg=
X-Received: by 2002:a9d:4902:: with SMTP id e2-v6mr514286otf.212.1523749740232; 
 Sat, 14 Apr 2018 16:49:00 -0700 (PDT)
MIME-Version: 1.0
Received: by 2002:a9d:4611:0:0:0:0:0 with HTTP; Sat, 14 Apr 2018 16:48:59
 -0700 (PDT)
From: Reuben Thomas <rrt@HIDDEN>
Date: Sun, 15 Apr 2018 00:48:59 +0100
Message-ID: <CAOnWdoiR3yGdPoAixbkw_6QDCD65uaa2b=a-HXTJysrE0eLTgA@HIDDEN>
Subject: Advice for help2man does not work for parallel builds
To: bug-automake <bug-automake@HIDDEN>
Content-Type: multipart/alternative; boundary="000000000000fe5e620569d7a137"
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
 recognized.
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 2001:4830:134:3::11
X-Spam-Score: -4.1 (----)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -5.1 (-----)

--000000000000fe5e620569d7a137
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

In the manual, we are given the following pattern for using help2man
without breaking make distcheck:

     foo.1: foo.c $(top_srcdir)/configure.ac
             $(MAKE) $(AM_MAKEFLAGS) foo$(EXEEXT)
             help2man --output=3Dfoo.1 ./foo$(EXEEXT)

The problem is that with make -j this can result in two attempts to make a
library in parallel (suppose that we have:

    foo_LDADD =3D libfoo.la
    lib_LTLIBRARIES =3D libfoo.la

). This can fail, and in any case is wasteful.

I'm using automake 1.15. I can't see anything since then that fixes this
problem.

The best workaround I could come up with was to revert the dependency to=E2=
=80=8B

=E2=80=8B     foo.1: foo$(EXEEXT)

and then set distcleancheck_listfiles appropriately. Obviously, since this
could hide other problems in the build system, it's not ideal.

Am I missing a better solution? If so, it should be added to the manual. If
not, this problem should probably be documented. I'm finding that parallel
make is becoming a must-have rather than a nice boost, given the
proliferation of slow multi-core machines (for example: -j makes it
feasible to hack on my phone; without it, builds are painfully slow).

--=20
https://rrt.sc3d.org

--000000000000fe5e620569d7a137
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div class=3D"gmail_default" style=3D"font-family: times\ =
new\ roman, serif; font-size: small;">In the manual, we are given the follo=
wing pattern for using help2man without breaking make distcheck:<br><br>=C2=
=A0=C2=A0=C2=A0=C2=A0 foo.1: foo.c $(top_srcdir)/<a href=3D"http://configur=
e.ac">configure.ac</a><br>=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=
=C2=A0=C2=A0=C2=A0=C2=A0 $(MAKE) $(AM_MAKEFLAGS) foo$(EXEEXT)<br>=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 help2man --=
output=3Dfoo.1 ./foo$(EXEEXT)<br><br></div><div class=3D"gmail_default" sty=
le=3D"font-family: times\ new\ roman, serif; font-size: small;">The problem=
 is that with make -j this can result in two attempts to make a library in =
parallel (suppose that we have:<br><br></div><div class=3D"gmail_default" s=
tyle=3D"font-family: times\ new\ roman, serif; font-size: small;">=C2=A0=C2=
=A0=C2=A0 foo_LDADD =3D <a href=3D"http://libfoo.la">libfoo.la</a><br></div=
><div class=3D"gmail_default" style=3D"font-family: times\ new\ roman, seri=
f; font-size: small;">=C2=A0=C2=A0=C2=A0 lib_LTLIBRARIES =3D <a href=3D"htt=
p://libfoo.la">libfoo.la</a><br><br></div><div class=3D"gmail_default" styl=
e=3D"font-family: times\ new\ roman, serif; font-size: small;">). This can =
fail, and in any case is wasteful.<br></div><div class=3D"gmail_default" st=
yle=3D"font-family: times\ new\ roman, serif; font-size: small;"><br>I&#39;=
m using automake 1.15. I can&#39;t see anything since then that fixes this =
problem.<br clear=3D"all"></div><br><div style=3D"font-family: times\ new\ =
roman, serif; font-size: small;" class=3D"gmail_default">The best workaroun=
d I could come up with was to revert the dependency to=E2=80=8B</div><br><d=
iv style=3D"font-family: times\ new\ roman, serif; font-size: small;" class=
=3D"gmail_default">=E2=80=8B=C2=A0=C2=A0=C2=A0=C2=A0 foo.1: foo$(EXEEXT)<br=
><br></div><div style=3D"font-family: times\ new\ roman, serif; font-size: =
small;" class=3D"gmail_default">and then set distcleancheck_listfiles appro=
priately. Obviously, since this could hide other problems in the build syst=
em, it&#39;s not ideal.<br><br>Am I missing a better solution? If so, it sh=
ould be added to the manual. If not, this problem should probably be docume=
nted. I&#39;m finding that parallel make is becoming a must-have rather tha=
n a nice boost, given the proliferation of slow multi-core machines (for ex=
ample: -j makes it feasible to hack on my phone; without it, builds are pai=
nfully slow).<br></div><br>-- <br><div class=3D"gmail_signature"><div dir=
=3D"ltr"><a href=3D"https://rrt.sc3d.org" target=3D"_blank">https://rrt.sc3=
d.org</a></div></div>
</div>

--000000000000fe5e620569d7a137--




Acknowledgement sent to Reuben Thomas <rrt@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-automake@HIDDEN. Full text available.
Report forwarded to bug-automake@HIDDEN:
bug#31157; Package automake. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Sat, 21 Apr 2018 15:30:02 UTC

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