Skip to content

Conversation

@jianglizhou
Copy link
Contributor

@jianglizhou jianglizhou commented Jan 28, 2025

Please review this workaround for the compiler error on Windows. This error occurs in closed build with custom make logic that uses zip_util.c. The error indicates DEF_STATIC_JNI_OnLoad is not defined, thus disable the macro on Windows for now until the cause is fully understood.

[2025-01-28T16:57:35,721Z] c:\sb\prod\1738083154\workspace\open\src\java.base\share\native\libzip\zip_util.c(94): error C2054: expected '(' to follow 'DEF_STATIC_JNI_OnLoad'
[2025-01-28T16:57:35,721Z] c:\sb\prod\1738083154\workspace\open\src\java.base\share\native\libzip\zip_util.c(94): error C2085: 'ZFILE_Open': not in formal parameter list
[2025-01-28T16:57:35,737Z] c:\sb\prod\1738083154\workspace\open\src\java.base\share\native\libzip\zip_util.c(94): error C2143: syntax error: missing ';' before '{'
[2025-01-28T16:57:35,737Z] c:\sb\prod\1738083154\workspace\open\src\java.base\share\native\libzip\zip_util.c(776): warning C4013: 'ZFILE_Open' undefined; assuming extern returning int

Progress

  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • Change must be properly reviewed (2 reviews required, with at least 2 Reviewers)

Issue

  • JDK-8348888: tier1 closed build failure on Windows after JDK-8348348 (Bug - P2)

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/23340/head:pull/23340
$ git checkout pull/23340

Update a local copy of the PR:
$ git checkout pull/23340
$ git pull https://git.openjdk.org/jdk.git pull/23340/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 23340

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

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/23340.diff

Using Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Jan 28, 2025

👋 Welcome back jiangli! 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
Copy link

openjdk bot commented Jan 28, 2025

@jianglizhou 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:

8348888: tier1 closed build failure on Windows after JDK-8348348

Reviewed-by: kcr, liach, asemenyuk

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 3 new commits pushed to the master branch:

  • c018a60: 8344637: Fix Page8 of manual test java/awt/print/PrinterJob/PrintTextTest.java on Linux and Windows
  • c3c3888: 8336760: [JVMCI] -XX:+PrintCompilation should also print "hosted" JVMCI compilations
  • 9f4d3de: 8347718: Unexpected NullPointerException in C2 compiled code due to ReduceAllocationMerges

Please see this link for an up-to-date comparison between the source branch of this pull request and the master branch.
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.

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

@openjdk openjdk bot added the rfr Pull request is ready for review label Jan 28, 2025
@openjdk
Copy link

openjdk bot commented Jan 28, 2025

@jianglizhou The following label will be automatically applied to this pull request:

  • core-libs

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.

@openjdk openjdk bot added the core-libs core-libs-dev@openjdk.org label Jan 28, 2025
@mlbridge
Copy link

mlbridge bot commented Jan 28, 2025

Webrevs

@kevinrushforth
Copy link
Member

@alexeysemenyukoracle please review

Copy link
Member

@kevinrushforth kevinrushforth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since the only failures we've seen are on Windows, this fix should work. Alexey will be able to confirm this.

@jianglizhou
Copy link
Contributor Author

Will wait for @alexeysemenyukoracle's confirmation for testing. Thanks!

@alexeysemenyukoracle
Copy link
Member

zip_util.c(94): error C2054: expected '(' to follow 'DEF_STATIC_JNI_OnLoad'

It doesn't look like it complains about undefined DEF_STATIC_JNI_OnLoad

@kevinrushforth
Copy link
Member

zip_util.c(94): error C2054: expected '(' to follow 'DEF_STATIC_JNI_OnLoad'

It doesn't look like it complains about undefined DEF_STATIC_JNI_OnLoad

The compilation error I saw did.

A Mach5 job I submitted passed in one case where it was failing, so I think the fix is good.

@alexeysemenyukoracle Please confirm, though.

Copy link
Member

@liach liach left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Closed windows uninstaller build affected by the original issue now builds successfully. This patch should be fine.

@liach
Copy link
Member

liach commented Jan 28, 2025

/reviewers 2 reviewer

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Jan 28, 2025
@alexeysemenyukoracle
Copy link
Member

I believe it complained about the way DEF_STATIC_JNI_OnLoad is defined. That is why disabling the usage of DEF_STATIC_JNI_OnLoad fixes the problem.

@openjdk
Copy link

openjdk bot commented Jan 28, 2025

@liach
The total number of required reviews for this PR (including the jcheck configuration and the last /reviewers command) is now set to 2 (with at least 2 Reviewers).

@jianglizhou
Copy link
Contributor Author

I believe it complained about the way DEF_STATIC_JNI_OnLoad is defined. That is why disabling the usage of DEF_STATIC_JNI_OnLoad fixes the problem.

That probably describes the issue more clear. Thumbs up.

@jianglizhou
Copy link
Contributor Author

A Mach5 job I submitted passed

@kevinrushforth Thanks!

@jianglizhou
Copy link
Contributor Author

Thanks all, for reviews and testing!

I created JDK-8348892 to follow up on the issue.

@jianglizhou
Copy link
Contributor Author

/integrate

@openjdk
Copy link

openjdk bot commented Jan 28, 2025

Going to push as commit 1efae9a.
Since your change was applied there have been 3 commits pushed to the master branch:

  • c018a60: 8344637: Fix Page8 of manual test java/awt/print/PrinterJob/PrintTextTest.java on Linux and Windows
  • c3c3888: 8336760: [JVMCI] -XX:+PrintCompilation should also print "hosted" JVMCI compilations
  • 9f4d3de: 8347718: Unexpected NullPointerException in C2 compiled code due to ReduceAllocationMerges

Your commit was automatically rebased without conflicts.

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

openjdk bot commented Jan 28, 2025

@jianglizhou Pushed as commit 1efae9a.

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core-libs core-libs-dev@openjdk.org integrated Pull request has been integrated

Development

Successfully merging this pull request may close these issues.

4 participants