Opened 16 months ago

Closed 16 months ago

Last modified 16 months ago

#6520 closed enhancement (fixed)

Sort files in static library to make the build reproducible

Reported by: Bas Couwenberg Owned by: warmerdam
Priority: normal Milestone: 2.2.0
Component: ConfigBuild Version: svn-trunk
Severity: normal Keywords:
Cc:

Description (last modified by Bas Couwenberg)

As part of the effort to support Reproducible Builds Alexis Bienvenüe submitted two patches in Debian Bug #824808 to sort the object files in the static library: sort-files-1 & sort-files-2

These patches resolve the random_order_in_static_libraries issue which is illustrated by the diffoscope output.

The attached patch is modified version of the sort-files-2 patch doing do wildcard sorting in the $(LIBGDAL) target instead of a separate $(LIBGDAL).buildit target. Alexis chose that approach because:

In some situations some of the target dependencies do not exist before the "make target" call. When this arises, as $(wildcard) is expanded before building the dependencies, it can miss some files… I was not sure of the situation here, so I added a transitional target to be safe.

I prefer the single line change in the attached patch, but you may want to consider the separate target as done in the sort-files-2 patch too.

Attachments (1)

sort-files-in-static-library.patch (653 bytes) - added by Bas Couwenberg 16 months ago.

Download all attachments as: .zip

Change History (7)

comment:1 Changed 16 months ago by Bas Couwenberg

Resolution: invalid
Status: newclosed

Adding a description causes an internal server error.

comment:2 Changed 16 months ago by Bas Couwenberg

Description: modified (diff)
Milestone: 2.1.1
Resolution: invalid
Status: closedreopened
Type: defectenhancement
Version: unspecifiedsvn-trunk

comment:3 Changed 16 months ago by Bas Couwenberg

Links to the patches from the Debian bugreport:

Changed 16 months ago by Bas Couwenberg

comment:5 Changed 16 months ago by Even Rouault

Resolution: fixed
Status: reopenedclosed

In 34257:

GNUmakefile: sort files in static library to make the build reproducible (patch by sebastic, derived from patch by Alexis Bienvenüe, https://bugs.debian.org/824808, closes #6520)

comment:6 Changed 16 months ago by Even Rouault

Component: defaultConfigBuild
Milestone: 2.1.12.2.0

Being a fix for a not critical issue, I'm not too keen on applying that to the stable branch.

Note: See TracTickets for help on using tickets.