
#9465: configure: sed: illegal option -- r -------------------------------------+------------------------------------- Reporter: jrp | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Build | Version: 7.8.3 System | Keywords: sed Resolution: | Architecture: Unknown/Multiple Operating System: | Difficulty: Easy (less than 1 Unknown/Multiple | hour) Type of failure: Building | Blocked By: GHC failed | Related Tickets: Test Case: | Blocking: | Differential Revisions: | -------------------------------------+------------------------------------- Description changed by jrp: Old description:
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' }}}
New description: 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 remove the -r and add \ before () in the configure script at {{{ sed -r 's/(^| )([^ ])/\1-optl\2/g' }}} -- -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9465#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler