-
Notifications
You must be signed in to change notification settings - Fork 6.2k
JDK-8324243: Compilation failures in java.desktop module with gcc 14 #17506
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
Conversation
Backport harfbuzz/harfbuzz@032c931 to fix build with GCC 14.
|
👋 Welcome back thesamesam! A progress list of the required criteria for merging this PR into |
|
@thesamesam The following label will be automatically applied to this pull request:
When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing list. If you would like to change these labels, use the /label pull request command. |
|
@thesamesam Unfortunately we can't fix the harfbuzz sources, since they are third party code. Your changes to harfbuzz code wouldn't be accepted by the client team :( |
Bleh. I don't suppose any exception can be made given it's a cherry-pick (i.e. my changes there are not original, they're upstream, just not in a release)? If not, I can just drop that bit, and we can wait until a new Harfbuzz release is made and propagates into OpenJDK. |
|
I don't believe harfbuzz has been bumped into a specific commit before, so I'm not sure about that. Perhaps you could wait till Phil sees this, for a conclusive answer |
|
ok - if I have to drop it, so be it, not the end of the world. I guess it's also tricky because of cherry-picking one change vs bumping to some git commit upstream as a whole. I'll wait a little bit then just drop if nobody chimes in. Thank you! |
|
You'd need a issue on the tracker to connect to this Pull Request for anyone to see this (most reviewers don't go through these manually, they come from the mailing lists). Are you able to create one yourself, or should I create one for you? |
|
Would you be so kind to file one for me please? I don't have access yet. |
|
No problem! Just change your Pull Request title to 8324243 (The literal number) and watch the magic happen :) By the way, your name strikes me as familiar. Have I seen you before on the gcc mailing lists? |
-Wcalloc-transposed-args errors out with GCC 14 as the OpenJDK build uses -Werror. The calloc prototype is: ``` void *calloc(size_t nmemb, size_t size); ``` So, just swap the number of members and size arguments to match the prototype, as we're initialising 1 struct of size `sizeof(struct ...)`. GCC then sees we're not doing anything wrong. Signed-off-by: Sam James <sam@gentoo.org>
|
@thesamesam Please do not rebase or force-push to an active PR as it invalidates existing review comments. Note for future reference, the bots always squash all changes into a single commit automatically as part of the integration. See OpenJDK Developers’ Guide for more information. |
Webrevs
|
Many thanks!
You know, now you say it, I think we have interacted before actually - either on the GCC ML or bugzilla! I tend to pop up in a lot of places just because we have a lot of users with a lot of different odd and interesting environments. |
Ah! I think you might be the same Sam James in my thread about adding the invalid-noreturn warning to gcc (Which ultimately didn't get anywhere). Glad to meet you again! :) This Pull Request might be related to client libs code, but given its nature I'd consider it a build-dev issue too, in which case, have a thumbs up from me, since that is my domain. Thanks, and welcome to OpenJDK if you're new here! |
|
Ah, yes! FWIW, I'm still disappointed about that as well (I don't have any sort of power, just tend to do a lot of triage). Do consider sending it again when stage 1 opens again after GCC 14 is out. Persistence is key with GCC, even if your change isn't an objectionable one. It took me a little while to get used to that.. |
This reverts commit acdd606c5d818baa783c6529ea58e66a061ec64a.
|
@thesamesam Please do not rebase or force-push to an active PR as it invalidates existing review comments. Note for future reference, the bots always squash all changes into a single commit automatically as part of the integration. See OpenJDK Developers’ Guide for more information. |
|
/label add build |
|
@magicus |
magicus
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes look good from a build perspective, but you need an ok from client as well for java.desktop changes.
kimbarrett
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(I'm not a member of the relevant teams, but...)
The changes to calloc calls are plainly an improvement. The new gcc
warnings are correct in the sense of potentially confused code, though
in all of these cases I think it's "harmless".
Just a minor whitespace issue in the build changes.
|
@thesamesam you need to fix the PR title to match the JBS issue just as the bot is instructing you. |
|
Thanks, I hadn't gone back and read the original comment. |
|
@thesamesam This change now passes all automated pre-integration checks. ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details. After integration, the commit message for the final commit will be: 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 385 new commits pushed to the
As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details. As you do not have Committer status in this project an existing Committer must agree to sponsor your change. Possible candidates are the reviewers of this PR (@TheShermanTanker, @magicus, @kimbarrett, @prrace) but any other Committer may sponsor as well. ➡️ To flag this PR as ready for integration with the above commit message, type |
|
/integrate |
|
@thesamesam |
|
Glad to have met you again in this Pull Request :) |
|
Going to push as commit 8e5f6dd.
Your commit was automatically rebased without conflicts. |
|
@TheShermanTanker @thesamesam Pushed as commit 8e5f6dd. 💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored. |
|
Thank you! |
This fixes building with GCC 14:
Cherry-pick a fix from Harfbuzz upstream-Wcalloc-transposed-argsfixes to the JDK sources-Wcalloc-transposed-args errors out with GCC 14 as the OpenJDK build uses
-Werror.
The calloc prototype is:
So, just swap the number of members and size arguments to match the prototype, as
we're initialising 1 struct of size
sizeof(struct ...). GCC then sees we're notdoing anything wrong.
Progress
Issue
Reviewers
Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/17506/head:pull/17506$ git checkout pull/17506Update a local copy of the PR:
$ git checkout pull/17506$ git pull https://git.openjdk.org/jdk.git pull/17506/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 17506View PR using the GUI difftool:
$ git pr show -t 17506Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/17506.diff
Webrev
Link to Webrev Comment