mxcl/homebrew — Issue #8165: mpack fails to install when $CLICOLOR_FORCE is set
Author: fjarlq
Created: 2011-10-18 04:52:09+00:00
State: open

"brew install mpack" failed on my OS X 10.7.2 (see log below). When I saw the complaint about "ls" failing, I figured it was because I had recently enabled colorized ls. Sure enough, unsetenv CLICOLOR_FORCE fixed the problem.

I setenv CLICOLOR_FORCE because I want my ls output to remain colorized when I pipe it into "less". There is no other way (no command option) to force piped ls output to be colorized using OS X ls -- I have to setenv CLICOLOR_FORCE.

The manual for GNU Autoconf states:
"CLICOLOR_FORCE: When this variable is set, some implementations of tools like ls attempt to add color to their output via terminal escape sequences, even when the output is not directed to a terminal, and can thus cause spurious failures in scripts. Configure scripts use M4sh, which automatically unsets this variable."
-- http://www.gnu.org/s/hello/manual/autoconf/Special-Shell-Variables.html

So I think brew should also automatically unsetenv CLICOLOR_FORCE to ensure this isn't a problem.

Thanks!

> brew install mpack
==> Downloading http://ftp.andrew.cmu.edu/pub/mpack/mpack-1.6.tar.gz
######################################################################## 100.0%
==> ./configure --prefix=/usr/local/Cellar/mpack/1.6 --mandir=/usr/local/Cellar/mpack/1.6/share/man
creating cache ./config.cache
checking for a BSD compatible install... /usr/bin/install -c
checking whether build environment is sane... configure: error: ls -t appears to fail. Make sure there is not a broken
alias in your environment
configure: error: newly created file is older than distributed files!
Check your system clock
==> Exit Status: 1
http://github.com/mxcl/homebrew/blob/master/Library/Formula/mpack.rb#L9
==> Environment
HOMEBREW_VERSION: 0.8
HEAD: 3d1a6ef3e896d456b2885bb6456d0114c02aab6f
HOMEBREW_PREFIX: /usr/local
HOMEBREW_CELLAR: /usr/local/Cellar
HOMEBREW_REPOSITORY: /usr/local
HOMEBREW_LIBRARY_PATH: /usr/local/Library/Homebrew
Hardware: 8-core 64-bit penryn
OS X: 10.7.2
Kernel Architecture: x86_64
Ruby: 1.8.7-249
/usr/bin/ruby => /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby
Xcode: 4.1
GCC-4.0: N/A
GCC-4.2: build 5666
LLVM: build 2335
MacPorts or Fink? false
X11 installed? true
==> Build Flags
CC: /usr/bin/llvm-gcc => /usr/llvm-gcc-4.2/bin/llvm-gcc-4.2
CXX: /usr/bin/llvm-g++ => /usr/llvm-gcc-4.2/bin/llvm-g++-4.2
LD: /usr/bin/llvm-gcc => /usr/llvm-gcc-4.2/bin/llvm-gcc-4.2
CFLAGS: -O3 -march=core2 -msse4.1 -w -pipe
CXXFLAGS: -O3 -march=core2 -msse4.1 -w -pipe
MAKEFLAGS: -j8

Error: Failed executing: ./configure --prefix=/usr/local/Cellar/mpack/1.6 --mandir=/usr/local/Cellar/mpack/1.6/share/man
If `brew doctor' does not help diagnose the issue, please report the bug:
https://github.com/mxcl/homebrew/wiki/checklist-before-filing-a-new-issue
We saved the configure log, please gist it if you report the issue:
~/Library/Logs/Homebrew/config.log