Package: llvm-toolchain-9
Severity: normal
Tags: patch
User: reproducible-bui...@lists.alioth.debian.org
Usertags: fixfilepath ftbfs
X-Debbugs-Cc: reproducible-b...@lists.alioth.debian.org

When the reproducible=+fixfilepath feature is enabled (either through
DEB_BUILD_OPTIONS, or using a dpkg that enables this by default),
llvm-toolchain-9 fails to build from source:

  
http://qa-logs.debian.net/2020/09/26.fixfilepath/llvm-toolchain-9_9.0.1-14_unstable_fixfilepath.log

The fixfilepath feature sets a -ffile-prefix-map flag, which is only
supported in clang-10 or newer.

While the "fixfilepath" feature is not currently enabled in
dpkg-buildflags by default, it may become the default at some point in
the future, and can by triggered manually by setting
DEB_BUILD_OPTIONS=reproducible=+fixfilepath in the build environment.

More information about this issue is available at:

  
https://tests.reproducible-builds.org/debian/issues/unstable/ftbfs_due_to_f-file-prefix-map_issue.html
  
https://tests.reproducible-builds.org/debian/issues/unstable/ffile_prefix_map_passed_to_clang_issue.html

The attached patch works around this issue by disabling the fixfilepath
feature in debian/rules using DEB_BUILD_MAINT_OPTIONS=-fixfilepath.

Thanks for maintaining llvm-toolchain-9!

live well,
  vagrant
From d67e8671dda60249c76984a9ab62224570333c7a Mon Sep 17 00:00:00 2001
From: Vagrant Cascadian <vagr...@reproducible-builds.org>
Date: Fri, 23 Oct 2020 00:28:08 +0000
Subject: [PATCH] Ensure fixfilepath feature is disabled.  The fixfilepath
 feature sets a -ffile-prefix-map flag, which is only supported in clang-10.

---
 debian/rules | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/debian/rules b/debian/rules
index b5be01a8..9fc9e675 100755
--- a/debian/rules
+++ b/debian/rules
@@ -58,6 +58,10 @@ ifneq (,$(filter $(DEB_HOST_ARCH),armel riscv64))
 LDFLAGS_EXTRA += -latomic
 endif
 
+# Ensure fixfilepath feature is disabled.  The fixfilepath feature
+# sets a -ffile-prefix-map flag, which is only supported in clang-10.
+export DEB_BUILD_MAINT_OPTIONS=reproducible=-fixfilepath
+
 # Cxx flags for building libcxx and libcxxabi
 LIBCXXFLAGS := $(shell dpkg-buildflags --get CXXFLAGS) $(shell dpkg-buildflags --get CPPFLAGS)
 
-- 
2.20.1

Attachment: signature.asc
Description: PGP signature

Reply via email to