[LLVMdev] Configure fails if GREP_OPTIONS contains --color

Kyle Sluder kyle at ksluder.com
Wed Feb 26 13:43:37 PST 2014


The configure scripts choke if the GREP_OPTIONS environment variable
contains the "--color" flag. On the initial configure, it happens
reasonably quickly and with a reason that's at least related to grep, if
misleading:

    checking for grep that handles long lines and -e... configure:
    error: no acceptable grep could be found in […snip…]

But if `make` happens to need to reconfigure a project (as happened to
me recently), it just silently fails:

    llvm[2]: Reconfiguring with
    /Users/Shared/objc-namespaces/llvm/ObjRoot/projects/sample/../../../projects/sample/configure
    make[2]: ***
    [/Users/Shared/objc-namespaces/llvm/ObjRoot/projects/sample/config.status]
    Error 1
    make[1]: *** [all] Error 1
    make: *** [all] Error 1

If the build system actually relies on parsing the output of grep, it
really ought to reset the environment. My GREP_OPTIONS always includes
"--color --line-number", and now I'm worried that this will break
something.

--Kyle Sluder




More information about the llvm-dev mailing list