RFR: JDK-8150456: jdk 9 nightly build fails on Windows 32 bit

David Holmes david.holmes at oracle.com
Tue Feb 23 23:19:56 UTC 2016


On 24/02/2016 9:12 AM, David Holmes wrote:
> Erik,
>
> There seems to be some confusion as there are two different problems on
> 32-bit windows. The build failure as reported in
>
> https://bugs.openjdk.java.net/browse/JDK-8150456
>
> 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.

David
-----

> David
> -----
>
> 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
>> eliminated:
>>
>> 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
>> Patch:
>> 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 2016
>> +0100
>> +++ b/src/java.base/share/native/libzip/CRC32.c Tue Feb 23 23:49:10 2016
>> +0100
>> @@ -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);
>>
>> /Erik



More information about the build-dev mailing list