Debian Bug report logs -
#1021458
o3dgc: reproducible-builds: build path embedded in libo3dgc_common_lib.a
Reply or subscribe to this bug.
Toggle useless messages
Report forwarded
to debian-bugs-dist@lists.debian.org, reproducible-bugs@lists.alioth.debian.org, Debian QA Group <packages@qa.debian.org>:
Bug#1021458; Package src:o3dgc.
(Sat, 08 Oct 2022 22:45:03 GMT) (full text, mbox, link).
Acknowledgement sent
to Vagrant Cascadian <vagrant@reproducible-builds.org>:
New Bug report received and forwarded. Copy sent to reproducible-bugs@lists.alioth.debian.org, Debian QA Group <packages@qa.debian.org>.
(Sat, 08 Oct 2022 22:45:03 GMT) (full text, mbox, link).
Message #5 received at submit@bugs.debian.org (full text, mbox, reply):
[Message part 1 (text/plain, inline)]
Source: o3dgc
Severity: normal
Tags: patch
User: reproducible-builds@lists.alioth.debian.org
Usertags: buildpath
X-Debbugs-Cc: reproducible-bugs@lists.alioth.debian.org
The build path is embedded in
/usr/lib/x86_64-linux-gnu/libo3dgc_common_lib.a:
https://tests.reproducible-builds.org/debian/rb-pkg/unstable/amd64/diffoscope-results/o3dgc.html
/build/1st/o3dgc-0~20131011/src/o3dgc_common_lib/inc/o3dgcBinaryStream.h
vs.
/build/2/o3dgc-0~20131011/2nd/src/o3dgc_common_lib/inc/o3dgcBinaryStream.h
The attached patch to various CMakeLists.txt files fixes this by adding
-ffile-prefix-map to CMAKE_CXX_FLAGS.
Alternately, using the default CXXFLAGS from dpkg-buildflags would be
possible by removing debian/patches/fPIC.diff and possibly passing the
appropriate hardening build flags options.
According to my local tests, with this patch applied, o3dgc should build
reproducibly on tests.reproducible-builds.org!
Thanks for maintaining o3dgc!
live well,
vagrant
[0001-src-o3dgc-CMakeLists.txt-Add-ffile-prefix-map-to-CMA.patch (text/x-diff, inline)]
From 6f2829d68f4afe5590358db40da99b0f88ffa662 Mon Sep 17 00:00:00 2001
From: Vagrant Cascadian <vagrant@reproducible-builds.org>
Date: Sat, 8 Oct 2022 22:30:48 +0000
Subject: [PATCH] src/o3dgc*/CMakeLists.txt: Add -ffile-prefix-map to
CMAKE_CXX_FLAGS to avoid embedding build paths.
https://reproducible-builds.org/docs/build-path/
---
src/o3dgc_common_lib/CMakeLists.txt | 2 +-
src/o3dgc_decode_lib/CMakeLists.txt | 2 +-
src/o3dgc_encode_lib/CMakeLists.txt | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/o3dgc_common_lib/CMakeLists.txt b/src/o3dgc_common_lib/CMakeLists.txt
index 416195f..12abd85 100644
--- a/src/o3dgc_common_lib/CMakeLists.txt
+++ b/src/o3dgc_common_lib/CMakeLists.txt
@@ -3,6 +3,6 @@ include(${CMAKE_COMMON_INC})
set(LIB_TYPE "STATIC" CACHE STRING "STATIC, SHARED or MODULE?")
message("[o3dgc] \t LIB_TYPE " ${LIB_TYPE})
#set(CMAKE_CXX_FLAGS "-g -Wall")
-set(CMAKE_CXX_FLAGS "-fPIC")
+set(CMAKE_CXX_FLAGS "-fPIC -ffile-prefix-map=${CMAKE_SOURCE_DIR}=.")
add_library(o3dgc_common_lib ${PROJECT_CPP_FILES} ${PROJECT_C_FILES} ${PROJECT_INC_FILES} ${PROJECT_INL_FILES})
diff --git a/src/o3dgc_decode_lib/CMakeLists.txt b/src/o3dgc_decode_lib/CMakeLists.txt
index 0209cd4..f1adb61 100644
--- a/src/o3dgc_decode_lib/CMakeLists.txt
+++ b/src/o3dgc_decode_lib/CMakeLists.txt
@@ -3,7 +3,7 @@ include(${CMAKE_COMMON_INC})
set(LIB_TYPE "STATIC" CACHE STRING "STATIC, SHARED or MODULE?")
#set(CMAKE_CXX_FLAGS "-g -Wall")
-set(CMAKE_CXX_FLAGS "-fPIC")
+set(CMAKE_CXX_FLAGS "-fPIC -ffile-prefix-map=${CMAKE_SOURCE_DIR}=.")
add_library(o3dgc_dec_lib ${PROJECT_CPP_FILES} ${PROJECT_C_FILES} ${PROJECT_INC_FILES} ${PROJECT_INL_FILES})
include_directories("${${PROJECT_NAME}_SOURCE_DIR}/../o3dgc_common_lib/inc")
diff --git a/src/o3dgc_encode_lib/CMakeLists.txt b/src/o3dgc_encode_lib/CMakeLists.txt
index 5a72e1a..c926c6b 100644
--- a/src/o3dgc_encode_lib/CMakeLists.txt
+++ b/src/o3dgc_encode_lib/CMakeLists.txt
@@ -3,7 +3,7 @@ include(${CMAKE_COMMON_INC})
set(LIB_TYPE "STATIC" CACHE STRING "STATIC, SHARED or MODULE?")
#set(CMAKE_CXX_FLAGS "-g -Wall")
-set(CMAKE_CXX_FLAGS "-fPIC")
+set(CMAKE_CXX_FLAGS "-fPIC -ffile-prefix-map=${CMAKE_SOURCE_DIR}=.")
add_library(o3dgc_enc_lib ${PROJECT_CPP_FILES} ${PROJECT_C_FILES} ${PROJECT_INC_FILES} ${PROJECT_INL_FILES})
include_directories("${${PROJECT_NAME}_SOURCE_DIR}/../o3dgc_common_lib/inc")
--
2.37.2
[signature.asc (application/pgp-signature, inline)]
Send a report that this bug log contains spam.
Debian bug tracking system administrator <owner@bugs.debian.org>.
Last modified:
Wed May 17 12:43:13 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.