mxcl/homebrew — Issue #9146: Error building mercurial
Author: jacobsa
Created: 2011-12-17 07:02:37+00:00
State: open

I'm on a fresh install of OS X 10.7.2, with Xcode 4.21. `brew install hg` fails with the error below. Have I done something wrong?

```
Hausdorff: [~]$ brew install hg
==> Downloading http://mercurial.selenic.com/release/mercurial-2.0.tar.gz
File already downloaded in /Users/jacobsa/Library/Caches/Homebrew
==> make PREFIX=/Users/jacobsa/homebrew/Cellar/mercurial/2.0 build
python setup.py build
running build
running build_mo
warning: hgbuildmo: could not find msgfmt executable, no translations will be built
running build_py
creating build
creating build/lib.macosx-10.3-fat-2.4
creating build/lib.macosx-10.3-fat-2.4/mercurial
copying mercurial/__init__.py -> build/lib.macosx-10.3-fat-2.4/mercurial
[...]
copying mercurial/templates/static/style.css -> build/lib.macosx-10.3-fat-2.4/mercurial/templates/static
running build_ext
building 'mercurial.base85' extension
creating build/temp.macosx-10.3-fat-2.4
creating build/temp.macosx-10.3-fat-2.4/mercurial
/usr/bin/llvm-gcc -arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -fno-strict-aliasing -Wno-long-double -no-cpp-precomp -mno-fused-madd -fno-common -dynamic -DNDEBUG -g -O3 -Os -w -pipe -I/Library/Frameworks/Python.framework/Versions/2.4/include/python2.4 -c mercurial/base85.c -o build/temp.macosx-10.3-fat-2.4/mercurial/base85.o
llvm-gcc-4.2: error trying to exec '/usr/bin/../llvm-gcc-4.2/bin/powerpc-apple-darwin11-llvm-gcc-4.2': execvp: No such file or directory
cc1: error: unrecognized command line option "-Wno-long-double"
lipo: can't figure out the architecture type of: /var/folders/00/0mb18000h01000cxqpysvccm002jc5/T//ccOl74NH.out
error: command '/usr/bin/llvm-gcc' failed with exit status 255
make: *** [build] Error 1
==> Exit Status: 2
http://github.com/mxcl/homebrew/blob/master/Library/Formula/mercurial.rb#L32
==> Environment
HOMEBREW_VERSION: 0.8
HEAD: 13183b80333f934bd27a9f660d28cfedb5a3c946
HOMEBREW_PREFIX: /usr/local
HOMEBREW_CELLAR: /Users/jacobsa/homebrew/Cellar
HOMEBREW_REPOSITORY: /Users/jacobsa/homebrew
HOMEBREW_LIBRARY_PATH: /Users/jacobsa/homebrew/Library/Homebrew
Hardware: 8-core 64-bit sandybridge
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.2.1
GCC-4.0: N/A
GCC-4.2: N/A
LLVM: build 2336
Clang: 3.0-211.12
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: -Os -w -pipe
CXXFLAGS: -Os -w -pipe
MAKEFLAGS: -j8

Error: Failed executing: make PREFIX=/Users/jacobsa/homebrew/Cellar/mercurial/2.0 build
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
Hausdorff: [~]$
```