mxcl/homebrew — Issue #8967: Trying to install node_0.4.9. Should this work?
Author: zencuke
Created: 2011-12-04 17:03:31+00:00
State: open

I'm trying to install an npm package which only works with node 4.9. The bad news is I have a current version of Lion with a current version of xCode which has given me oodles of problems because of the compiler changes. I know node 4.9 installs from the source tarball on my machine because I did it once and it is the version of node in my path (./configure;make;sudo make install was all I did) but I wanted to do it with brew so it is in the dependency tree for other things I want to install. Why does node_0.4.9 manually install from the command line but brew can't install it? The tarball I used is identical to the one in ~/LibraryCache/HomeBrew (according to cmp.) At the end of this report is the log of my successful ./configure of my manually downloaded version. The successive make and make install also worked.

I'm confused. I can install it manually. Why can't brew install it from what looks like an identical tarball? Is it using ./configure options it is not reporting in the log?

papas-macintosh:local steven$ brew uninstall node

papas-macintosh:local steven$ git checkout -b node-0.4.9 10b3ded2eaeadc7f128ad2be75ac489b716432e4
Switched to a new branch 'node-0.4.9'

papas-macintosh:local steven$ brew install node
==> Downloading http://nodejs.org/dist/node-v0.4.9.tar.gz
File already downloaded in /Users/steven/Library/Caches/Homebrew
==> ./configure --prefix=/usr/local/Cellar/node/0.4.9
Checking for program g++ or c++ : /usr/bin/g++-4.2
/private/tmp/homebrew-node-0.4.9-3pIu/node-v0.4.9/wscript:232: error: could not configure a cxx compiler!
==> Exit Status: 1
http://github.com/mxcl/homebrew/blob/master/Library/Formula/node.rb#L30
==> Environment
/usr/bin/gcc
HOMEBREW_VERSION: 0.8
HEAD: 10b3ded2eaeadc7f128ad2be75ac489b716432e4
HOMEBREW_PREFIX: /usr/local
HOMEBREW_CELLAR: /usr/local/Cellar
HOMEBREW_REPOSITORY: /usr/local
HOMEBREW_LIBRARY_PATH: /usr/local/Library/Homebrew
Hardware: quad-core 64-bit dunno
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: build 401 (5664 or newer recommended)
LLVM: build 2336
MacPorts or Fink? false
X11 installed? true
==> Build Flags
CC: /usr/bin/gcc-4.2
CXX: /usr/bin/g++-4.2
LD: /usr/bin/gcc-4.2
CFLAGS: -w -pipe -O3
CXXFLAGS: -w -pipe -O3
MAKEFLAGS: -j4

Error: Failed executing: ./configure --prefix=/usr/local/Cellar/node/0.4.9
Please report this bug: https://github.com/mxcl/homebrew/wiki/Checklist-before-filing-a-new-issue
These existing issues may help you:
https://github.com/mxcl/homebrew/issues/#issue/6970
https://github.com/mxcl/homebrew/issues/#issue/8466
https://github.com/mxcl/homebrew/issues/#issue/8951
https://github.com/mxcl/homebrew/issues/#issue/8958
https://github.com/mxcl/homebrew/issues/#issue/8960
https://github.com/mxcl/homebrew/issues/#issue/8963
It looks like an autotools configure failed.
Consider re-running the install with '-vd' to keep 'config.log' around:
brew install -vd node
Gist 'config.log' and any error output when reporting an issue.
Remember to include your config information: brew --config

Also try:
`brew doctor` to check your setup for common problems.
`brew missing` to check installed packages for missing deps.
papas-macintosh:local steven$
papas-macintosh:node-v0.4.9 steven$ brew doctor
/usr/bin/gcc
/usr/bin/gcc
Your gcc 4.2.x version is older than the recommended version. It may be advisable
to upgrade to the latest release of Xcode.

We couldn't detect gcc 4.0.x. Some formulae require this compiler.

---------- manual node configure ------------------------------
papas-macintosh:node-v0.4.9 steven$ cd node-v0.4.9

papas-macintosh:node-v0.4.9 steven$ ./configure --prefix=/usr/local/Cellar/node/0.4.9
Checking for program g++ or c++ : /usr/bin/g++
Checking for program cpp : /usr/local/bin/cpp
Checking for program ar : /usr/bin/ar
Checking for program ranlib : /usr/bin/ranlib
Checking for g++ : ok
Checking for program gcc or cc : /usr/bin/gcc
Checking for gcc : ok
Checking for library dl : yes
Checking for openssl : yes
Checking for library util : yes
Checking for library rt : not found
--- libeio ---
Checking for library pthread : yes
Checking for function pthread_create : yes
Checking for function pthread_atfork : yes
Checking for futimes(2) : yes
Checking for readahead(2) : no
Checking for fdatasync(2) : yes
Checking for pread(2) and pwrite(2) : yes
Checking for sendfile(2) : yes
Checking for sync_file_range(2) : no
--- libev ---
Checking for header sys/inotify.h : not found
Checking for header sys/epoll.h : not found
Checking for header port.h : not found
Checking for header poll.h : yes
Checking for function poll : yes
Checking for header sys/event.h : yes
Checking for header sys/queue.h : yes
Checking for function kqueue : yes
Checking for header sys/select.h : yes
Checking for function select : yes
Checking for header sys/eventfd.h : not found
Checking for SYS_clock_gettime : no
Checking for library rt : not found
Checking for function nanosleep : yes
Checking for function ceil : yes
Checking for fdatasync(2) with c++ : no
'configure' finished successfully (1.234s)
papas-macintosh:node-v0.4.9 steven$