[Gambas-user] [Gambas Bug Tracker] Bug #1215: .gambas files differ from filesystem order

bugtracker at gambaswiki.org bugtracker at gambaswiki.org
Sat Nov 18 21:35:25 CET 2017


Bernhard M. WIEDEMANN reported a new bug.


.gambas files differ from filesystem order

Type             : Bug
Priority         : Low
Gambas version   : 3.10
Product          : Unknown


While working on the reproducible builds effort, I found that
when building the gambas3 package for openSUSE Linux, there were slight differences between each build:
39 .gambas files e.g. /usr/bin/gbs3.gambas and /usr/lib64/gambas3/gb.xml.rpc.gambas differed from filesystem readdir order
likely because main/gbc/gba.c line 292 (and a few other places) uses readdir to iterate over a list of files.

Such a list of input files should be sorted
so that gambas3 builds in a reproducible way
in spite of indeterministic filesystem readdir order.
See also https://reproducible-builds.org/ for why this matters.

On systems compliant to 4.3BSD or POSIX.1-2008 (i.e. modern Linuxes) one could use the scandir function, but that would exclude Windows. Would that be a problem? Should I make a patch to use scandir instead of readdir?

More information about the User mailing list