Control: reopen -1 > Hi, this patch is not working anymore unfortunately (the new upstream changed the Makefile and the patch doesn't apply > anymore) I attached an updated patch for the new version. > I see amd64 seems fixed now, but armhf and i386 aren't. As this is a fileordering related issue, being reproducible on amd64 unfortunately doesn't say much, as we usually don't see those issues on amd64 _in our setup_. > I think this might be due to a bug in the toolchain rather than a bug in the software, and I'm closing this one. The issue is still that source files are collected with 'wildcard', which returns files in non-deterministic readdir order. If the file list is passed to the linker, it needs to be sorted. Kind regards, Reiner
diff --git a/debian/patches/reproducible-build.patch b/debian/patches/reproducible-build.patch new file mode 100644 index 0000000..8dfec59 --- /dev/null +++ b/debian/patches/reproducible-build.patch @@ -0,0 +1,44 @@ +Author: Reiner Herrmann <reiner@reiner-h.de> +Description: Sort source files for deterministic linking order + +--- a/src/Makefile ++++ b/src/Makefile +@@ -35,14 +35,14 @@ + # (ADD_SOURCES can optionally be set at make command line) + # + +-SOURCES = $(wildcard *.cc common/*.cc) $(ADD_SOURCES) ++SOURCES = $(sort $(wildcard *.cc common/*.cc)) $(ADD_SOURCES) + INCLUDE = -I. -Icommon -Ilib + +-hoichess_SOURCES = $(SOURCES) $(wildcard chess/*.cc) ++hoichess_SOURCES = $(SOURCES) $(sort $(wildcard chess/*.cc)) + all-hoichess: override CXXFLAGS += -DHOICHESS + all-hoichess: override INCLUDE += -Ichess + +-hoixiangqi_SOURCES = $(SOURCES) $(wildcard xiangqi/*.cc) ++hoixiangqi_SOURCES = $(SOURCES) $(sort $(wildcard xiangqi/*.cc)) + all-hoixiangqi: override CXXFLAGS += -DHOIXIANGQI + all-hoixiangqi: override INCLUDE += -Ixiangqi + +@@ -52,7 +52,7 @@ + ifneq (,$(findstring mingw32,$(TARGET))) + override INCLUDE += -Iwin32 -Ilib + override LDFLAGS += -static-libgcc -static-libstdc++ +-SOURCES += $(wildcard win32/*.cc) ++SOURCES += $(sort $(wildcard win32/*.cc)) + SOURCES += lib/snprintf.cc lib/strtok_r.cc + BIN_SUFFIX = .exe + else +@@ -63,9 +63,9 @@ + override INCLUDE += -Isparc32 + ifneq (,$(shell echo '' | $(CXX) -E -dM - | grep __leonbare__)) + override INCLUDE += -Isparc32/leon +-SOURCES += $(wildcard sparc32/leon/*.cc) ++SOURCES += $(sort $(wildcard sparc32/leon/*.cc)) + endif +-SOURCES += $(wildcard sparc32/*.cc) ++SOURCES += $(sort $(wildcard sparc32/*.cc)) + SOURCES += lib/snprintf.cc + endif + diff --git a/debian/patches/series b/debian/patches/series index 0d0af7b..8b5f5dc 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,2 +1,3 @@ flags.patch docs.patch +reproducible-build.patch
Attachment:
signature.asc
Description: PGP signature