Debian Bug report logs - #798804
make: Please add U flag in the default ARFLAGS

version graph

Package: make; Maintainer for make is Manoj Srivastava <srivasta@debian.org>; Source for make is src:make-dfsg (PTS, buildd, popcon).

Reported by: Celelibi <celelibi@gmail.com>

Date: Sun, 13 Sep 2015 02:39:02 UTC

Severity: minor

Found in version make-dfsg/4.0-8.2

Fixed in version make-dfsg/4.1-1

Done: Manoj Srivastava <srivasta@debian.org>

Bug is archived. No further changes may be made.

Toggle useless messages

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


Report forwarded to debian-bugs-dist@lists.debian.org, Manoj Srivastava <srivasta@debian.org>:
Bug#798804; Package make. (Sun, 13 Sep 2015 02:39:06 GMT) (full text, mbox, link).


Acknowledgement sent to Celelibi <celelibi@gmail.com>:
New Bug report received and forwarded. Copy sent to Manoj Srivastava <srivasta@debian.org>. (Sun, 13 Sep 2015 02:39:06 GMT) (full text, mbox, link).


Message #5 received at submit@bugs.debian.org (full text, mbox, reply):

From: Celelibi <celelibi@gmail.com>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: make: Please add U flag in the default ARFLAGS
Date: Sun, 13 Sep 2015 04:37:36 +0200
Package: make
Version: 4.0-8.2
Severity: minor

Dear maintainer,

It looks like the ar program in the binutils package in debian is now
configured with --enable-deterministic-archives, which is fine (I
guess). However, when dealing with archive members, make needs the
timestamp of the file in order to decide to update it or not. With the
current deterministic behavior of ar, the timestamp is always 0.

The following implicit rule will thus always re-add the member to the
archive as it is considered outdated.

(%): %
#  recipe to execute (built-in):
	$(AR) $(ARFLAGS) $@ $<

An undue update of a file in an archive may have a cascading effect in
both directions. The targets that depend on the archive will have to be
updated; and the archive members (if determined to be intermediate
files) will have to be rebuilt. Thus making a major part of the project
to be rebuilt for no reason.


Steps to reproduce:
1) Create a file foo.c.
int main(void) {
	return 0;
}

2) Create a Makefile.
target: archive.a(foo.o)
	echo doing something

3) Run make twice.
$ make
cc    -c -o foo.o foo.c
ar rv archive.a foo.o
ar: creating archive.a
a - foo.o
echo doing something
doing something
rm foo.o

$ make
cc    -c -o foo.o foo.c
ar rv archive.a foo.o
r - foo.o
echo doing something
doing something
rm foo.o

4) Check that the timestamp of foo.o in archive.a is 0.
$ ar tv archive.a
rw-r--r-- 0/0    848 Jan  1 01:00 1970 foo.o



I think the answer "fix your Makefile" is not appropriate for at least
two reasons:
- Make always rely on the timestamps of the file members, so taking the
  risk of not having them devoid completely the point of having implicit
  rules. And not having valid timestamps can only produce buggy cases
  like the one shown above.
- You cannot always fix the Makefiles because it's not always yours, and
  your Makefiles rely on an archive produced by a Makefile you don't
  have control over.

A workaround may be to add ARFLAGS=rvU as argument or environment
variable to make. This may work in some cases, but it's still a bit
hackish to fix from the outside a broken Makefile when a sensful default
value would fix it once for all.


Best regards,
Celelibi

-- System Information:
Debian Release: stretch/sid
  APT prefers testing
  APT policy: (990, 'testing'), (500, 'unstable'), (500, 'stable'), (1, 'experimental')
Architecture: i386 (x86_64)

Kernel: Linux 3.10.11 (SMP w/2 CPU cores; PREEMPT)
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
Init: sysvinit (via /sbin/init)

Versions of packages make depends on:
ii  libc6  2.19-19

make recommends no packages.

Versions of packages make suggests:
pn  make-doc  <none>

-- no debconf information



Information forwarded to debian-bugs-dist@lists.debian.org, Manoj Srivastava <srivasta@debian.org>:
Bug#798804; Package make. (Tue, 15 Sep 2015 03:30:03 GMT) (full text, mbox, link).


Acknowledgement sent to Celelibi <celelibi@gmail.com>:
Extra info received and forwarded to list. Copy sent to Manoj Srivastava <srivasta@debian.org>. (Tue, 15 Sep 2015 03:30:03 GMT) (full text, mbox, link).


Message #10 received at 798804@bugs.debian.org (full text, mbox, reply):

From: Celelibi <celelibi@gmail.com>
To: 798804@bugs.debian.org
Subject: Re: make: Please add U flag in the default ARFLAGS
Date: Tue, 15 Sep 2015 05:26:26 +0200
This may actually be more a bug for ar (binutils package) which
introduced a behavior that is not backward compatible and forces the
use of the option U that seems quite new and not portable.

Bug #798913 is the bug for binutils / ar.

I don't know what should happen to both of those. But at least one of
them should be fixed. The current state of those both in Debian is
inconsistent.


Celelibi



Added blocking bug(s) of 798804: 798913 Request was from Alex Vong <alexvong1995@gmail.com> to control@bugs.debian.org. (Sun, 11 Oct 2015 10:36:05 GMT) (full text, mbox, link).


Reply sent to Manoj Srivastava <srivasta@debian.org>:
You have taken responsibility. (Sun, 17 Jan 2016 09:36:25 GMT) (full text, mbox, link).


Notification sent to Celelibi <celelibi@gmail.com>:
Bug acknowledged by developer. (Sun, 17 Jan 2016 09:36:25 GMT) (full text, mbox, link).


Message #17 received at 798804-close@bugs.debian.org (full text, mbox, reply):

From: Manoj Srivastava <srivasta@debian.org>
To: 798804-close@bugs.debian.org
Subject: Bug#798804: fixed in make-dfsg 4.1-1
Date: Sun, 17 Jan 2016 09:34:32 +0000
Source: make-dfsg
Source-Version: 4.1-1

We believe that the bug you reported is fixed in the latest version of
make-dfsg, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 798804@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Manoj Srivastava <srivasta@debian.org> (supplier of updated make-dfsg package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Format: 1.8
Date: Sat, 16 Jan 2016 22:37:08 -0800
Source: make-dfsg
Binary: make make-guile
Architecture: source amd64
Version: 4.1-1
Distribution: unstable
Urgency: low
Maintainer: Manoj Srivastava <srivasta@debian.org>
Changed-By: Manoj Srivastava <srivasta@debian.org>
Description:
 make       - utility for directing compilation
 make-guile - utility for directing compilation with guile support
Closes: 761301 762017 763147 766383 798804
Changes:
 make-dfsg (4.1-1) unstable; urgency=low
 .
   * New upstream release
   * Updated Standards version to 3.9.6. No changes needed.
   * Updated the VCS-Git field of the control file to use HTTPS transport
   * Updated the copyright file to DEP-5 format.
   * Reverted to source format 1.0 , and use dgit
   * Bug fix: "Typos in manpage", thanks to Josh Triplett
    (Closes: #763147).
   * Bug fix: "[make] make version 4.1 available", thanks to LeJacq, Jean
     Pierre (Closes: #766383).
   * Demote make to priority optional, along with gcc and such. And bump
     make-guile to extra.
   * Bug fix: "Neither make nor make-guile should be standard", thanks to
     Josh Triplett (Closes: #761301).
   * Bug fix: "make instead of make-guile should be standard", thanks to
     Joey Hess (Closes: #762017).
   * Make make and make-guile be Multi-Arch: Allowed packages, since it
     might not be feasible to make make architecture agnostic.
   * Bug fix: "Please add U flag in the default ARFLAGS", thanks to
     Celelibi. I tend to agree, this was a backwards incompatible
     change. Make needs the timestamps to knpow when to update archie
     members, so nuking the timestamps changes behaviour, and remake things
     that need not be remade. This fails the principle of least surprise. I
     added a default -U to the flags make passes to arl (Closes: #798804).
Checksums-Sha1:
 460af36d6b218e9d2f6b01de0473bf1f0aef5d15 1799 make-dfsg_4.1-1.dsc
 9a6f346f7075dd76c9859c7dae40a6bf25c5cf2c 1350231 make-dfsg_4.1.orig.tar.gz
 84fa611e6219674c31212f5343c192ad93f8fb37 39253 make-dfsg_4.1-1.diff.gz
 66e45c320d204fba032a47756593078cd39ac7d5 207164 make-dbgsym_4.1-1_amd64.deb
 ac3614ad83bb02e7f59ab66991220db3d849a0ac 209190 make-guile-dbgsym_4.1-1_amd64.deb
 309648a4a6ad8031bffc201c224e201b24dbee0e 297502 make-guile_4.1-1_amd64.deb
 f550dbf22eda90d9be9ece5e3a9609129cf755d2 296366 make_4.1-1_amd64.deb
Checksums-Sha256:
 55b0f48bbf16a540e6668210edac2b2c9f81a1085c89a77b5f428b4c78b5f31d 1799 make-dfsg_4.1-1.dsc
 b3ed04fb6718289e4a430afbe2df6ecba9177aad9f6d09aaf38e5409262ca8a3 1350231 make-dfsg_4.1.orig.tar.gz
 d54d23d3e7e2934d0241626103643370081f343382696ee3474654961e5a3a27 39253 make-dfsg_4.1-1.diff.gz
 db724b20f3f3ff5550e0e119b873fd265c1afa99aa0210090ce439f6365dcb0a 207164 make-dbgsym_4.1-1_amd64.deb
 38b88c2a0d38e6fc1699fa50c54fcd501f1e972fa88ac33d38e6f9f20934b541 209190 make-guile-dbgsym_4.1-1_amd64.deb
 a1c70b6975f251b885d63eb06eaf3e8fc0f699bc88763a42983a30d1dcffc4ad 297502 make-guile_4.1-1_amd64.deb
 eb474e40800a22918d611b184eef7a84559f078e01c4fdc416e9c6855a2a4b55 296366 make_4.1-1_amd64.deb
Files:
 026d93076703d3cf85d27384b39ec9c9 1799 devel optional make-dfsg_4.1-1.dsc
 553a382b5943ad16f767061d7f81d91e 1350231 devel optional make-dfsg_4.1.orig.tar.gz
 bf0b0b2aee55623b56edc3d11f0ac214 39253 devel optional make-dfsg_4.1-1.diff.gz
 e9f4c7922e8de090246cef213fbd5bcb 207164 debug extra make-dbgsym_4.1-1_amd64.deb
 4dc01897fe14c32c9a99b354b3c470f2 209190 debug extra make-guile-dbgsym_4.1-1_amd64.deb
 ebfc388c39bd87ac161f991b57a62981 297502 devel extra make-guile_4.1-1_amd64.deb
 97057054adb0cce0c3ae2c4d041c85d0 296366 devel optional make_4.1-1_amd64.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iQFuBAEBCgBYBQJWm0vCURSAAAAAABsALXNyaXZhc3RhQGdvbGRlbi1ncnlwaG9u
LmNvbUFCQTcxMDI1QTFCNUE4OEE0RTVGNjhDMjM2QkQ3MjBGNkY1NzY0NzJfMTIz
MAAKCRA2vXIPb1dkctfgCACSbmtK3TKsVr5h+g43GYoiHT3VixLsQl+BnjJaXiwT
BRvSdx66pBiGJywEltoA6W7mI6iWlzS7sqeBk17ZchROuptp3nR/UfVLJ4STbPXZ
rESmeWldjd8e24a2ENlAH4LySxXkOuLr0uZHfyHMBvAn6ccJi3Y3U3FV99UKEIe4
EP1u8kuutHbfLHnlbS6WYo9Vgi8Ptn1GS5Z+6diU0O7fDoqFxVqP6fn3oZqIcnrv
BSoZ3IzI3OkUMU1kYjYQK9mHBL3eiteRmueEuxfzVPFI5dyQInF7pVSiTNziiuaC
KR7Xpp3qLJclAdSpTRkvN/w02zCEDvYoJKVcSjEuUuZF
=ei5M
-----END PGP SIGNATURE-----




Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Mon, 15 Feb 2016 07:25:31 GMT) (full text, mbox, link).


Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Sat Aug 19 15:09:56 2023; Machine Name: buxtehude

Debian Bug tracking system

Debbugs is free software and licensed under the terms of the GNU 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.