[gdal-dev] Sort files in static library to make the build reproducible
sebastic at xs4all.nl
Fri May 20 05:29:16 PDT 2016
On 05/20/2016 02:05 PM, Even Rouault wrote:
>> [I'm sending this to the list because I'm unable to successfully create
>> a ticket with description in Trac at the moment. As reported in #6520
>>  adding a ticket description causes an internal server errors on
>> submit, it looks like the spam filter cannot handle the content.]
> You got -3 points of karma due to:
> ExternalLinks (-3): Maximum number of external links per post exceeded
> (so somewhat changing a bit the links so they are no longer valid URL might
> potentially work)
> and then :
> IPThrottle (-4): Maximum number of posts per hour for this IP exceeded
> Unfortunately it doesn't seem there's a way to whitelist users...
> I've classified your attempts as 'ham' so hopefully the filter will lean from
Thanks for troubleshooting. I've reopened the ticket with the links
spread over several comments.
>> 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.
> I've not an authoritative opinion on makefile issues. Was just wondering if one
> or another one of the approach might cause issues to "odd" environements, like
> mingw. But I see that we already do the backticks in the gdal.pc target.
Both backticks and the Makefile functions should be supported on Windows
too, but I haven't tested on Windows. I did opt out of the approach from
the sort-files-1 patch because it's unlikely to work on Windows, it uses
ls with the C locale to sort the objects instead of the Makefile functions.
GPG Key ID: 4096R/6750F10AE88D4AF1
Fingerprint: 8182 DE41 7056 408D 6146 50D1 6750 F10A E88D 4AF1
More information about the gdal-dev