JDK-8251546 : 8u backport of JDK-8194298 breaks AIX and Solaris builds
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.net
  • Affected Version: openjdk8u272
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS: solaris,aix
  • Submitted: 2020-08-13
  • Updated: 2020-10-25
  • Resolved: 2020-08-25
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
openjdk8u272 b05Fixed
Related Reports
Relates :  
Description
"jdk8u/jdk/src/solaris/native/java/net/ExtendedOptionsImpl.c", line 467.47: 1506-045 (S) Undeclared identifier TCP_KEEPCNT.
"jdk8u/jdk/src/solaris/native/java/net/ExtendedOptionsImpl.c", line 467.60: 1506-045 (S) Undeclared identifier SOCK_OPT_LEVEL.
"jdk8u/jdk/src/solaris/native/java/net/ExtendedOptionsImpl.c", line 479.38: 1506-276 (S) Syntax error: possible missing ')'?
"jdk8u/jdk/src/solaris/native/java/net/ExtendedOptionsImpl.c", line 478.47: 1506-045 (S) Undeclared identifier SOCK_OPT_NAME_KEEPIDLE.
"jdk8u/jdk/src/solaris/native/java/net/ExtendedOptionsImpl.c", line 478.71: 1506-045 (S) Undeclared identifier SOCK_OPT_LEVEL.
"jdk8u/jdk/src/solaris/native/java/net/ExtendedOptionsImpl.c", line 489.47: 1506-045 (S) Undeclared identifier TCP_KEEPINTVL.
"jdk8u/jdk/src/solaris/native/java/net/ExtendedOptionsImpl.c", line 489.62: 1506-045 (S) Undeclared identifier SOCK_OPT_LEVEL.
"jdk8u/jdk/src/solaris/native/java/net/ExtendedOptionsImpl.c", line 500.46: 1506-045 (S) Undeclared identifier TCP_KEEPCNT.
"jdk8u/jdk/src/solaris/native/java/net/ExtendedOptionsImpl.c", line 500.59: 1506-045 (S) Undeclared identifier SOCK_OPT_LEVEL.
"jdk8u/jdk/src/solaris/native/java/net/ExtendedOptionsImpl.c", line 512.45: 1506-276 (S) Syntax error: possible missing ')'?
"jdk8u/jdk/src/solaris/native/java/net/ExtendedOptionsImpl.c", line 511.46: 1506-045 (S) Undeclared identifier SOCK_OPT_NAME_KEEPIDLE.
"jdk8u/jdk/src/solaris/native/java/net/ExtendedOptionsImpl.c", line 511.70: 1506-045 (S) Undeclared identifier SOCK_OPT_LEVEL.
"jdk8u/jdk/src/solaris/native/java/net/ExtendedOptionsImpl.c", line 522.46: 1506-045 (S) Undeclared identifier TCP_KEEPINTVL.
"jdk8u/jdk/src/solaris/native/java/net/ExtendedOptionsImpl.c", line 522.61: 1506-045 (S) Undeclared identifier SOCK_OPT_LEVEL.

See also:
https://bugs.openjdk.java.net/browse/JDK-8250631?focusedCommentId=14362734&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-14362734
Comments
There also appears to be a fix needed for macosx. I had to apply the following patch to make the build work: diff -r eb7f437285a1 -r d71010a5e0eb src/solaris/native/java/net/ExtendedOptionsImpl.c --- a/src/solaris/native/java/net/ExtendedOptionsImpl.c Wed Oct 21 02:49:56 2020 +0100 +++ b/src/solaris/native/java/net/ExtendedOptionsImpl.c Sun Oct 25 09:54:28 2020 +0100 @@ -348,6 +348,8 @@ #define SOCK_OPT_LEVEL IPPROTO_TCP #define SOCK_OPT_NAME_KEEPIDLE TCP_KEEPALIVE #define SOCK_OPT_NAME_KEEPIDLE_STR "TCP_KEEPALIVE" +#define TCP_KEEPCNT -1 +#define TCP_KEEPINTVL -1 #endif static jint socketOptionSupported(jint sockopt) {
25-10-2020

URL: https://hg.openjdk.java.net/jdk8u/jdk8u/jdk/rev/8a367e717840 User: andrew Date: 2020-08-28 05:53:15 +0000
28-08-2020

URL: https://hg.openjdk.java.net/jdk8u/jdk8u-dev/jdk/rev/8a367e717840 User: sgehwolf Date: 2020-08-25 09:26:32 +0000
25-08-2020

Fix Request (OpenJDK 8u): Please approve this fix for a previous backport (JDK-8194298) which broke the build on solaris and AIX. Tested builds on affected platforms. Pass. No regressions noted on Linux x86_64. Patch was reviewed by Aleksey Shipilev. Review thread: http://mail.openjdk.java.net/pipermail/jdk8u-dev/2020-August/012487.html webrev: http://cr.openjdk.java.net/~sgehwolf/webrevs/JDK-8251546/02/webrev/
20-08-2020

Thanks for providing a fix so quickly. http://cr.openjdk.java.net/~sgehwolf/webrevs/JDK-8194298-aix-solaris-fix/01/webrev/ fixes the AIX build.
14-08-2020

Candidate webrev: http://cr.openjdk.java.net/~sgehwolf/webrevs/JDK-8194298-aix-solaris-fix/01/webrev/ That still seems to fail on Solaris with: 19:25:34 Undefined first referenced 19:25:34 symbol in file 19:25:34 setTcpSocketOption /export/home/jenkins/workspace/build-scripts/jobs/jdk8u/jdk8u-solaris-x64-hotspot/workspace/build/src/build/solaris-x86_64-normal-server-release/jdk/objs/libnet/ExtendedOptionsImpl.o 19:25:34 getTcpSocketOption /export/home/jenkins/workspace/build-scripts/jobs/jdk8u/jdk8u-solaris-x64-hotspot/workspace/build/src/build/solaris-x86_64-normal-server-release/jdk/objs/libnet/ExtendedOptionsImpl.o 19:25:34 ld: fatal: symbol referencing errors. No output written to /export/home/jenkins/workspace/build-scripts/jobs/jdk8u/jdk8u-solaris-x64-hotspot/workspace/build/src/build/solaris-x86_64-normal-server-release/jdk/lib/amd64/libnet.so
13-08-2020

I've had also reports from AdoptOpenJDK folks that it's failing on solaris in a similar way.
13-08-2020