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
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
Attachment:
signature.asc
Description: PGP signature