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
8281262: Windows builds in different directories are not fully reproducible #7344
Conversation
…ucible Changed -pathmap compiler option to use "normal", Unix-style paths on Windows. Those will be changed to Windows style by the fixpath script. But if Windows-style paths are used from the start, this script will wreck them by removing all the backslash characters.
|
@mkartashev The following label will be automatically applied to this pull request:
When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing list. If you would like to change these labels, use the /label pull request command. |
Webrevs
|
Thank you for finding this! We do have a test that is supposed to catch an issue like this, but unfortunately it seems that test is suffering a similar issue. It's not looking for the correct path strings as the backslashes have been truncated by one too many shell expansions on the way. I created a fix for the test in a branch here: https://github.com/erikj79/jdk/tree/JDK-8281262-abspath-windows I've verified that your fix makes the test pass together with my fix. Something like this should go in with this fix. Feel free to take my change. |
@erikj79 Thank you! I added another commit (under your name) with your changes to this pull request. |
Thanks for incorporating my change. After thinking about this some more, I figured we could add some form of validation of the root paths that would actually catch the build problem as well. I added another change to the same branch with this. The test now makes sure the root paths can be parsed as paths and are absolute. This validation fails on Windows without my previous patch, causing the test to fail. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this looks good, but would be good if Magnus could take a look as well.
Now that a good part of the PR is authored by you, |
@magicus Could you please take a look? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. Thanks for catching this!
|
@mkartashev This change now passes all automated pre-integration checks. After integration, the commit message for the final commit will be:
You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed. At the time when this comment was updated there had been 57 new commits pushed to the
As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details. As you do not have Committer status in this project an existing Committer must agree to sponsor your change. Possible candidates are the reviewers of this PR (@erikj79, @magicus) but any other Committer may sponsor as well.
|
/contributor @erikj79 |
@mkartashev Syntax:
|
/contributor add @erikj79 |
/integrate |
@mkartashev |
@mkartashev |
/sponsor |
Going to push as commit d442328.
Your commit was automatically rebased without conflicts. |
@magicus @mkartashev Pushed as commit d442328. |
Some dll/exe files end up having absolute path names embedded in them despite the use of
--disable-absolute-paths-in-output
build option. This option effectively translates into adding-pathmap
to compilation lines, but doesn't (always) achieve the desired effects. The reason for that is in the use of Windows-style path for the argument provided topathmap
. The slash characters in the path passed as an argument get removed by thefixpath
script that pre-processes all commands on Windows prior to running them and is supposed to convert Unix-style paths to what is understood by Windows.For example:
However, if a "normal" Unix-style path is provided, it gets converted correctly:
This commit changes the
-pathmap
compiler option to use "normal", Unix-style paths on Windows. Those will be changed to Windows style by thefixpath
script.Verified by running two builds (details below) in different directories on the same machine; with this commit, all the exe/dll files under
.../images/jdk/...
are the same.Builds were produced by running the following commands on Windows 10 x64 with Visual Studio 2019 installed:
Progress
Issue
Reviewers
Contributors
<erikj@openjdk.org>
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.java.net/jdk pull/7344/head:pull/7344
$ git checkout pull/7344
Update a local copy of the PR:
$ git checkout pull/7344
$ git pull https://git.openjdk.java.net/jdk pull/7344/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 7344
View PR using the GUI difftool:
$ git pr show -t 7344
Using diff file
Download this PR as a diff file:
https://git.openjdk.java.net/jdk/pull/7344.diff