RFR: JDK-8150456: jdk 9 nightly build fails on Windows 32 bit
erik.joelsson at oracle.com
Tue Feb 23 23:40:25 UTC 2016
For the record, the full build is passing now.
On 2016-02-23 15:19, David Holmes wrote:
> On 24/02/2016 9:12 AM, David Holmes wrote:
>> There seems to be some confusion as there are two different problems on
>> 32-bit windows. The build failure as reported in
>> is a build failure in the install phase. The fix you are proposing below
>> fixes a runtime failure at VM initialization time.
> Sorry, now I see the full picture - the runtime failure causes a later
> part of the build to fail.
>> On 24/02/2016 8:50 AM, Erik Joelsson wrote:
>>> The windows 32 bit build is currently DOA.
>>> In JDK-8150203, the following build warning on Windows x64 was
>>> CRC32.c: warning LNK4197: export 'ZIP_CRC32' specified multiple times;
>>> using first specification
>>> This warning is emitted because the function both has a JNIEXPORT
>>> declaration and a link time -export:ZIP_CRC32. The change removed the
>>> -export link flag which removed the warning.
>>> On Windows x86, removing the explicit -export link flag is causing
>>> trouble. Just using JNIEXPORT (or really __declspec(dllexport)) is not
>>> the same thing as the link flag -export. The first will export
>>> _ZIP_CRC32 and the second ZIP_CRC32. In hotspot, jvm.dll will look for
>>> the symbol ZIP_CRC32 and will fail without the -export link flag.
>>> My proposed fix is to readd the -export and remove the JNIEXPORT from
>>> this function. This would mimic the pattern of the other exported
>>> symbols in this library.
>>> Bug: https://bugs.openjdk.java.net/browse/JDK-8150456
>>> diff -r 9d536355b828 make/lib/CoreLibraries.gmk
>>> --- a/make/lib/CoreLibraries.gmk Tue Feb 23 09:49:04 2016 +0100
>>> +++ b/make/lib/CoreLibraries.gmk Tue Feb 23 23:49:10 2016 +0100
>>> @@ -225,7 +225,7 @@
>>> $(call SET_SHARED_LIBRARY_ORIGIN), \
>>> LDFLAGS_windows := -export:ZIP_Open -export:ZIP_Close
>>> -export:ZIP_FindEntry \
>>> -export:ZIP_ReadEntry -export:ZIP_GetNextEntry \
>>> - -export:ZIP_InflateFully, \
>>> + -export:ZIP_InflateFully -export:ZIP_CRC32, \
>>> LIBS_unix := -ljvm -ljava $(LIBZ), \
>>> LIBS_solaris := -lc, \
>>> LIBS_windows := jvm.lib $(WIN_JAVA_LIB), \
>>> diff -r 9d536355b828 src/java.base/share/native/libzip/CRC32.c
>>> --- a/src/java.base/share/native/libzip/CRC32.c Tue Feb 23 09:49:04
>>> +++ b/src/java.base/share/native/libzip/CRC32.c Tue Feb 23 23:49:10
>>> @@ -54,7 +54,7 @@
>>> return crc;
>>> -JNIEXPORT jint JNICALL
>>> +jint JNICALL
>>> ZIP_CRC32(jint crc, const jbyte *buf, jint len)
>>> return crc32(crc, (Bytef*)buf, len);
More information about the build-dev