pietern/hiredis-node — Issue #7: npm linking error
Author: sant0sk1
Created: 2011-12-03 16:20:00+00:00
State: open

My setup:

```
Mac OS 10.7.2
node 0.6.4 (view homebrew)
node-waf 1.5.16
npm 1.0.106
```

When trying to install `hiredis` via npm, it fails during linking:

```
setting srcdir to : /Users/jerod/src/node/hntrends/node_modules/hiredis
Setting blddir to : /Users/jerod/src/node/hntrends/node_modules/hiredis/build
Checking for program gcc or cc : /usr/bin/gcc
Checking for program cpp : /usr/bin/cpp
Checking for program ar : /usr/bin/ar
Checking for program ranlib : /usr/bin/ranlib
Checking for gcc : ok
Checking for program g++ or c++ : /usr/bin/g++
Checking for g++ : ok
Checking for node path : ok /usr/local/lib/node_modules
Checking for node prefix : ok /usr/local/Cellar/node/0.6.4
'configure' finished successfully (0.061s)
Waf: Entering directory `/Users/jerod/src/node/hntrends/node_modules/hiredis/build'
[1/7] cc: deps/hiredis/sds.c -> build/Release/deps/hiredis/sds_1.o
[2/7] cc: deps/hiredis/net.c -> build/Release/deps/hiredis/net_1.o
[3/7] cc: deps/hiredis/hiredis.c -> build/Release/deps/hiredis/hiredis_1.o
[4/7] static_link: build/Release/deps/hiredis/sds_1.o build/Release/deps/hiredis/net_1.o build/Release/deps/hiredis/hiredis_1.o -> build/Release/libhiredis.a
[5/7] cxx: hiredis.cc -> build/Release/hiredis_2.o
[6/7] cxx: reader.cc -> build/Release/reader_2.o
[7/7] cxx_link: build/Release/hiredis_2.o build/Release/reader_2.o -> build/Release/hiredis.node
ld: warning: directory not found for option '-Ldefault'
ld: library not found for -lhiredis
collect2: ld returned 1 exit status
Waf: Leaving directory `/Users/jerod/src/node/hntrends/node_modules/hiredis/build'
Build failed: -> task failed (err #1):
{task: cxx_link hiredis_2.o,reader_2.o -> hiredis.node}
npm ERR! error installing hiredis@0.1.10 Error: hiredis@0.1.10 preinstall: `node-waf configure build`
npm ERR! error installing hiredis@0.1.10 `sh "-c" "node-waf configure build"` failed with 1
npm ERR! error installing hiredis@0.1.10 at ChildProcess. (/usr/local/lib/node_modules/npm/lib/utils/exec.js:49:20)
npm ERR! error installing hiredis@0.1.10 at ChildProcess.emit (events.js:70:17)
npm ERR! error installing hiredis@0.1.10 at maybeExit (child_process.js:359:16)
npm ERR! error installing hiredis@0.1.10 at Process.onexit (child_process.js:395:5)
npm ERR! hiredis@0.1.10 preinstall: `node-waf configure build`
npm ERR! `sh "-c" "node-waf configure build"` failed with 1
npm ERR!
npm ERR! Failed at the hiredis@0.1.10 preinstall script.
npm ERR! This is most likely a problem with the hiredis package,
npm ERR! not with npm itself.
```

Any help would be much appreciated.