Building OpenJDK9 on MSYS2
Magnus Ihse Bursie
magnus.ihse.bursie at oracle.com
Tue Oct 3 20:34:55 UTC 2017
I gave msys2 a shot some time ago, but it ended up too much trouble.
I'll share some of my notes from that attempt, for what it's worth.
To install package X/Y, run "pacman -S X/Y". Missing tools and packages
where to find them:
config.sub reports msys as "x86_64-pc-mingw32" but msys2 as
"x86_64-pc-msys". This patch adds postprocessing in "our" config.sub to
report msys2 similar to msys. (Opinions, including my own :-) may vary
if this really is the best way..)
diff -r b88023f46daa common/autoconf/build-aux/config.sub
--- a/common/autoconf/build-aux/config.sub Fri Jan 27 10:15:41 2017
+++ b/common/autoconf/build-aux/config.sub Fri Feb 03 05:00:25 2017
@@ -30,7 +30,7 @@
# First, filter out everything that doesn't begin with "aarch64-"
-if ! echo $* | grep '^aarch64-' >/dev/null ; then
+if ! echo $* | grep -e '^aarch64-' -e 'msys' >/dev/null ; then
. $DIR/autoconf-config.sub "$@"
# autoconf-config.sub exits, so we never reach here, but just in
# case we do:
@@ -45,6 +45,10 @@
config=`echo $1 | sed 's/^aarch64-/arm-/'`
+ *-msys )
+ config=`echo $1 | sed 's/msys/mingw32/'`
+ sub_args="$sub_args $config"
+ shift; ;;
- ) # Use stdin as input.
shift; break ;;
If I remember correctly, this got me past the configure stage at the time.
I don't think it's very hard to get it to work on msys2, I just ran into
one snag too many and didn't think msys2 would be used by anyone.
On 2017-10-03 17:20, Peter Budai wrote:
> According to http://hg.openjdk.java.net/jdk9/jdk9/file/a08cbfc0e4ec/common/doc/building.html “msys2 and the new Windows Subsystem for Linux (WSL) would likely be possible to support in a future version but that would require a community effort to implement”
> I’d like to help making the OpenJDK 9 build working on msys2. What is the best way to move forward? Is there a similar effort in progress?
> Thank you and best regards,
More information about the build-dev