node-cityhash
node-cityhash copied to clipboard
How to "make"? Getting error on require()
After building cityhash, I cannot get node-cityhash to require() after "make".
$ make
node-waf configure build
Checking for program g++ or c++ : /usr/bin/g++
Checking for program cpp : /usr/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 node path : not found
Checking for node prefix : ok /usr
Checking for library cityhash : yes
'configure' finished successfully (0.157s)
Waf: Entering directory /var/lapjesgrabber/node_modules/node-cityhash/build' [1/2] cxx: binding.cc -> build/Release/binding_1.o ../binding.cc: In function ‘v8::Local<v8::String> stringify_hash(const uint64&)’: ../binding.cc:122:48: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 4 has type ‘uint64 {aka long unsigned int}’ [-Wformat] ../binding.cc:122:48: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 4 has type ‘uint64 {aka long unsigned int}’ [-Wformat] ../binding.cc: In function ‘v8::Local<v8::String> stringify_hash(const uint128&)’: ../binding.cc:132:89: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 4 has type ‘uint64 {aka long unsigned int}’ [-Wformat] ../binding.cc:132:89: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 5 has type ‘uint64 {aka long unsigned int}’ [-Wformat] ../binding.cc:132:89: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 4 has type ‘uint64 {aka long unsigned int}’ [-Wformat] ../binding.cc:132:89: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 5 has type ‘uint64 {aka long unsigned int}’ [-Wformat] [2/2] cxx_link: build/Release/binding_1.o -> build/Release/cityhash.node Waf: Leaving directory
/var/lapjesgrabber/node_modules/node-cityhash/build'
'build' finished successfully (0.490s)
node test.js
node.js:201
throw e; // process.nextTick error, or 'error' event on first tick
^
Error: Unable to load shared library /var/lapjesgrabber/node_modules/node-cityhash/build/Release/cityhash.node
at Object..node (module.js:472:11)
at Module.load (module.js:348:32)
at Function._load (module.js:308:12)
at Module.require (module.js:354:17)
at require (module.js:370:17)
at Object.
make: *** [test] Error 1
first, "build/Release/" was "build/default/": Error: Unable to load shared library /var/lapjesgrabber/node_modules/node-cityhash/build/default/cityhash.node But there is no default so I changed it.. no avail either.
Did I miss some steps in the documentation?
this should be fixed in latest version, install it from npm: npm install cityhash
Thanks. Moved back to its parent murmurhash3 though, it has always worked and I had to move on with the project.
I am curious about benchmarks though. Is cityhash worth the trouble of builds that might cause trouble on target servers? OTOH when thinking of upgrading hashing functions in projects, I have heard some talk about problems in mmh and cityhash with suggestions to try SipHash instead: https://131002.net/siphash/
https://github.com/jedisct1/siphash-js