Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

8282372: [11] build issue on MacOS/aarch64 12.2.1 using Xcode 13.1: call to 'log2_intptr' is ambiguous #841

Closed
wants to merge 1 commit into from

Conversation

GoeLin
Copy link
Member

@GoeLin GoeLin commented Feb 25, 2022

…all to 'log2_intptr' is ambiguous

Fix build error.

In case someone else addresses this I can well cancel this PR.


Progress

  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • Change must be properly reviewed

Issue

  • JDK-8282372: [11] build issue on MacOS/aarch64 12.2.1 using Xcode 13.1: call to 'log2_intptr' is ambiguous

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.java.net/jdk11u-dev pull/841/head:pull/841
$ git checkout pull/841

Update a local copy of the PR:
$ git checkout pull/841
$ git pull https://git.openjdk.java.net/jdk11u-dev pull/841/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 841

View PR using the GUI difftool:
$ git pr show -t 841

Using diff file

Download this PR as a diff file:
https://git.openjdk.java.net/jdk11u-dev/pull/841.diff

@bridgekeeper
Copy link

bridgekeeper bot commented Feb 25, 2022

👋 Welcome back goetz! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk openjdk bot changed the title 8282372: [11] build issue on MacOS/aarch64 12.2.1 using Xcode 13.1: c… 8282372: [11] build issue on MacOS/aarch64 12.2.1 using Xcode 13.1: call to 'log2_intptr' is ambiguous Feb 25, 2022
@openjdk openjdk bot added the rfr Pull request is ready for review label Feb 25, 2022
@mlbridge
Copy link

mlbridge bot commented Feb 25, 2022

Webrevs

@openjdk
Copy link

openjdk bot commented Feb 25, 2022

@GoeLin This change now passes all automated pre-integration checks.

After integration, the commit message for the final commit will be:

8282372: [11] build issue on MacOS/aarch64 12.2.1 using Xcode 13.1: call to 'log2_intptr' is ambiguous

Reviewed-by: clanger

You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed.

At the time when this comment was updated there had been no new commits pushed to the master branch. If another commit should be pushed before you perform the /integrate command, your PR will be automatically rebased. If you prefer to avoid any potential automatic rebasing, please check the documentation for the /integrate command for further details.

➡️ To integrate this PR with the above commit message to the master branch, type /integrate in a new comment.

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Feb 25, 2022
@mlbridge
Copy link

mlbridge bot commented Feb 25, 2022

Mailing list message from Andrew Haley on jdk-updates-dev:

On 2/25/22 13:01, Goetz Lindenmaier wrote:

?all to 'log2_intptr' is ambiguous

Fix build error.

In case someone else addresses this I can well cancel this PR.

This is in progress; see The discussion at the end of
https://github.com//pull/280

@GoeLin
Copy link
Member Author

GoeLin commented Feb 25, 2022

/contributor add ahmedmuhsin

See also #280

@openjdk
Copy link

openjdk bot commented Feb 25, 2022

@GoeLin Could not parse ahmedmuhsin as a valid contributor.
Syntax: /contributor (add|remove) [@user | openjdk-user | Full Name <email@address>]. For example:

  • /contributor add @openjdk-bot
  • /contributor add duke
  • /contributor add J. Duke <duke@openjdk.org>

@mlbridge
Copy link

mlbridge bot commented Feb 25, 2022

Mailing list message from Lindenmaier, Goetz on jdk-updates-dev:

Hi,

Thanks Andrew. But from the PR it's not clear who might
make a fix. It's two days old now.

I ran into this because I was setting up a mac aarch build
in our test infrastructure.

I used the proposal in 8282372 for my PR, it's just what is
proposed in PR 280 of "8254072 AArch64: Get rid of --disable-warnings-as-errors on Windows+ARM64 build".

If you Ahmed, or someone else wants to push a change,
that's fine.
Else I would push it later tonight.

Best regards,
Goetz.

-----Original Message-----
From: jdk-updates-dev <jdk-updates-dev-retn at openjdk.java.net> On
Behalf Of Andrew Haley
Sent: Friday, February 25, 2022 2:29 PM
To: jdk-updates-dev at openjdk.java.net
Subject: Re: [jdk11u-dev] RFR: 8282372: [11] build issue on MacOS/aarch64
12.2.1 using Xcode 13.1: call to 'log2_intptr' is ambiguous

On 2/25/22 13:01, Goetz Lindenmaier wrote:

...all to 'log2_intptr' is ambiguous

Fix build error.

In case someone else addresses this I can well cancel this PR.

This is in progress; see The discussion at the end of
https://github.com//pull/280

@mlbridge
Copy link

mlbridge bot commented Feb 25, 2022

Mailing list message from Andrew Haley on jdk-updates-dev:

On 2/25/22 14:47, Lindenmaier, Goetz wrote:

I used the proposal in 8282372 for my PR, it's just what is
proposed in PR 280 of "8254072 AArch64: Get rid of --disable-warnings-as-errors on Windows+ARM64 build".

If you Ahmed, or someone else wants to push a change,
that's fine.
Else I would push it later tonight.

OK, I see. In any case it's a trivial change, so please do that.

--
Andrew Haley (he/him)
Java Platform Lead Engineer
Red Hat UK Ltd. <https://www.redhat.com>
https://keybase.io/andrewhaley
EAC8 43EB D3EF DB98 CC77 2FAD A5CD 6035 332F A671

@RealCLanger
Copy link
Contributor

/contributor add @ahmedmuhsin

@openjdk
Copy link

openjdk bot commented Feb 25, 2022

@RealCLanger Only the author (@GoeLin) is allowed to issue the contributor command.

@dean-long
Copy link
Member

Does this work for Windows+ARM64?
@rnkovacs

@GoeLin
Copy link
Member Author

GoeLin commented Feb 25, 2022

/contributor add @ahmedmuhsin

@openjdk
Copy link

openjdk bot commented Feb 25, 2022

@GoeLin Could not parse @ahmedmuhsin as a valid contributor.
Syntax: /contributor (add|remove) [@user | openjdk-user | Full Name <email@address>]. For example:

  • /contributor add @openjdk-bot
  • /contributor add duke
  • /contributor add J. Duke <duke@openjdk.org>

@GoeLin
Copy link
Member Author

GoeLin commented Feb 25, 2022

/integrate

@openjdk
Copy link

openjdk bot commented Feb 25, 2022

Going to push as commit 80a2777.

@openjdk openjdk bot added the integrated Pull request has been integrated label Feb 25, 2022
@openjdk openjdk bot closed this Feb 25, 2022
@openjdk openjdk bot removed ready Pull request is ready to be integrated rfr Pull request is ready for review labels Feb 25, 2022
@openjdk
Copy link

openjdk bot commented Feb 25, 2022

@GoeLin Pushed as commit 80a2777.

💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.

@ahmedmuhsin
Copy link

@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: 6d03795

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: #715 (comment)

I don't want to hijack this thread so we can continue that discussion under the new bug/PR once someone creates it.

@GoeLin
Copy link
Member Author

GoeLin commented Feb 28, 2022

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?

@ahmedmuhsin
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
integrated Pull request has been integrated
4 participants