Support building OpenJDK on Windows using MSYS2 and MinGW-w64 GCC?

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Support building OpenJDK on Windows using MSYS2 and MinGW-w64 GCC?

Andrew Sun
Hi everyone,

I'm just wondering if OpenJDK could be modified to build on Windows using
MSYS2 (free Windows development environment that includes MinGW-w64 and
GCC). Currently MSYS2's MinGW-w64 toolchain (including GCC) is unsupported
for building OpenJDK, and Visual Studio is required; however, on Linux, GCC
is supported.
Would there be any implications to such a method? If not, I would be very
pleased. MSYS2 uses PKGBUILDs similar to the ones on Arch Linux. Adding a
MinGW-w64 PKGBUILD for mingw-w64-jdk*version*-openjdk would be very
beneficial to the MSYS2 project.

Thanks,

Andrew Sun
Reply | Threaded
Open this post in threaded view
|

Re: Support building OpenJDK on Windows using MSYS2 and MinGW-w64 GCC?

Phil Race
Some issues I see here are that
- the code has lots of things like #ifdef _MSC_VER .. fixable perhaps,
but ..
- the Windows SDK which includes the compiler is needed anyway
- no one is likely to maintain this ..
- Oracle is unlikely to use this for its own builds.

So probably not something Oracle would invest in and not sure who would
do it and keep it working .. whilst ensuring the VC code is still needed.

-phil.

On 11/4/17, 4:26 PM, Andrew Sun wrote:

> Hi everyone,
>
> I'm just wondering if OpenJDK could be modified to build on Windows using
> MSYS2 (free Windows development environment that includes MinGW-w64 and
> GCC). Currently MSYS2's MinGW-w64 toolchain (including GCC) is unsupported
> for building OpenJDK, and Visual Studio is required; however, on Linux, GCC
> is supported.
> Would there be any implications to such a method? If not, I would be very
> pleased. MSYS2 uses PKGBUILDs similar to the ones on Arch Linux. Adding a
> MinGW-w64 PKGBUILD for mingw-w64-jdk*version*-openjdk would be very
> beneficial to the MSYS2 project.
>
> Thanks,
>
> Andrew Sun
Reply | Threaded
Open this post in threaded view
|

Re: Support building OpenJDK on Windows using MSYS2 and MinGW-w64 GCC?

Andrew Sun
Okay, but MinGW-w64 offers much of the same headers and functions that the
Windows SDK includes. The goal of MinGW-w64 is to track as many Windows
APIs as possible, which includes those found in the Windows SDK, and
implement them in GCC, so that instead of the Windows SDK, GCC can be used.
The second point you mentioned could be solved this way. The only potential
problem is that bootstrapping OpenJDK would require a previous, presumably
Visual Studio compiled JDK, which would probably lead to ABI
incompatability and name-mangling. MinGW-w64, however, includes libmangle,
which can mitigate this problem.

Accidentally sent this message to individual instead of mailing list, sorry.

Thanks,

Andrew Sun

On Sun, Nov 5, 2017 at 8:14 AM, Andrew Sun <[hidden email]> wrote:

> Okay, but MinGW-w64 offers much of the same headers and functions that the
> Windows SDK includes. The goal of MinGW-w64 is to track as many Windows
> APIs as possible, which includes those found in the Windows SDK, and
> implement them in GCC, so that instead of the Windows SDK, GCC can be used.
> The second point you mentioned could be solved this way. The only potential
> problem is that bootstrapping OpenJDK would require a previous, presumably
> Visual Studio compiled JDK, which would probably lead to ABI
> incompatability and name-mangling. MinGW-w64, however, includes libmangle,
> which can mitigate this problem.
>
> Thanks,
>
> Andrew Sun
>
> On Sat, Nov 4, 2017 at 7:39 PM, Philip Race <[hidden email]>
> wrote:
>
>> Some issues I see here are that
>> - the code has lots of things like #ifdef _MSC_VER .. fixable perhaps,
>> but ..
>> - the Windows SDK which includes the compiler is needed anyway
>> - no one is likely to maintain this ..
>> - Oracle is unlikely to use this for its own builds.
>>
>> So probably not something Oracle would invest in and not sure who would
>> do it and keep it working .. whilst ensuring the VC code is still needed.
>>
>> -phil.
>>
>>
>> On 11/4/17, 4:26 PM, Andrew Sun wrote:
>>
>>> Hi everyone,
>>>
>>> I'm just wondering if OpenJDK could be modified to build on Windows using
>>> MSYS2 (free Windows development environment that includes MinGW-w64 and
>>> GCC). Currently MSYS2's MinGW-w64 toolchain (including GCC) is
>>> unsupported
>>> for building OpenJDK, and Visual Studio is required; however, on Linux,
>>> GCC
>>> is supported.
>>> Would there be any implications to such a method? If not, I would be very
>>> pleased. MSYS2 uses PKGBUILDs similar to the ones on Arch Linux. Adding a
>>> MinGW-w64 PKGBUILD for mingw-w64-jdk*version*-openjdk would be very
>>> beneficial to the MSYS2 project.
>>>
>>> Thanks,
>>>
>>> Andrew Sun
>>>
>>
>
Reply | Threaded
Open this post in threaded view
|

Re: Support building OpenJDK on Windows using MSYS2 and MinGW-w64 GCC?

David Holmes
In reply to this post by Andrew Sun
Hi Andrew,

Check the build-dev archives for October for a thread "Building OpenJDK9
on MSYS2". This is actively being worked on.

David

On 5/11/2017 9:26 AM, Andrew Sun wrote:

> Hi everyone,
>
> I'm just wondering if OpenJDK could be modified to build on Windows using
> MSYS2 (free Windows development environment that includes MinGW-w64 and
> GCC). Currently MSYS2's MinGW-w64 toolchain (including GCC) is unsupported
> for building OpenJDK, and Visual Studio is required; however, on Linux, GCC
> is supported.
> Would there be any implications to such a method? If not, I would be very
> pleased. MSYS2 uses PKGBUILDs similar to the ones on Arch Linux. Adding a
> MinGW-w64 PKGBUILD for mingw-w64-jdk*version*-openjdk would be very
> beneficial to the MSYS2 project.
>
> Thanks,
>
> Andrew Sun
>