JDK-8224058 : Build failure after JDK-8184770 (JDWP support for IPv6)
  • Type: Bug
  • Component: core-svc
  • Sub-Component: debugger
  • Affected Version: 13
  • Priority: P3
  • Status: Resolved
  • Resolution: Duplicate
  • Submitted: 2019-05-16
  • Updated: 2019-05-16
  • Resolved: 2019-05-16
Related Reports
Duplicate :  
Relates :  
Description
* For target support_native_jdk.jdwp.agent_libdt_socket_socketTransport.o:
/home/shade/jdk-jdk/src/jdk.jdwp.agent/share/native/libdt_socket/socketTransport.c: In function 'parseAllowedMask':
/home/shade/jdk-jdk/src/jdk.jdwp.agent/share/native/libdt_socket/socketTransport.c:422:5: error: 'for' loop initial declarations are only allowed in C99 mode
     for (int i = 0; prefixLen > 0; i++, prefixLen -= 8) {
     ^
/home/shade/jdk-jdk/src/jdk.jdwp.agent/share/native/libdt_socket/socketTransport.c:422:5: note: use option -std=c99 or -std=gnu99 to compile your code
/home/shade/jdk-jdk/src/jdk.jdwp.agent/share/native/libdt_socket/socketTransport.c: In function 'parseAllowedPeersInternal':
/home/shade/jdk-jdk/src/jdk.jdwp.agent/share/native/libdt_socket/socketTransport.c:481:13: error: 'for' loop initial declarations are only allowed in C99 mode
             for (size_t i = 0; i < sizeof(_peers[_peers_cnt].subnet); i++) {
             ^
/home/shade/jdk-jdk/src/jdk.jdwp.agent/share/native/libdt_socket/socketTransport.c: In function 'isAddressInSubnet':
/home/shade/jdk-jdk/src/jdk.jdwp.agent/share/native/libdt_socket/socketTransport.c:524:5: error: 'for' loop initial declarations are only allowed in C99 mode
     for (size_t i = 0; i < sizeof(struct in6_addr); i++) {
   ... (rest of output omitted)

* All command lines available in /home/shade/jdk-jdk/build/linux-x86_64-server-fastdebug/make-support/failure-logs.

Must be related to building on older RHEL with GCC 4.8.5.
Comments
Re-closed it as proper duplicate.
16-05-2019

No problem, do it next time to avoid duplicate work ;) I think I made basically the same patch as you did, so let's use yours.
16-05-2019

Sorry for not making a link.
16-05-2019

Eh, if only JDK-8224028 submitter linked the issue to the one that introduced it, eh. Okay, let's see there.
16-05-2019

This appears to be a dup of JDK-8224028, which is already out for review.
16-05-2019

With no clear way to enable C99, this is my second option: http://cr.openjdk.java.net/~shade/8224058/webrev.01/
16-05-2019