[jdk11u-dev] RFR: 8282372: [11] build issue on MacOS/aarch64 12.2.1 using Xcode 13.1: call to 'log2_intptr' is ambiguous
Ahmed Muhsin
duke at openjdk.java.net
Mon Feb 28 18:22:32 UTC 2022
On Mon, 28 Feb 2022 08:11:34 GMT, Goetz Lindenmaier <goetz at openjdk.org> wrote:
>> @dean-long
>>
>> This change does not conflict with the windows-aarch64 build.
>>
>> However, the windows-aarch64 build does have a separate build issue that is due to this commit: https://github.com/openjdk/jdk11u-dev/pull/715/commits/6d0379585aef668dedcf1f392349ccc72d6d192b
>>
>> The fix is to just revert that commit. I do not have an account on JBS yet but if someone else wants to go ahead and create the bug I can submit the PR.
>>
>> Here's a copy of the build error:
>>
>> * For target hotspot_variant-server_libjvm_objs_macroAssembler_aarch64.obj:
>> macroAssembler_aarch64.cpp
>> d:/a/1/jdk/src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp(1495): error C3688: invalid literal suffix 'PRIX64'; literal operator or literal operator template 'operator ""PRIX64' not found
>> d:/a/1/jdk/src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp(1495): error C2664: 'int snprintf(char *const ,const size_t,const char *const ,...)': cannot convert argument 3 from 'uint64_t' to 'const char *const '
>> d:/a/1/jdk/src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp(1495): note: Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast
>> d:\a\1\openjdk-azure-devops-harness\workspace\tmp1oj032l3\10\include\ucrt\stdio.h(1919): note: see declaration of 'snprintf'
>> d:/a/1/jdk/src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp(1558): error C3688: invalid literal suffix 'PRIX64'; literal operator or literal operator template 'operator ""PRIX64' not found
>> d:/a/1/jdk/src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp(1558): error C2664: 'int snprintf(char *const ,const size_t,const char *const ,...)': cannot convert argument 3 from 'uint64_t' to 'const char *const '
>> d:/a/1/jdk/src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp(1558): note: Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast
>> d:\a\1\openjdk-azure-devops-harness\workspace\tmp1oj032l3\10\include\ucrt\stdio.h(1919): note: see declaration of 'snprintf'
>> d:/a/1/jdk/src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp(1671): error C3688: invalid literal suffix 'PRIX32'; literal operator or literal operator template 'operator ""PRIX32' not found
>> d:/a/1/jdk/src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp(1671): error C2664: 'int snprintf(char *const ,const size_t,const char *const ,...)': cannot convert argument 3 from 'uint32_t' to 'const char *const '
>> d:/a/1/jdk/src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp(1671): note: Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast
>> d:\a\1\openjdk-azure-devops-harness\workspace\tmp1oj032l3\10\include\ucrt\stdio.h(1919): note: see declaration of 'snprintf'
>> ... (rest of output omitted)
>>
>>
>> cc: @Vladimirkempik @theRealAph
>> Although reverting the commit fixes the build issue, there was some discussion about the correctness of the original change here: https://github.com/openjdk/jdk11u-dev/pull/715#issuecomment-1032449457
>>
>> I don't want to hijack this thread so we can continue that discussion under the new bug/PR once someone creates it.
>
> Hi @ahmedmuhsin
> I think we need to backport "8211333: AArch64: Fix another build failure after JDK-8211029"
> to fix your problem "invalid literal suffix 'PRIX64'" above. Can you please verify?
Hey @GoeLin,
Backporting 8211333 did fix the build issue.
Here's my diff of the backport:
diff --git a/src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp b/src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp
index 669b08b9266..4bab77d542f 100644
--- a/src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp
+++ b/src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp
@@ -1492,7 +1492,7 @@ void MacroAssembler::movptr(Register r, uintptr_t imm64) {
#ifndef PRODUCT
{
char buffer[64];
- snprintf(buffer, sizeof(buffer), "0x%"PRIX64, (uint64_t)imm64);
+ snprintf(buffer, sizeof(buffer), "0x%" PRIX64, (uint64_t)imm64);
block_comment(buffer);
}
#endif
@@ -1555,7 +1555,7 @@ void MacroAssembler::mov_immediate64(Register dst, uint64_t imm64)
#ifndef PRODUCT
{
char buffer[64];
- snprintf(buffer, sizeof(buffer), "0x%"PRIX64, imm64);
+ snprintf(buffer, sizeof(buffer), "0x%" PRIX64, imm64);
block_comment(buffer);
}
#endif
@@ -1668,7 +1668,7 @@ void MacroAssembler::mov_immediate32(Register dst, uint32_t imm32)
#ifndef PRODUCT
{
char buffer[64];
- snprintf(buffer, sizeof(buffer), "0x%"PRIX32, imm32);
+ snprintf(buffer, sizeof(buffer), "0x%" PRIX32, imm32);
block_comment(buffer);
}
#endif
```
Thanks.
-------------
PR: https://git.openjdk.java.net/jdk11u-dev/pull/841
More information about the jdk-updates-dev
mailing list