JDK-8006933 : Need to use nawk on Solaris to avoid awk limitations
  • Type: Bug
  • Component: other-libs
  • Sub-Component: corba
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • OS: solaris
  • Submitted: 2013-01-25
  • Updated: 2014-03-03
  • Resolved: 2013-02-01
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.
JDK 8
8 b76Fixed
Description
awk on Solaris has limits on input line length that can easily be reached during the build depending on the paths that are being used - see JDK-8006903 for one example.

Specifically this needs to be fixed in  ./corba/make/common/shared/Defs-utils.gmk

Additionally when awk fails it does not cause make to fail at that point eg:

(cd /HUDSON/workspace/2-build-solaris-sparcv9@3/jdk8-profiles-staging/2956/build/solaris-sparcv9/corba/gensrc/tmp___com_sun_corba_se_PortableActivationIDL_activation.idl___; find . -type f | sed 's!\./!/HUDSON/workspace/2-build-solaris-sparcv9@3/jdk8-profiles-staging/2956/build/solaris-sparcv9/corba/gensrc/!g' | awk '{ print $1 ": /HUDSON/workspace/2-build-solaris-sparcv9@3/jdk8-profiles-staging/2956/corba/src/share/classes/com/sun/corba/se/PortableActivationIDL/activation.idl" }' > /HUDSON/workspace/2-build-solaris-sparcv9@3/jdk8-profiles-staging/2956/build/solaris-sparcv9/corba/gensrc/com/sun/corba/se/PortableActivationIDL/activation.idl.d)
awk: string too long near line 1
awk: syntax error near line 1
awk: illegal statement near line 1 

instead the idl processing continues but then the corba classes never get compiled and classes.jar is not created and you eventually get the import failure in the JDK part of the build - as per JDK-8006903

This needs to be fixed
Comments
Fix out for review: http://cr.openjdk.java.net/~tbell/8006933/00/ Review thread is here: http://mail.openjdk.java.net/pipermail/build-dev/2013-January/007813.html
25-01-2013

Section 11.13 "Limitations of Usual Tools" on this page: http://www.gnu.org/software/autoconf/manual/autoconf-2.67/html_node/Limitations-of-Usual-Tools.html Reads in part: "Traditional Awk implementations derived from Unix version 7, such as Solaris /bin/awk, have many limitations and do not conform to Posix. Nowadays AC_PROG_AWK (see Particular Programs) finds you an Awk that doesn't have these problems, but if for some reason you prefer not to use AC_PROG_AWK you may need to address them."
25-01-2013