[blog] 01/02: 134: reflow, reword __FILE__ for more details and accuracy

Ximin Luo infinity0 at debian.org
Mon Nov 20 16:21:21 UTC 2017


This is an automated email from the git hooks/post-receive script.

infinity0 pushed a commit to branch master
in repository blog.

commit 349f1f87ad6690cdd150c33c14dfc35954fdb276
Author: Ximin Luo <infinity0 at debian.org>
Date:   Mon Nov 20 17:18:46 2017 +0100

    134: reflow, reword __FILE__ for more details and accuracy
---
 drafts/134.mdwn | 66 +++++++++++++++++++++++++++++++--------------------------
 1 file changed, 36 insertions(+), 30 deletions(-)

diff --git a/drafts/134.mdwn b/drafts/134.mdwn
index 8cfca3c..1c0e992 100644
--- a/drafts/134.mdwn
+++ b/drafts/134.mdwn
@@ -2,10 +2,21 @@
 
 Here's what happened in the [Reproducible Builds](https://reproducible-builds.org) effort between Sunday November 12 and Saturday November 18 2017:
 
+
+Past and upcoming events
+------------------------
+
+We plan to hold [an assembly at 34C3](https://events.ccc.de/congress/2017/wiki/index.php/Assembly:Reproducible-Builds) - hope to see you there!
+
+On November 17th Chris Lamb presented at the [Open Compliance Summit](http://events.linuxfoundation.org/events/open-compliance-summit/) in Yokohama, Japan on how reproducible builds can ensure the long-term sustainability of technology infrastructure.
+
+
 GSoC and Outreachy updates
 --------------------------
 
-We are pleased to announce that [Juliana Oliveira R (jwnx) will be mentored by Mattia Rizzolo](https://www.outreachy.org/alums/) on Reproducible Builds / diffoscope in this round of [Outreachy](https://www.outreachy.org/')!
+We are pleased to announce that [Juliana Oliveira R (jwnx) will be mentored by
+Mattia Rizzolo](https://www.outreachy.org/alums/) on Reproducible Builds /
+diffoscope in this round of [Outreachy](https://www.outreachy.org/')!
 
 
 Reproducible work in other projects
@@ -20,18 +31,6 @@ Reproducible work in other projects
 * The Google Container Tools team [announced the release of container-diff](https://opensource.googleblog.com/2017/11/container-diff-for-comparing-container-images.html), a new project to help uncover differences between container images.
 
 
-Upcoming events
----------------
-
-We plan to hold [an assembly at 34C3](https://events.ccc.de/congress/2017/wiki/index.php/Assembly:Reproducible-Builds) - hope to see you there!
-
-
-Past events
------------
-
-On November 17th Chris Lamb presented at the [Open Compliance Summit](http://events.linuxfoundation.org/events/open-compliance-summit/) in Yokohama, Japan on how reproducible builds can ensure the long-term sustainability of technology infrastructure.
-
-
 Bootstrapping and Diverse Double Compilation
 --------------------------------------------
 
@@ -41,23 +40,30 @@ compiles a less heavily patched TinyCC into a mes-tcc that in turn passes 41/69
 of mescc's C tests.
 
 
-BUILD_PATH_PREFIX_MAP, `__FILE__` and Qt
-----------------------------------------
-
-A patch to support the [BUILD_PATH_PREFIX_MAP](https://reproducible-builds.org/specs/build-path-prefix-map/)
-environment variable to avoid embedding build-time paths into generated files
-has been [proposed to GCC](https://gcc.gnu.org/ml/gcc-patches/2017-04/msg00513.html).
-This patch also affects the `__FILE__` environment variable, mapping it in the
-same way that debug-prefix-map works for debug symbols. The patch as it was sent
-was rejected with some concerns, and work is under way to adapt the patch to
-address those concerns.
-
-The behaviour was already backported to the patched GCC that is used for the
-unstable tests on https://tests.reproducible-builds.org . This showed that the
-new behaviour [causes problems with Qt applications using QFINDTESTDATA in
-build-time tests](https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=876901),
-since they rely on `__FILE__` being a valid (relative) file system path at build
-time.
+Qt tests and `__FILE__`
+-----------------------
+
+Our [patched
+GCC](https://tests.reproducible-builds.org/debian/index_repositories.html) that
+we use for testing Debian unstable, has uncovered an interesting issue with
+certain Qt [build-time test
+suites](https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=876901). The issue is
+that test suites using `QFINDTESTDATA` depend on `__FILE__` to expand to
+something that may be reused after compilation as a real filesystem path, when
+starting from the same working directory as the original compilation. However,
+this behaviour is not explicitly guaranteed by formal documentation about
+`__FILE__`, and thus when it is rewritten to be build-path-independent by a
+combination of our patched dpkg and GCC, the Qt tests break because their usage
+is no longer expanded to a real path as they expected.
+
+Several very short patches were suggested to resolve this issue. This includes
+a one-liner that allows our patched GCC to specifically rewrite `__FILE__` in
+Qt test code to a real path, that takes advantage of the ability to specify
+multiple mappings in [BUILD_PATH_PREFIX_MAP](https://reproducible-builds.org/specs/build-path-prefix-map/).
+
+Separately, work is under way to [address the other unrelated
+concerns](https://lists.alioth.debian.org/pipermail/reproducible-builds/Week-of-Mon-20170814/009124.html)
+raised about the patch by GCC upstream [back in August](https://gcc.gnu.org/ml/gcc-patches/2017-08/msg00232.html).
 
 
 Packages reviewed and fixed, and bugs filed

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/blog.git



More information about the Reproducible-commits mailing list