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

Integrating JDK8u312 into ikvm-revived #68

Closed
AliveDevil opened this issue May 31, 2022 · 7 comments
Closed

Integrating JDK8u312 into ikvm-revived #68

AliveDevil opened this issue May 31, 2022 · 7 comments
Labels
enhancement New feature or request

Comments

@AliveDevil
Copy link
Collaborator

I'm currently working on porting the changes made here to ikvm-revived/ikvm@develop, though I'm running into a weird issue where Build OpenJDK Harness fails with chmod permission denied1.
What is needed in order for me to validate that the workflow runs go through?

Footnotes

  1. https://github.com/iterate-ch/ikvm-revived/actions/runs/2415020703

@NightOwl888
Copy link
Contributor

NightOwl888 commented May 31, 2022

@wasabii can probably fill you in on the details, but he did mention that he attempted to upgrade the OpenJDK to a more recent version of JDK 8, but ran into trouble due to some customizations that were made to the current version, then he ended up reverting back. This is just so we could get a release out faster, the plan is to upgrade to a later patch to a later JDK 8 and then eventually more recent versions. There is still much work to do before we get there, though1.

He also mentioned that the environment with the old Linux distribution was required for the OpenJDK only because the JDK version was so old that it won't work on modern Windows. So, as long as the version of OpenJDK you are upgrading to builds on Windows you should be able to eliminate the Linux environment. You may have already noticed there is bit of info about this on the README, but I am posting it here for context:

The OpenJDK JDK8u source hierarchy and build results for Linux/x64 is required. These build artifacts cannot be built on Windows, or modern Linux hosts. Instead, they must be built on a host with GCC 4.3 available. Debian Lenny is known to work acceptably. The CI/CD GitHub action can serve as a demonstration of this.

The GitHub action's generated artifact can simply be extract into the appropriate spot in openjdk8/build to avoid building it yourself. Navigate to the GitHub Actions, find the latest successfuly build for the branch you're concerned with, and download the openjdk8-build-linux-x86_64-normal-server-release artifact. Extract this zip file into openjdk8/build.

IKVM includes a native library named 'ikvm-native' which must be built for the JNI functionality to work. The solution includes .vcxproj files that build both the win-x86, win-x64, linux-x86 and linux-x64 versions of these libraries. However, the linux-* version require WSL to be enabled on your development machine. Within this WSL distribution ensure you have installed the GCC toolset. For Debian based distributions, this should be as simple as typing apt-get install g++.

You are welcome to join the conversation and search the chat history on Discord to answer some of your questions: https://discord.gg/MpzNd5Tk8P

Footnotes

  1. https://github.com/ikvm-revived/ikvm/issues/36#issuecomment-1138165807

@AliveDevil
Copy link
Collaborator Author

I figured that much, though the Github Workflow Actions, which I created a branch off of, don't work for me.

Btw. you can build OpenJDK 8 with OpenJDK 8 without issue, did that here before - it says it's not recommended, but it works.
The customizations are tedious, but as mentioned here we are running the original IKVM sources on JDK8u312 (including TLS1.3 support).

@wasabii
Copy link
Contributor

wasabii commented May 31, 2022

Huh. The chmod issue is odd. It seems to be working in our Actions runs. Why would your Actions VM not have permissions to chmod + x a file where ours does?

Hmm. I'll think on that. It's a weird one for sure.

you can build OpenJDK 8 with OpenJDK 8 without issue, did that here before

Yeah. I opted for 7 merely because they said it was recommended, and not for any particular reason. It did work fine on 8.

@NightOwl888
Copy link
Contributor

Btw. you can build OpenJDK 8 with OpenJDK 8 without issue, did that here before - it says it's not recommended, but it works.

Yea, I figured it was possible to but there would be too many prerequisites to go into to make it into an officially supported procedure.

The customizations are tedious, but as mentioned #40 (comment) we are running the original IKVM sources on JDK8u312 (including TLS1.3 support).

If you have any insights about how to maintain the customizations across future JDK versions without a lot of manual work, please share them.

Of course, we would like to merge the updates to JDK8u312, but it would be good to have a conversation on Discord to help ensure we are all working in the same direction to make that happen.

@wasabii
Copy link
Contributor

wasabii commented May 31, 2022

On integrating JDK8u312: that would be awesome.

What I found was that a number of the source files which had been forked into IKVM versions had simply been changed, and I didn't want to spend my time harmonizing those changes instead of releasing something that could actually build and function and attract interest.

I wanted to make sure we went over all of the forked IKVM changes, and fully understood their rational, before just blindly porting them a second time. Are the source files yanked from icedtea still needed? What about the classpath ones?

But yeah, a newer JDK version builds fine on a newer Linux.

@wasabii
Copy link
Contributor

wasabii commented May 31, 2022 via email

@NightOwl888 NightOwl888 added the enhancement New feature or request label Jun 7, 2022
@AliveDevil
Copy link
Collaborator Author

Fixed with #550.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants