Debian Bug report logs - #603603
parallel safe /usr/bin/ar

version graph

Package: binutils; Maintainer for binutils is Matthias Klose <[email protected]>; Source for binutils is src:binutils (PTS, buildd, popcon).

Reported by: [email protected]

Date: Mon, 15 Nov 2010 18:45:02 UTC

Severity: normal

Found in version binutils/2.20.1-15

Full log


Message #17 received at [email protected] (full text, mbox, reply):

Received: (at 603603) by bugs.debian.org; 19 Dec 2014 09:27:16 +0000
From [email protected] Fri Dec 19 09:27:16 2014
X-Spam-Checker-Version: SpamAssassin 3.3.2-bugs.debian.org_2005_01_02
	(2011-06-06) on buxtehude.debian.org
X-Spam-Level: 
X-Spam-Status: No, score=-3.8 required=4.0 tests=BAYES_00,DKIM_SIGNED,
	DKIM_VALID,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL
	autolearn=no version=3.3.2-bugs.debian.org_2005_01_02
X-Spam-Bayes: score:0.0000 Tokens: new, 22; hammy, 150; neutral, 62; spammy,
	1. spammytokens:0.889-+--Dept hammytokens:0.000-+--pearlmutter,
	0.000-+--UD:lock, 0.000-+--H*r:TLSv1.2, 0.000-+--workaround,
	0.000-+--H*F:D*cs.nuim.ie
Return-path: <[email protected]>
Received: from mail-wi0-f172.google.com ([209.85.212.172])
	by buxtehude.debian.org with esmtps (TLS1.0:RSA_ARCFOUR_SHA1:128)
	(Exim 4.80)
	(envelope-from <[email protected]>)
	id 1Y1tq7-0000NL-Mo
	for [email protected]; Fri, 19 Dec 2014 09:27:16 +0000
Received: by mail-wi0-f172.google.com with SMTP id n3so1216897wiv.17
        for <[email protected]>; Fri, 19 Dec 2014 01:27:08 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20120113;
        h=sender:from:to:subject:reply-to:date:message-id:mime-version
         :content-type;
        bh=/TD6Ak7+GRTEoTgHX8B4HwZGgZqJv2lej23mzZ/11SE=;
        b=xxA3ctaFc/0cL6IqGc9EWbT0Avwes8mEi4ci3sOej3FBT/e55QVpAM/CUJLIF1CDTk
         DzSbaVz8Bb55FVlC5GBFb5Fb7FTbnmkFyE0t7zdFDByBX/a3KvguQbjNhWFMx5+QCIiS
         rS3rmtQVL1V76vaCyK8VX3FeRKR2rNvTLeIx7apv4JlJidL3fiEoITzt01+Ya+QhBk+o
         BYT9VddWGdLldm7TYLw1B4e7i/pdILyg3XEEEazsjSeNM656IXtPgYFWmkEg4pht4IvC
         mXqwPyQFzMNgx11a/8vi0JEgWNonvl+O1avRBOQGaKU4aMPPqGW11dr45z+Vb1NKdbrC
         QiUw==
X-Received: by 10.180.221.72 with SMTP id qc8mr3925217wic.19.1418981228429;
        Fri, 19 Dec 2014 01:27:08 -0800 (PST)
Received: from dellta.hamilton.ie.cs.nuim.ie (87-198-58-119.ptr.magnet.ie. [87.198.58.119])
        by mx.google.com with ESMTPSA id p1sm12006326wjy.22.2014.12.19.01.27.07
        (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
        Fri, 19 Dec 2014 01:27:07 -0800 (PST)
Sender: "Barak A. Pearlmutter" <[email protected]>
From: "Barak A. Pearlmutter" <[email protected]>
To: [email protected]
Subject: reopened + more info
Reply-to: "Barak A. Pearlmutter" <[email protected]>
Date: Fri, 19 Dec 2014 09:26:18 +0000
Message-ID: <[email protected]>
MIME-Version: 1.0
Content-Type: text/plain
Just sent control@ message to reopen, as this issue remains present.

There is a discussion in make's info pages

  http://www.gnu.org/software/make/manual/html_node/Archive-Pitfalls.html

which reads

  11.3 Dangers When Using Archives

  It is important to be careful when using parallel execution (the -j
  switch; see Parallel Execution) and archives.  If multiple ar commands
  run at the same time on the same archive file, they will not know
  about each other and can corrupt the file.

  Possibly a future version of make will provide a mechanism to
  circumvent this problem by serializing all recipes that operate on the
  same archive file.  But for the time being, you must either write your
  makefiles to avoid this problem in some other way, or not use -j.

A workaround suggested on stackoverflow is to use

  AR := flock make-ar-tempfile.lock $(AR)

to serialize ar.  Ideally ar itself would have an option to take a lock
on the libXXX.a file it is manipulating, and make would pass that option
by default when running in non-serial mode.
--
Barak A. Pearlmutter <[email protected]>
 Hamilton Institute & Dept Comp Sci, NUI Maynooth, Co. Kildare, Ireland
 http://www.bcl.hamilton.ie/~barak/



Send a report that this bug log contains spam.


Debian bug tracking system administrator <[email protected]>. Last modified: Tue May 13 14:28:39 2025; Machine Name: buxtehude

Debian Bug tracking system

Debbugs is free software and licensed under the terms of the GNU General Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.