Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8036145

Solaris standard grep does not understand -qE

    XMLWordPrintable

Details

    • b04
    • solaris

    Description

      When fixing JDK-8035904, I did the simplest fix I could come up with and used grep to do regexp matching. Since the existing regexp patterns were written in extended regexp, I added the -E flag instead of converting to non extended. I also added the -q flag instead of piping to /dev/null. Both of these options are specified by POSIX so I assumed it would work on all our platforms. Testing in JPRT showed that it did.

      Today I tried building manually on a Solaris machine and was met with these repeated errors:

      grep: illegal option -- q
      grep: illegal option -- E
      Usage: grep -hblcnsviw pattern file . . .

      It seems /usr/bin/grep does not accept either -E or -q, but you have to use /usr/xpg4/bin/grep to get those. The build still seems to work, but the new reconfigure likely won't work.

      To solve this issue I recommend converting the regexp instead to maximize compatibility.

      Attachments

        Activity

          People

            Unassigned Unassigned
            erikj Erik Joelsson
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: