Include CityHash in this package
Any reason not to?
If include the src of CityHash, I have to make sure the src is synchronized with upstream.
Do you have any idea on that?
Yes, that's true.
But it's really, really nice to be able to add cityhash to a project's dependencies and not have to tell people "Ok, first install these developer tools[1] and then download this thing from Google and compile it and sudo make install it"
So it seems worthwhile. And CityHash should be fairly stable, right?
[1] NPM plans to support pre-compiled packages in the future!
should be fixed in latest version, install it from npm: npm install cityhash
Well, I just tried it on my system (ubuntu 12.04) and it failed:
$ npm install --save cityhash
npm http GET https://registry.npmjs.org/cityhash
npm http 200 https://registry.npmjs.org/cityhash
npm http GET https://registry.npmjs.org/cityhash/-/cityhash-0.0.3.tgz
npm http 200 https://registry.npmjs.org/cityhash/-/cityhash-0.0.3.tgz
> [email protected] install /home/efoster/work/xam/node_modules/cityhash
> node-gyp rebuild
make: Entering directory `/home/efoster/work/xam/node_modules/cityhash/build'
CXX(target) Release/obj.target/libcityhash/cityhash/city.o
../cityhash/city.cc:30:18: fatal error: city.h: No such file or directory
compilation terminated.
make: *** [Release/obj.target/libcityhash/cityhash/city.o] Error 1
make: Leaving directory `/home/efoster/work/xam/node_modules/cityhash/build'
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/share/npm/node_modules/node-gyp/lib/build.js:255:23)
gyp ERR! stack at ChildProcess.EventEmitter.emit (events.js:99:17)
gyp ERR! stack at Process._handle.onexit (child_process.js:678:10)
gyp ERR! System Linux 3.5.0-23-generic
gyp ERR! command "node" "/usr/share/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/efoster/work/xam/node_modules/cityhash
gyp ERR! node -v v0.8.18
gyp ERR! node-gyp -v v0.8.2
gyp ERR! not ok
npm ERR! [email protected] install: `node-gyp rebuild`
npm ERR! `sh "-c" "node-gyp rebuild"` failed with 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is most likely a problem with the cityhash package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild
npm ERR! You can get their info via:
npm ERR! npm owner ls cityhash
npm ERR! There is likely additional logging output above.
npm ERR! System Linux 3.5.0-23-generic
npm ERR! command "nodejs" "/usr/bin/npm" "install" "--save" "cityhash"
npm ERR! cwd /home/efoster/work/xam
npm ERR! node -v v0.8.18
npm ERR! npm -v 1.2.2
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /home/efoster/work/xam/npm-debug.log
npm ERR! not ok code 0
Sorry for response this so long, I just found this error occurs in some platform, should be fixed in 0.0.4.