RFR: 8284437: Building from different users/workspace is not always deterministic [v2]

Magnus Ihse Bursie ihse at openjdk.java.net
Thu Apr 7 15:54:56 UTC 2022


On Wed, 6 Apr 2022 13:30:28 GMT, Andrew Leonard <aleonard at openjdk.org> wrote:

>> This PR fixes the non-deterministic behavior when building on linux with different userids or within
>> different workspace folders.
>> It fixes the following issues:
>> - MakeZipReproducible.java used to produce reproducible src.zip removes the optional zip "extra" field containing UID/GID.
>> - When absolute output paths are not allowed, enable the use of -fdebug-prefix-map to ensure debug symbol info does not contain the top level workspace folder.
>> - For reproducible builds ensure the gcc random symbol name generator is seeded using -frandom-seed.
>> - For reproducible builds when producing debug symbols use relative object paths for library linking to remove absolute MASM object paths.
>> 
>> Signed-off-by: Andrew Leonard <anleonar at redhat.com>
>
> Andrew Leonard has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Trigger checks

make/common/NativeCompilation.gmk line 1159:

> 1157:       ifeq ($(call isTargetOs, linux), true)
> 1158:         ifeq ($$($1_COMPILE_WITH_DEBUG_SYMBOLS), true)
> 1159:           $1_LINK_OBJS_RELATIVE := true

I realize this PR has already been integrated, but I have some questions about this. The comment talk about "ASM" objects (I assume that means output of assembly files), but the code change is not restricted to assembly files. 

Afaict, this change means that all builds on linux with debug symbols and reproducible builds will use relative paths! This is perhaps the most common compilation scenario, and it would mean that our efforts to keep a CWD neutral command line is basically in vain. :-(

Or can anyone (@erikj79, @andrew-m-leonard) explain to me why this would not be the case?

-------------

PR: https://git.openjdk.java.net/jdk/pull/8124



More information about the build-dev mailing list