You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We're trying to package nvc in the GNU Guix distribution.
Unfortunately, timestamps in _index files cause the nvc build to be non-reproducible (see https://reproducible-builds.org/ for why reproducibility is important).
We've tracked it down to writing out the timestamp of the "design unit" files. If the source files are compiled, then the mtime timestamp of the design unit file is the time stamp of the system at time of that compilation process. Therefore, if someone else compiles the same thing, the timestamp is likely be different (compilation probably doesn't always take the same time), making the entire build of nvc non-reproducible (and diffoscope will flag the _index files as the culprit).
It would be nice to make the build of the nvc library reproducible somehow.
For example, it could be useful to set the design unit file mtime to the source file mtime on compilation.
The timestamp is not actually stored in the file: it's read each time the design unit is loaded with stat(2) - see lib_get_aux() in src/lib.c.
The _index file is sensitive to to the order files were compiled in. Are you building with make -j? Does it make a difference if you don't use -j? I think that could be fixed by storing the entries in the _index file in sorted order.
Indeed, it's reproducible when disabling parallel builds.
Thank you.
daym
changed the title
Timestamps in _index cause nvc build to be non-reproducible
Instable member order in _index cause nvc build to be non-reproducible
Dec 17, 2020
We're trying to package nvc in the GNU Guix distribution.
Unfortunately, timestamps in
_index
files cause the nvc build to be non-reproducible (see https://reproducible-builds.org/ for why reproducibility is important).We've tracked it down to writing out the timestamp of the "design unit" files. If the source files are compiled, then the mtime timestamp of the design unit file is the time stamp of the system at time of that compilation process. Therefore, if someone else compiles the same thing, the timestamp is likely be different (compilation probably doesn't always take the same time), making the entire build of nvc non-reproducible(and diffoscope will flag the_index
files as the culprit).It would be nice to make the build of the nvc library reproducible somehow.
For example, it could be useful to set the design unit file mtime to the source file mtime on compilation.
See also https://reproducible-builds.org/docs/source-date-epoch/ and https://wiki.debian.org/ReproducibleBuilds/StandardEnvironmentVariables
The text was updated successfully, but these errors were encountered: