Your message dated Sat, 15 Dec 2018 08:39:30 +0000
with message-id <[email protected]>
and subject line Bug#915055: fixed in binutils-mingw-w64 8.3
has caused the Debian Bug report #915055,
regarding binutils-mingw-w64: Nondeterminism in DLL import libraries
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
915055: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=915055
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: binutils-mingw-w64
Version: 2.27.90.20161231-1+7.4
Severity: normal
Tags: patch

Dear Maintainer,

When building a Windows DLL and accompanying import library using
'i686-w64-mingw32-ld' or 'x86_64-w64-mingw32-ld', the import library
includes build timestamps as well as UID/GID, which makes it difficult
to build a reproducible package.

A simple test:

  export SOURCE_DATE_EPOCH=0
  echo 'int foo(){return 42;}' > foo.c
  i686-w64-mingw32-gcc -shared foo.c -o foo.dll -Wl,--out-implib=foo1.dll.a
  mv foo.dll foo1.dll
  sleep 1
  i686-w64-mingw32-gcc -shared foo.c -o foo.dll -Wl,--out-implib=foo2.dll.a
  mv foo.dll foo2.dll
  diff foo1.dll foo2.dll      # succeeds
  diff foo1.dll.a foo2.dll.a  # fails

>From what I can tell, it should be easy to fix this by setting the
BFD_DETERMINISTIC_OUTPUT flag when creating the import library:

--- a/ld/pe-dll.c
+++ b/ld/pe-dll.c
@@ -2736,6 +2736,7 @@
 
   bfd_set_format (outarch, bfd_archive);
   outarch->has_armap = 1;
+  outarch->flags |= BFD_DETERMINISTIC_OUTPUT;
 
   /* Work out a reasonable size of things to put onto one line.  */
   ar_head = make_head (outarch);


(I've tested this patch on stretch, using binutils-source 2.28-5,
binutils-mingw-w64 7.4, gcc-mingw-w64 6.3.0-14+19.3.)

I can't think of any reason that this should cause compatibility
issues, since (unlike "normal" ar archives) the import library that is
generated in this way doesn't correspond to any "real" object files.
Thus, I can't think of any reason not to enable deterministic mode
unconditionally in this case.

I do, however, note the comment in bsd_write_armap (bfd/archive.c):

  "Some linkers may require that the archive filesystem modification
  time is less than (or near to) the archive map timestamp.  Those
  linkers should not be used with deterministic mode.  (GNU ld and
  Gold do not have this restriction.)"

I don't know if this comment has any relevance to MinGW or any other
Windows compilers.  (It seems unlikely, since timestamps in Windows
filesystems have historically been such a mess to begin with.)


-- System Information:
Debian Release: 9.6
  APT prefers stable
  APT policy: (990, 'stable'), (500, 'stable-updates'), (500, 'stable-debug')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.9.0-8-amd64 (SMP w/40 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), 
LANGUAGE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages binutils-mingw-w64 depends on:
ii  binutils-mingw-w64-i686    2.28-5+7.4+b4
ii  binutils-mingw-w64-x86-64  2.28-5+7.4+b4

binutils-mingw-w64 recommends no packages.

binutils-mingw-w64 suggests no packages.

-- debconf-show failed

--- End Message ---
--- Begin Message ---
Source: binutils-mingw-w64
Source-Version: 8.3

We believe that the bug you reported is fixed in the latest version of
binutils-mingw-w64, 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 [email protected],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Stephen Kitt <[email protected]> (supplier of updated binutils-mingw-w64 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 [email protected])


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

Format: 1.8
Date: Sat, 15 Dec 2018 09:25:07 +0100
Source: binutils-mingw-w64
Binary: binutils-mingw-w64 binutils-mingw-w64-i686 binutils-mingw-w64-x86-64
Architecture: source
Version: 8.3
Distribution: unstable
Urgency: medium
Maintainer: Stephen Kitt <[email protected]>
Changed-By: Stephen Kitt <[email protected]>
Description:
 binutils-mingw-w64 - Cross-binutils for Win32 and Win64 using MinGW-w64
 binutils-mingw-w64-i686 - Cross-binutils for Win32 (x86) using MinGW-w64
 binutils-mingw-w64-x86-64 - Cross-binutils for Win64 (x64) using MinGW-w64
Closes: 915055
Changes:
 binutils-mingw-w64 (8.3) unstable; urgency=medium
 .
   * Move to the team repository on Salsa.
   * Make DLL import libraries reproducible. Closes: #915055; thanks to
     Benjamin Moody for the patch.
   * Set “Rules-Requires-Root: no”.
   * Standards-Version 4.2.1, no further change required.
Checksums-Sha1:
 4fc48c4154c558463499414e21654dfa3073a30c 1901 binutils-mingw-w64_8.3.dsc
 8670da3678803453cd5f166445860d44854ce62d 10148 binutils-mingw-w64_8.3.tar.xz
 71b9e7d862d8e9dd1a2c79d5114bcb4d3e23df6c 7313 
binutils-mingw-w64_8.3_source.buildinfo
Checksums-Sha256:
 f67a540a3ed4c17f11fee31909e4d7d2d92619bf2cc6b5d13e2c076e7e0a7133 1901 
binutils-mingw-w64_8.3.dsc
 3fe780e3601b388c30d845d244756ea5a2f520e77a0c2f626f8248077fc6d52f 10148 
binutils-mingw-w64_8.3.tar.xz
 8328d15919d7b0f15c9974cb6dce99a94db583496aa15ec6938e2189c6cb4a73 7313 
binutils-mingw-w64_8.3_source.buildinfo
Files:
 efed47e605aa9e9e9e1925304e5ef902 1901 devel optional binutils-mingw-w64_8.3.dsc
 724f4321fdcbc4f9cae891afd8747671 10148 devel optional 
binutils-mingw-w64_8.3.tar.xz
 84133fc29d6c2bf9e38fb754d17d8329 7313 devel optional 
binutils-mingw-w64_8.3_source.buildinfo

-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEnPVX/hPLkMoq7x0ggNMC9Yhtg5wFAlwUun4ACgkQgNMC9Yht
g5zmqw//RmUWxeMH+oYvBSz5V5VgeckjNbYNu0zonko4XzvF8ZMGjoN3MlCWBsTI
7qdZ99RrZKeAxDVhK2a9AsifD+pTWN/y1FnfsqRBUirhG8Xxz9OpAWYT+y0TlizQ
L5csCpAal8xB/xDeiKDIT7H4KpMIVvYqTiPz6lBOjqSCHT2CS17HZ+UYbh2zAO6z
1frtRqt+dD+HNK5qW4optG9mjGznZEBGnZdGfILvxv1LrEXkflqTxXsFoy6gxmeT
AblERVco4Z+uSDCnXlPt0UubS09iM6PG22WVyghhv5dKOAKnCQliejv6xKA/VuR0
wVAOSLgiyCa3CKl/5M0n3p8E9h6sYzuYszOGQQkhpALEhgvL8DXYw+6oBM+Zyd5M
s7OklyuIlo8J1LqYTJFEeCAEgLJZSJlabmj6kg+vb4ihkUL5zdyjRDPVj6NHK3hv
pZ/gLEl2HZ31xFGWq+iwyXSptwmKIOV/y6XfQtg9ssdyZ007L997O7JPYLnRqSai
tSxfAL+u8DFtAwKWM89kiIvkp5ZgdnbibPi60SYlSdM2lPOHGJur3Vrls/QB0wp+
HcKTgXcmqryg3gfY8zo24HXzZ/hEEv8RyqDbTtvesH50iQOIu++DT3lPBdEJvkaP
Gs6NpHCbiUrK6G8Hex5SY5hLyBZxJeT1Fdr007Ri0K/oscWVhN0=
=NXxV
-----END PGP SIGNATURE-----

--- End Message ---

Reply via email to