From f51b20e5d913bb78541a8093750ddae677382cec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Mon, 21 Oct 2024 13:41:04 +0200 Subject: [PATCH] build: sort headers and sources in plugin builds I'd observe a difference in the debuginfo data for the plugins in rebuilds. Various /usr/lib64/calibre/calibre/plugins/*.so files would be different, but the source of the difference was in the link to debuginfo data, which in turn appears to be caused by differences in sort order in various tables, caused by the object files being listed in different order. setup/build.py writes out pyproject.toml, which is turned into *.pro, which is turned into a Makefile. Sorting the object files by name seems to fix this particular issue. This makes local rebuilds reproducible for me. --- setup/build.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setup/build.py b/setup/build.py index a99107b0f5..a92f5e5127 100644 --- a/setup/build.py +++ b/setup/build.py @@ -696,8 +696,8 @@ qmake-settings = [ ] [tool.sip.bindings.{ext.name}] -headers = {ext.headers} -sources = {ext.sources} +headers = {sorted(ext.headers)} +sources = {sorted(ext.sources)} exceptions = {needs_exceptions} include-dirs = {ext.inc_dirs} qmake-QT = {ext.qt_modules}