Skip to content
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

8276672: Cannot build hsdis on WSL #6269

Closed
wants to merge 5 commits into from
Closed

Conversation

YaSuenag
Copy link
Member

@YaSuenag YaSuenag commented Nov 5, 2021

JDK-8275128 introduced new Makefile for hsdis to integrate it to normal build system, however it does not work on WSL 1 Ubuntu 20.04 and MinGW from Ubuntu.

Hsdis.gmk has two problems:

  1. MinGW version is fixed to "9.2.0"
  2. Assumes sysroot for MinGW is located at /usr/$MINGW_BASE/sys-root

I tested this change on WSL only, so it is appreciate to review on Cygwin.


Progress

  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • Change must be properly reviewed

Issue

Reviewers

Contributors

  • Magnus Ihse Bursie <ihse@openjdk.org>
  • Yasumasa Suenaga <ysuenaga@openjdk.org>

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.java.net/jdk pull/6269/head:pull/6269
$ git checkout pull/6269

Update a local copy of the PR:
$ git checkout pull/6269
$ git pull https://git.openjdk.java.net/jdk pull/6269/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 6269

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

Using diff file

Download this PR as a diff file:
https://git.openjdk.java.net/jdk/pull/6269.diff

@bridgekeeper
Copy link

@bridgekeeper bridgekeeper bot commented Nov 5, 2021

👋 Welcome back ysuenaga! 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 added the rfr label Nov 5, 2021
@openjdk
Copy link

@openjdk openjdk bot commented Nov 5, 2021

@YaSuenag 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 label Nov 5, 2021
@mlbridge
Copy link

@mlbridge mlbridge bot commented Nov 5, 2021

Webrevs

@magicus
Copy link
Member

@magicus magicus commented Nov 5, 2021

Hi @YaSuenag,

Thank you for your contribution. I'll have a closer look and try this out on Cygwin after the weekend.

@magicus
Copy link
Member

@magicus magicus commented Nov 9, 2021

Hi @YaSuenag,

Unfortunately this patch does not work out-of-the box on Cygwin, at least not on my machine. :-(

I found two issues:

  1. The libraries are in $(MINGW_SYSROOT)/mingw/lib, not $(MINGW_SYSROOT)/lib. For -L, we can of course include both paths just to be safe rather than sorry, but that will not work for dllcrt2.o, so we need to verify which path works.

  2. On the machine I'm testing, mingw 11.0.4 is installed, but MINGW_VERSION should need to be just 11. (It's worth noting that my original implementation would not have worked either, in this case.)

So here too I think we need to check both possibilities and verify them.

@magicus
Copy link
Member

@magicus magicus commented Nov 9, 2021

Also, there's no need to use eval to assign to variables. You can just use normal assignment :=.

I'll try to make this work for cygwin in a branch in my personal fork. I'll let you know when I'm done and then you can test if it works for you.

@magicus
Copy link
Member

@magicus magicus commented Nov 9, 2021

Please check out if https://github.com/magicus/jdk/tree/hsdis-on-wsl works OK in your environment. It does work for me on Cygwin.

@YaSuenag
Copy link
Member Author

@YaSuenag YaSuenag commented Nov 10, 2021

/contributor add @magicus
/contributor add @YaSuenag

@openjdk
Copy link

@openjdk openjdk bot commented Nov 10, 2021

⚠️ @YaSuenag This pull request contains merges that bring in commits not present in the target repository. Since this is not a "merge style" pull request, these changes will be squashed when this pull request in integrated. If this is your intention, then please ignore this message. If you want to preserve the commit structure, you must change the title of this pull request to Merge <project>:<branch> where <project> is the name of another project in the OpenJDK organization (for example Merge jdk:master).

@openjdk
Copy link

@openjdk openjdk bot commented Nov 10, 2021

@YaSuenag
Contributor Magnus Ihse Bursie <ihse@openjdk.org> successfully added.

@openjdk
Copy link

@openjdk openjdk bot commented Nov 10, 2021

@YaSuenag
Contributor Yasumasa Suenaga <ysuenaga@openjdk.org> successfully added.

@YaSuenag
Copy link
Member Author

@YaSuenag YaSuenag commented Nov 10, 2021

@magicus Thanks ! Your change works fine on my WSL, so I merged it to this PR (and also I added you as a contributor).

@YaSuenag
Copy link
Member Author

@YaSuenag YaSuenag commented Nov 10, 2021

I removed SYSROOT_FLAGS because it is no longer used.

Copy link
Member

@magicus magicus left a comment

Great! I missed the redundant SYSROOT_FLAGS, thanks for taking care of that.

@openjdk
Copy link

@openjdk openjdk bot commented Nov 10, 2021

@YaSuenag 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:

8276672: Cannot build hsdis on WSL

Co-authored-by: Magnus Ihse Bursie <ihse@openjdk.org>
Co-authored-by: Yasumasa Suenaga <ysuenaga@openjdk.org>
Reviewed-by: ihse, 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 12 new commits pushed to the master branch:

  • 55b36c6: 8276825: hotspot/runtime/SelectionResolution test errors
  • 0f23c6a: 8276926: Use String.valueOf() when initializing File.separator and File.pathSeparator
  • a0b8445: 8276846: JDK-8273416 is incomplete for UseSSE=1
  • a3f710e: 8276215: Intrinsics matchers should handle native method flags better
  • 0f463a7: 8276845: (fs) java/nio/file/spi/SetDefaultProvider.java fails on x86_32
  • e01d6d0: 8276679: Malformed Javadoc inline tags in JDK source in javax/swing
  • fd0a25e: 8276805: java/awt/print/PrinterJob/CheckPrivilege.java fails due to disabled SecurityManager
  • 403f318: 8276854: Windows GHA builds fail due to broken Cygwin
  • e91e9d8: 8276721: G1: Refine G1EvacFailureObjectsSet::iterate
  • 8822d41: 8274736: Concurrent read/close of SSLSockets causes SSLSessions to be invalidated unnecessarily
  • ... and 2 more: https://git.openjdk.java.net/jdk/compare/0699220830a457959b784b35af125b70f43fa3b0...master

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 label Nov 10, 2021
@YaSuenag
Copy link
Member Author

@YaSuenag YaSuenag commented Nov 10, 2021

/integrate

@openjdk
Copy link

@openjdk openjdk bot commented Nov 10, 2021

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

  • 55b36c6: 8276825: hotspot/runtime/SelectionResolution test errors
  • 0f23c6a: 8276926: Use String.valueOf() when initializing File.separator and File.pathSeparator
  • a0b8445: 8276846: JDK-8273416 is incomplete for UseSSE=1
  • a3f710e: 8276215: Intrinsics matchers should handle native method flags better
  • 0f463a7: 8276845: (fs) java/nio/file/spi/SetDefaultProvider.java fails on x86_32
  • e01d6d0: 8276679: Malformed Javadoc inline tags in JDK source in javax/swing
  • fd0a25e: 8276805: java/awt/print/PrinterJob/CheckPrivilege.java fails due to disabled SecurityManager
  • 403f318: 8276854: Windows GHA builds fail due to broken Cygwin
  • e91e9d8: 8276721: G1: Refine G1EvacFailureObjectsSet::iterate
  • 8822d41: 8274736: Concurrent read/close of SSLSockets causes SSLSessions to be invalidated unnecessarily
  • ... and 2 more: https://git.openjdk.java.net/jdk/compare/0699220830a457959b784b35af125b70f43fa3b0...master

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot closed this Nov 10, 2021
@openjdk openjdk bot added integrated and removed ready rfr labels Nov 10, 2021
@openjdk
Copy link

@openjdk openjdk bot commented Nov 10, 2021

@YaSuenag Pushed as commit 38ec3a1.

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

@YaSuenag YaSuenag deleted the JDK-8276672 branch Nov 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build integrated
3 participants