[GHC] #9465: configure: sed: illegal option -- r

GHC ghc-devs at haskell.org
Tue Aug 19 10:02:47 UTC 2014


#9465: configure: sed: illegal option -- r
-------------------------------------+-------------------------------------
       Reporter:  jrp                |                   Owner:
           Type:  bug                |                  Status:  new
       Priority:  normal             |               Milestone:
      Component:  Build System       |                 Version:  7.8.3
       Keywords:  sed                |        Operating System:
   Architecture:  Unknown/Multiple   |  Unknown/Multiple
     Difficulty:  Easy (less than 1  |         Type of failure:  Building
  hour)                              |  GHC failed
     Blocked By:                     |               Test Case:
Related Tickets:                     |                Blocking:
                                     |  Differential Revisions:
-------------------------------------+-------------------------------------
 configure fails (but does not stop) as follows:
 {{{
 :
 checking version of ghc... 7.8.3
 checking whether bootstrap compiler is affected by bug 9439... yes
 checking build system type... x86_64-apple-darwin14.0.0
 checking host system type... x86_64-apple-darwin14.0.0
 checking target system type... x86_64-apple-darwin14.0.0
 Build platform inferred as: x86_64-apple-darwin
 Host platform inferred as: x86_64-apple-darwin
 Target platform inferred as: x86_64-apple-darwin
 GHC build  : x86_64-apple-darwin
 GHC host   : x86_64-apple-darwin
 GHC target : x86_64-apple-darwin
 configure: Building in-tree ghc-pwd
 sed: illegal option -- r
 usage: sed script [-Ealn] [-i extension] [file ...]
        sed [-Ealn] [-i extension] [-e script] ... [-f script_file] ...
 [file ...]
 }}}


 The gnu sed manual page says

 -r
 --regexp-extended
 Use extended regular expressions rather than basic regular expressions.
 Extended regexps are those that egrep accepts; they can be clearer because
 they usually have less backslashes, but are a GNU extension and hence
 scripts that use them are not portable. See Extended regular expressions.

 So the fix is, presumably to add \ before () in the configure script at
 {{{
 sed -r 's/(^| )([^ ])/\1-optl\2/g'
 }}}

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/9465>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list