-
-
Notifications
You must be signed in to change notification settings - Fork 249
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Repro-Build: jdk-18 debuginfo symbol files contain full path to build path making non-reproducible #2779
Comments
Ref #2594 |
Also note that system headers also get referenced from the symbols, thus paths like "/usr/include/.." are embedded, but this is obviously more deterministic as this path is consistent on most platforms. |
Check out |
Thanks @magicus , yes one reason i've not tried that is i'm building with gcc7.5, -fmacro-prefix-map is only available gcc8+. |
But -fdebug-prefix-map is available in gcc 7? Anyway, you could append to PATH_MAP_CFLAGS each of them separately. |
yes! However, we're going to look at moving up to gcc8+ I also did discover a debug symbol issue that is not resolved by either of these, when dumping the debug symbols file, it seems "certain" object files xxx.o are embedded in the debug file with the full build path that they were compile with, the only way I found of fixing it was using the relative object path section that currently is only used for clang and >500 objs:
|
@magicus can you see any reason why we couldn't always use the $1_LINK_OBJS_RELATIVE when --with-reproducible_build is "true" ? |
We have a policy to not use relative paths in the build system. All command lines should be "copy paste-able" from any point in the directory hierarchy. The relative linking above was a work-around for systems which cloned the repo in a deep path resulting in a command line limit. We could of course use it for --enable-reproducible-builds, but that'd also be a bit counter towards the goal I have to be able to do all reproducible stuff by default, and retire --enable-reproducible-builds. We will never do relative paths by default... |
@magicus That could be an interesting challenge, it's possible gcc 8+ might have the necessary options, i'll have to upgrade and give it a go. With gcc7.5 rather oddly there was always a single full path object file listed in the symbols data, I think it was src/hotspot/os_cpu/linux_x86/linux_x86_64.o which is mixed C + asm, not sure if that has any significance, maybe the mapping options aren't enabled for those...? |
gcc 7 is starting to get old; my interest in supporting it beyond "keep it working, if possible" is minimal. I'd rather focus on getting this working The Right Way using modern gcc's. |
FYI We have GCC 10.3 on the build systems now, and #2824 will enable it for Temurin JDK18+ for now (IMHO with less than a week to go before the January update cycle It's too close to consider doing it for earlier versions!) |
I have not recreated this with gcc 10.3 on latest jdk upstream. |
debuginfo symbols contain the build object path including the full build path, this is thus not unique.
For gcc needs use of -fdebug-prefix-map to map "$WORKSPACE" to "." so paths are deterministic.
https://github.com/andrew-m-leonard/jdk-1/commit/a7458c76de9c3c5340c26af57d23b69860749cd2
The text was updated successfully, but these errors were encountered: