Coder Social home page Coder Social logo

kyotocabinet-node's Issues

failed to build on node 4.1.1

Getting the following error while building it on node 4.1.1 version.
Thanks.

CXX(target) Release/obj.target/kyotonode/src/main.o
In file included from ../src/main.cc:1:0:
../node_modules/nan/nan.h:324:27: error: redefinition of ‘template v8::Local Nan::imp::NanEnsureHandleOrPersistent(const v8::Local&)’
NAN_INLINE v8::Local NanEnsureHandleOrPersistent(const v8::Local &val) {
^
../node_modules/nan/nan.h:319:17: error: ‘template v8::Handle Nan::imp::NanEnsureHandleOrPersistent(v8::Handle&)’ previously declared here
v8::Handle NanEnsureHandleOrPersistent(const v8::Handle &val) {
^
../node_modules/nan/nan.h:344:27: error: redefinition of ‘template v8::Local Nan::imp::NanEnsureLocal(v8::Handle&)’
NAN_INLINE v8::Local NanEnsureLocal(const v8::Handle &val) {
^
../node_modules/nan/nan.h:334:27: error: ‘template v8::Local Nan::imp::NanEnsureLocal(const v8::Local&)’ previously declared here
NAN_INLINE v8::Local NanEnsureLocal(const v8::Local &val) {
^
../node_modules/nan/nan.h:757:13: error: ‘node::smalloc’ has not been declared
, node::smalloc::FreeCallback callback
^
../node_modules/nan/nan.h:757:35: error: expected ‘,’ or ‘...’ before ‘callback’
, node::smalloc::FreeCallback callback
^
../node_modules/nan/nan.h: In function ‘v8::Localv8::Object NanNewBufferHandle(char_, size_t, int)’:
../node_modules/nan/nan.h:761:50: error: ‘callback’ was not declared in this scope
v8::Isolate::GetCurrent(), data, length, callback, hint);
^
../node_modules/nan/nan.h:761:60: error: ‘hint’ was not declared in this scope
v8::Isolate::GetCurrent(), data, length, callback, hint);
^
../node_modules/nan/nan.h: In function ‘v8::Localv8::Object NanNewBufferHandle(const char_, uint32_t)’:
../node_modules/nan/nan.h:768:67: error: call of overloaded ‘New(v8::Isolate_, const char_&, uint32_t&)’ is ambiguous
return node::Buffer::New(v8::Isolate::GetCurrent(), data, size);
^
../node_modules/nan/nan.h:768:67: note: candidates are:
In file included from ../node_modules/nan/nan.h:25:0,
from ../src/main.cc:1:
/home/shopping/.node-gyp/4.1.1/include/node/node_buffer.h:31:40: note: v8::MaybeLocalv8::Object node::Buffer::New(v8::Isolate_, v8::Localv8::String, node::encoding)
NODE_EXTERN v8::MaybeLocalv8::Object New(v8::Isolate_ isolate,
^
/home/shopping/.node-gyp/4.1.1/include/node/node_buffer.h:31:40: note: no known conversion for argument 3 from ‘uint32_t {aka unsigned int}’ to ‘node::encoding’
/home/shopping/.node-gyp/4.1.1/include/node/node_buffer.h:43:40: note: v8::MaybeLocalv8::Object node::Buffer::New(v8::Isolate_, char_, size_t)
NODE_EXTERN v8::MaybeLocalv8::Object New(v8::Isolate* isolate,
^
/home/shopping/.node-gyp/4.1.1/include/node/node_buffer.h:43:40: note: no known conversion for argument 2 from ‘const char_’ to ‘char_’
In file included from ../src/main.cc:1:0:
../node_modules/nan/nan.h: In function ‘v8::Localv8::Object NanNewBufferHandle(uint32_t)’:
../node_modules/nan/nan.h:772:61: error: could not convert ‘node::Buffer::New(v8::Isolate::GetCurrent(), ((size_t)size))’ from ‘v8::MaybeLocalv8::Object’ to ‘v8::Localv8::Object’
return node::Buffer::New(v8::Isolate::GetCurrent(), size);
^
../node_modules/nan/nan.h: In function ‘v8::Localv8::Object NanBufferUse(char_, uint32_t)’:
../node_modules/nan/nan.h:779:12: error: ‘Use’ is not a member of ‘node::Buffer’
return node::Buffer::Use(v8::Isolate::GetCurrent(), data, size);
^
make: *_* [Release/obj.target/kyotonode/src/main.o] Error 1

symbol lookup error with Ubuntu 16.04 and gcc 5.3.1

The module builds without any error but running it gives symbol lookup error:
/usr/bin/nodejs: symbol lookup error: node_modules/kyotocabinet/build/Release/kyotonode.node: undefined symbol: _ZN12kyotocabinet4File4open
ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEjl

OS: Ubuntu 16.04 Server Edition
$ uname -a
Linux ubuntu-large 4.4.0-22-generic #39-Ubuntu SMP Thu May 5 16:53:32 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/5/lto-wrapper
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 5.3.1-14ubuntu2' --with-bugurl=file:///usr/share/doc/gcc-5/README.Bugs --enable-languages=c,ada,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-5 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-libmpx --enable-plugin --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-5-amd64/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-5-amd64 --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-5-amd64 --with-arch-directory=amd64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-objc-gc --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 5.3.1 20160413 (Ubuntu 5.3.1-14ubuntu2)

build fails on node v0.12.7 and node-gyp v2.0.1

It was building successfully on v0.12.5. After upgrading to v0.12.7, it failed.

here is the build output:

shopping@f3:~/test$ npm install git+ssh://[email protected]:anton-kotenko/kyotocabinet-node.git

[email protected] install /home/shopping/test/node_modules/kyotocabinet
node-gyp rebuild

make: Entering directory `/home/shopping/test/node_modules/kyotocabinet/build'
CXX(target) Release/obj.target/kyotonode/src/main.o
In file included from ../src/cursor.h:54:0,
from ../src/export_to_v8.h:10,
from ../src/poly_db.h:5,
from ../src/main.cc:3:
../src/cursor.cc: In static member function ‘static Nan::NAN_METHOD_RETURN_TYPE ExportCursor::JsConstructor(Nan::NAN_METHOD_ARGS_TYPE)’:
../src/cursor.cc:17:12: error: ‘NanScope’ was not declared in this scope
NanScope();
^
../src/cursor.cc:19:18: error: ‘args’ was not declared in this scope
instance->Wrap(args.This());
^
../src/cursor.cc:20:17: error: ‘NanReturnThis’ was not declared in this scope
NanReturnThis();
^
../src/cursor.cc: In static member function ‘static v8::Handlev8::Function ExportCursor::Init()’:
../src/cursor.cc:24:43: error: ‘NanNew’ was not declared in this scope
v8::Localv8::FunctionTemplate f_tpl = NanNewv8::FunctionTemplate(ExportCursor::JsConstructor);
^
../src/cursor.cc:24:70: error: expected primary-expression before ‘>’ token
v8::Localv8::FunctionTemplate f_tpl = NanNewv8::FunctionTemplate(ExportCursor::JsConstructor);
^
../src/cursor.cc:25:40: error: expected primary-expression before ‘>’ token
f_tpl->SetClassName(NanNewv8::String("Cursor"));
^
../src/cursor.cc:27:60: error: invalid conversion from ‘Nan::NAN_METHOD_RETURN_TYPE ()(Nan::NAN_METHOD_ARGS_TYPE) {aka void ()(const Nan::FunctionCallbackInfov8::Value&)}’ to ‘v8::FunctionCallback {aka void ()(const v8::FunctionCallbackInfov8::Value&)}’ [-fpermissive]
NODE_SET_PROTOTYPE_METHOD(f_tpl, "set", ExportCursor::Set);
^
In file included from ../node_modules/nan/nan.h:24:0,
from ../src/main.cc:1:
/home/shopping/.node-gyp/0.12.7/src/node.h:244:13: error: initializing argument 3 of ‘void node::NODE_SET_PROTOTYPE_METHOD(v8::Handlev8::FunctionTemplate, const char
, v8::FunctionCallback)’ [-fpermissive]
inline void NODE_SET_PROTOTYPE_METHOD(v8::Handlev8::FunctionTemplate recv,
^
In file included from ../src/cursor.h:54:0,
from ../src/export_to_v8.h:10,
from ../src/poly_db.h:5,
from ../src/main.cc:3:
../src/cursor.cc:28:66: error: invalid conversion from ‘Nan::NAN_METHOD_RETURN_TYPE ()(Nan::NAN_METHOD_ARGS_TYPE) {aka void ()(const Nan::FunctionCallbackInfov8::Value&)}’ to ‘v8::FunctionCallback {aka void (*)(const v8::FunctionCallbackInfov8::Value&)}’ [-fpermissive]
NODE_SET_PROTOTYPE_METHOD(f_tpl, "remove", ExportCursor::Remove);
^
......

Thanks.

close all opened databases on exit

close all opened databases on exit, uncaught exception, SIGXXX, and any other program shutdown to avoid
time and hdd space consuming recovery process on next startup

Not building with node v6.9.1

Getting the following errors:

../node_modules/nan/nan.h:602:20: error: variable or field ‘AddGCEpilogueCallback’ declared void
v8::Isolate::GCEpilogueCallback callback
^
../node_modules/nan/nan.h:602:7: error: ‘GCEpilogueCallback’ is not a member of ‘v8::Isolate’
v8::Isolate::GCEpilogueCallback callback
^
../node_modules/nan/nan.h:603:18: error: expected primary-expression before ‘gc_type_filter’
, v8::GCType gc_type_filter = v8::kGCTypeAll) {
^
../node_modules/nan/nan.h:608:20: error: variable or field ‘RemoveGCEpilogueCallback’ declared void
v8::Isolate::GCEpilogueCallback callback) {
^
../node_modules/nan/nan.h:608:7: error: ‘GCEpilogueCallback’ is not a member of ‘v8::Isolate’
v8::Isolate::GCEpilogueCallback callback) {
^
../node_modules/nan/nan.h:613:20: error: variable or field ‘AddGCPrologueCallback’ declared void
v8::Isolate::GCPrologueCallback callback
^
../node_modules/nan/nan.h:613:7: error: ‘GCPrologueCallback’ is not a member of ‘v8::Isolate’
v8::Isolate::GCPrologueCallback callback
^
../node_modules/nan/nan.h:614:18: error: expected primary-expression before ‘gc_type_filter’
, v8::GCType gc_type_filter = v8::kGCTypeAll) {
^
../node_modules/nan/nan.h:619:20: error: variable or field ‘RemoveGCPrologueCallback’ declared void
v8::Isolate::GCPrologueCallback callback) {
^
../node_modules/nan/nan.h:619:7: error: ‘GCPrologueCallback’ is not a member of ‘v8::Isolate’
v8::Isolate::GCPrologueCallback callback) {
^

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.