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

Fix various script issues with Windows JDK11 #2483

Merged
merged 1 commit into from
Jul 26, 2018

Conversation

ChengJin01
Copy link

The changes are to resolve all script issues
detected when compiling JDK11 on Windows.

Signed-off-by: CHENGJin [email protected]

@ChengJin01
Copy link
Author

ChengJin01 commented Jul 25, 2018

The changes mainly addressed the following issues:
0)buildenv/Build_Instructions_V11.md: update the windows section for the compilation with VS2017
1)runtime/compiler/build/toolcfg/win-msvc/common.mk: specify libraries used since VS2015.
Note: msvcrt was split to msvcrt, ucrt and vcruntime since VS2015.
Please refer to https://blogs.msdn.microsoft.com/vcblog/2015/03/03/introducing-the-universal-crt/ for details
2)runtime/ddr/blacklist: temporarily exclude these types
3)runtime/ddr/module.xml: fixed the issue in generating jvmtitest.res via omrddrgen
4)runtime/makelib/mkconstants.mk.ftl: export the bin path to MINGW64 if compiled with VS2017

In addition, the issue with BlockPriorityQueue in vm\compiler\optimizer\JProfilingBlock.cpp was fixed by JIT team, so there is no change on our side (previously captured by VS2017)

Reviewer: @keithc-ca , @pshipton
FYI: @DanHeidinga


- [Cygwin](https://cygwin.com/install.html), which provides a Unix-style command line interface. Install all packages in the `Devel` category. Included in this package is mingw, a minimalist subset of GNU tools for Microsoft Windows. OpenJ9 uses the mingw/GCC compiler and is tested with version 6.4.0 of same. Other versions are expected to work also. In the `Archive` category, install the packages `zip` and `unzip`. In the `Utils` category, install the `cpio` package. Install any further package dependencies that are identified by the installer. More information about using Cygwin can be found [here](https://cygwin.com/docs.html).
- [Windows JDK 10](https://adoptopenjdk.net/releases.html?variant=openjdk10#x64_win), which is used as the boot JDK.
- [Microsoft Visual Studio 2013]( https://go.microsoft.com/fwlink/?LinkId=532495), which is the same compiler level used by OpenJDK; or [Microsoft Visual Studio 2017]( https://visualstudio.microsoft.com/thank-you-downloading-visual-studio/?sku=Community&rel=15), which is now supported.
Copy link
Member

Choose a reason for hiding this comment

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

Does 2013 work with Java 11?

Copy link
Member

Choose a reason for hiding this comment

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

It seems 2017 is the default for Java 11? If so "which is the same compiler level used by OpenJDK" isn't appropriate.

Copy link
Author

@ChengJin01 ChengJin01 Jul 26, 2018

Choose a reason for hiding this comment

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

According to openj9-openjdk-jdk11_v1/make/autoconf/toolchain_windows.m4:

# The order of these defines the priority by which we try to find them.
VALID_VS_VERSIONS="2017 2013 2015 2012 2010"
...

If --with-toolchain-version is not supplied on the command line, it searches the VS version from 2017 by order in VALID_VS_VERSIONS by default, depending on which VS version is installed on Windows. So it looks for VS2013 if VS2017 doesn't exist.

It seems 2017 is the default for Java 11

Pretty much yes in such case. I already updated the description there.

- [mingw-w64](https://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win32/Personal%20Builds/mingw-builds/installer/mingw-w64-install.exe)

**Note**
1) mingw-w64 must be installed if compiled with VS2017 in that the current version of cygwin has not yet integrated the latest changes of mingw-w64 for the moment. In addition, set up the environment variable MINGW64_BIN_PATH to the binary path of mingw-w64. e.g.
Copy link
Member

Choose a reason for hiding this comment

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

compiled -> compiling

I assume mingw-w64 contains executables that conflict with cygwin?
MINGW64_BIN_PATH is optional? i.e. if mingw-w64 is before cygwin on the path then setting MINGW64_BIN_PATH is not required?

Copy link
Author

@ChengJin01 ChengJin01 Jul 26, 2018

Choose a reason for hiding this comment

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

compiled -> compiling

Updated.

Copy link
Author

@ChengJin01 ChengJin01 Jul 26, 2018

Choose a reason for hiding this comment

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

I assume mingw-w64 contains executables that conflict with cygwin? ...

The reason we chose the latest version of mingw-w64 (supports VS2017) is because we need the new version of x86_64-w64-mingw32-g++ (which is outdated in cygwin) to compile Interpreter related files (including BytecodeInterpreter, MHInterpreter, etc)

There is no need to set up path to Cygwin at all because it knows where to run x86_64-w64-mingw32-g++ in Cygwin by default. But I can try adding the binary path to mingw-w64 to see what happens.

Copy link
Author

Choose a reason for hiding this comment

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

Already recompiled and it works as expected (also no problem with java -version).
So updated the document and removed MINGW64_BIN_PATH in runtime\makelib\mkconstants.mk.ftl.

```
export MINGW64_BIN_PATH="C:\mingw-w64\x86_64-8.1.0-win32-seh-rt_v6-rev0\mingw64\bin\"
```
2) FreeType2 is not required on Windows Platform (Please refer to https://github.com/ibmruntimes/openj9-openjdk-jdk11/blob/openj9/doc/building.md for details)
Copy link
Member

Choose a reason for hiding this comment

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

I don't think we need to mention something is not a requirement.

Copy link
Author

Choose a reason for hiding this comment

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

Already removed.

@ChengJin01 ChengJin01 force-pushed the Fix_issues_Win_JDK11 branch 10 times, most recently from 4f44191 to 3e2404c Compare July 26, 2018 14:52
The changes are to resolve all script issues
detected when compiling JDK11 on Windows.

Signed-off-by: CHENGJin <[email protected]>
@ChengJin01 ChengJin01 force-pushed the Fix_issues_Win_JDK11 branch from 3e2404c to 92111a2 Compare July 26, 2018 14:53
@pshipton
Copy link
Member

jenkins compile win

@pshipton pshipton merged commit 2240a0e into eclipse-openj9:master Jul 26, 2018
@ChengJin01 ChengJin01 deleted the Fix_issues_Win_JDK11 branch June 23, 2020 23:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants