Skip to content
This repository was archived by the owner on Apr 24, 2023. It is now read-only.
/ jdk20 Public archive

8298459: Fix msys2 linking and handling out of tree build directory for source zip creation #9

Closed
wants to merge 5 commits into from

Conversation

RealCLanger
Copy link
Contributor

@RealCLanger RealCLanger commented Dec 9, 2022

This PR fixes two issues.

In ZipSource.gmk we don't account for the possibility of the build directory or $(SUPPORT_OUTPUTDIR) not being in the source directory tree ($(TOPDIR)).
It doesn't manifest in a build error though since link-file-relative will then fall back to absolute linking. But it results in awkward paths.

Furthermore, there's a lurking issue in msys2 builds on Windows. There, ln would create deep copies of a file system tree instead of linking. If the file system to be linked contains long paths, it could result in 'File name too long' errors, like can be seen here. We can avoid this by calling Windows mklink to create a file system junction. Presumably that would also help build performance (though not verified).


Progress

  • Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue

Issue

  • JDK-8298459: Fix msys2 linking and handling out of tree build directory for source zip creation

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk20 pull/9/head:pull/9
$ git checkout pull/9

Update a local copy of the PR:
$ git checkout pull/9
$ git pull https://git.openjdk.org/jdk20 pull/9/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 9

View PR using the GUI difftool:
$ git pr show -t 9

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk20/pull/9.diff

@bridgekeeper
Copy link

bridgekeeper bot commented Dec 9, 2022

👋 Welcome back clanger! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk openjdk bot changed the title JDK-8298459 8298459: Fix msys2 linking and handling out of tree build directory for source zip creation Dec 9, 2022
@openjdk openjdk bot added the rfr Pull request is ready for review label Dec 9, 2022
@openjdk
Copy link

openjdk bot commented Dec 9, 2022

@RealCLanger The following label will be automatically applied to this pull request:

  • build

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.

@openjdk openjdk bot added the build build-dev@openjdk.org label Dec 9, 2022
@mlbridge
Copy link

mlbridge bot commented Dec 9, 2022

Webrevs

@RealCLanger
Copy link
Contributor Author

@erikj79 I would like to use these make conditionals but somehow it doesn't work out. What am I doing wrong, any idea/hint?

@erikj79
Copy link
Member

erikj79 commented Dec 9, 2022

@erikj79 I would like to use these make conditionals but somehow it doesn't work out. What am I doing wrong, any idea/hint?

Sorry, I have been away from makefiles for too long. What I suggested will not work inside a macro body. You will need to define the whole macro differently based on conditionals. Not as neat, but certainly more performant, and easier to debug when reading command lines from make.

Something like this (quick pseudo code):

ifeq (OS, msys)
  define link-file-relative
     ...
  endef
  define link-file-absolute
    ...
  endef
else
  define link-file-relative
  ...
endif

Copy link
Member

@erikj79 erikj79 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thanks!

@openjdk
Copy link

openjdk bot commented Dec 9, 2022

@RealCLanger This change now passes all automated pre-integration checks.

ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details.

After integration, the commit message for the final commit will be:

8298459: Fix msys2 linking and handling out of tree build directory for source zip creation

Reviewed-by: erikj

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 6 new commits pushed to the master branch:

  • a894649: 8298225: [AIX] Disable PPC64LE continuations on AIX
  • 52fffdd: 8298463: tools/javac/modules/EdgeCases.java fails on Windows after JDK-8297988
  • b7b996c: 8298353: C2 fails with assert(opaq->outcnt() == 1 && opaq->in(1) == limit) failed
  • 05d67f6: 8298340: java/net/httpclient/CancelRequestTest.java fails with AssertionError: Found some subscribers for testPostInterrupt
  • 5a92bee: 8298455: JFR: Add logging to TestClose.java
  • 133ad8e: 8297988: NPE in JavacTypes.getOverriddenMethods from doclint

Please see this link for an up-to-date comparison between the source branch of this pull request and the master branch.
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.

➡️ To integrate this PR with the above commit message to the master branch, type /integrate in a new comment.

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Dec 9, 2022
@RealCLanger
Copy link
Contributor Author

Looks good, thanks!

Thanks for the review. In this GHA run one can see some traces that it works and effectively calls mklink for MSYS but ln in the other cases.

/integrate

@openjdk
Copy link

openjdk bot commented Dec 11, 2022

Going to push as commit d624deb.
Since your change was applied there have been 6 commits pushed to the master branch:

  • a894649: 8298225: [AIX] Disable PPC64LE continuations on AIX
  • 52fffdd: 8298463: tools/javac/modules/EdgeCases.java fails on Windows after JDK-8297988
  • b7b996c: 8298353: C2 fails with assert(opaq->outcnt() == 1 && opaq->in(1) == limit) failed
  • 05d67f6: 8298340: java/net/httpclient/CancelRequestTest.java fails with AssertionError: Found some subscribers for testPostInterrupt
  • 5a92bee: 8298455: JFR: Add logging to TestClose.java
  • 133ad8e: 8297988: NPE in JavacTypes.getOverriddenMethods from doclint

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot added the integrated Pull request has been integrated label Dec 11, 2022
@openjdk openjdk bot closed this Dec 11, 2022
@openjdk openjdk bot removed ready Pull request is ready to be integrated rfr Pull request is ready for review labels Dec 11, 2022
@openjdk
Copy link

openjdk bot commented Dec 11, 2022

@RealCLanger Pushed as commit d624deb.

💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.

@RealCLanger RealCLanger deleted the msysln branch December 11, 2022 13:53
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
build build-dev@openjdk.org integrated Pull request has been integrated
Development

Successfully merging this pull request may close these issues.

2 participants