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

[22.3] Windows build needs to account for new extended socket options in JDK 17.0.10 #612

Closed
jerboaa opened this issue Nov 9, 2023 · 4 comments · Fixed by #614
Closed
Assignees
Labels
bug Something isn't working

Comments

@jerboaa
Copy link
Collaborator

jerboaa commented Nov 9, 2023

In CI we see this failure:

    Creating library C:\Users\RUNNER~1\AppData\Local\Temp\SVM-18141433008043533303\quarkus-integration-test-resteasy-jackson-999-SNAPSHOT-runner.lib and object C:\Users\RUNNER~1\AppData\Local\Temp\SVM-18141433008043533303\quarkus-integration-test-resteasy-jackson-999-SNAPSHOT-runner.exp
quarkus-integration-test-resteasy-jackson-999-SNAPSHOT-runner.obj : error LNK2001: unresolved external symbol Java_jdk_net_WindowsSocketOptions_getTcpKeepAliveIntvl0
quarkus-integration-test-resteasy-jackson-999-SNAPSHOT-runner.obj : error LNK2001: unresolved external symbol Java_jdk_net_WindowsSocketOptions_getTcpKeepAliveProbes0
quarkus-integration-test-resteasy-jackson-999-SNAPSHOT-runner.obj : error LNK2001: unresolved external symbol Java_jdk_net_WindowsSocketOptions_getTcpKeepAliveTime0
quarkus-integration-test-resteasy-jackson-999-SNAPSHOT-runner.obj : error LNK2001: unresolved external symbol Java_jdk_net_WindowsSocketOptions_setTcpKeepAliveIntvl0
quarkus-integration-test-resteasy-jackson-999-SNAPSHOT-runner.obj : error LNK2001: unresolved external symbol Java_jdk_net_WindowsSocketOptions_setTcpKeepAliveProbes0
quarkus-integration-test-resteasy-jackson-999-SNAPSHOT-runner.obj : error LNK2001: unresolved external symbol Java_jdk_net_WindowsSocketOptions_setTcpKeepAliveTime0
D:\a\mandrel\mandrel\quarkus\integration-tests\resteasy-jackson\target\quarkus-integration-test-resteasy-jackson-999-SNAPSHOT-native-image-source-jar\quarkus-integration-test-resteasy-jackson-999-SNAPSHOT-runner.exe : fatal error LNK1120: 6 unresolved externals
	at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.image.NativeImageViaCC.handleLinkerFailure(NativeImageViaCC.java:204)
	at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.image.NativeImageViaCC.runLinkerCommand(NativeImageViaCC.java:151)
	at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.image.NativeImageViaCC.write(NativeImageViaCC.java:117)
	at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGenerator.doRun(NativeImageGenerator.java:724)
	at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGenerator.run(NativeImageGenerator.java:539)
	at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGeneratorRunner.buildImage(NativeImageGeneratorRunner.java:408)
	at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGeneratorRunner.build(NativeImageGeneratorRunner.java:612)
	at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGeneratorRunner.start(NativeImageGeneratorRunner.java:134)
	at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGeneratorRunner.main(NativeImageGeneratorRunner.java:94)

See: https://github.com/graalvm/mandrel/actions/runs/6810306032/job/18519936281?pr=609#step:13:2725

This is likely due to the new backport in JDK 17.0.10 adding new extended socket options for Windows. JDK bug:
https://bugs.openjdk.org/browse/JDK-8308593

Since the Linux code already had support for this, whatever is done for Linux in GraalVM will now likely also apply to Windows.

@jerboaa
Copy link
Collaborator Author

jerboaa commented Nov 9, 2023

Note that extended socket options are in extnet JDK library.

@jerboaa
Copy link
Collaborator Author

jerboaa commented Nov 9, 2023

This commit will need adaptations oracle@bf8f477861fb6

@jerboaa jerboaa self-assigned this Nov 9, 2023
@jerboaa
Copy link
Collaborator Author

jerboaa commented Nov 9, 2023

Confirmed. 17.0.10 has extnet.lib as part of the Windows static libs artefacts, 17.0.9 doesn't.

@jerboaa jerboaa linked a pull request Nov 10, 2023 that will close this issue
zakkak pushed a commit that referenced this issue Nov 10, 2023
Support for this got added to JDK 17.0.10+1 and, thus,
the GraalVM code needs to account for this change.

Closes: #612
@zakkak
Copy link
Collaborator

zakkak commented Nov 10, 2023

Closed via #614

@zakkak zakkak closed this as completed Nov 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants