Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to install crosstool-ng on OSX 10.6.8. At the configure stage, I run ./configure --prefix=/opt/cross, and I get the following output:

! ./configure --prefix=/opt/cross
checking build system type... x86_64-apple-darwin10.8.0
checking host system type... x86_64-apple-darwin10.8.0
checking for a BSD-compatible install... /opt/local/bin/ginstall -c
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for a sed that does not truncate output... /usr/bin/sed
checking whether sed understands -r -i -e... no
configure: error: 

It appears that sed should accept -r as an argument, but doesn't. Looking up sed here also suggests that -r is a valid argument, but when I run man sed I don't think my version allows for this:

SED(1)                    BSD General Commands Manual                   SED(1)

     sed -- stream editor

     sed [-Ealn] command [file ...]
     sed [-Ealn] [-e command] [-f command_file] [-i extension] [file ...]

Does my system contain an incorrect version of sed? What can I do to make my sed compatible with crosstool-ng?

share|improve this question

GNU sed uses -r and OSX' BSD sed uses -E to enable extended regular expressions. GNU sed also understands -E which is an undocumented feature, but BSD sed does not understand -r. So you would either need to install GNU sed first and temporary change your search path so the configure sees it first, or perhaps you could try creating a wrapper around sed so the -r gets translated to -E . Then it still might not work, because the -i option works slightly different..

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.