xdenser / node-firebird-libfbclient

Firebird SQL binding
MIT License
82 stars 34 forks source link

Support node v12 #99

Open karak opened 4 years ago

karak commented 4 years ago

Recently, I migrated my Node.js from v8 to v12, and then got SEGMENTATION FAULT on exit owing to firebird module.

Just a line of "require" introduces this error!

const { createConnection } = require("firebird");

v10.16.3, v11.15.0, and v12.7.0 do the same.

Testing machines are Mac OS Catalina and CentOS 7.1.

karak commented 4 years ago

88 says it was fixed v0.1.4, but I confirmed it has still failed to compile in node v12.14.0 on Mac OS and CentOS 7, now. Is it relevant to the error I mentioned?

UPDATE: I found this issue can be fixed by upgrading nan. Firebird should fix its dependency, I suppose!


In file included from ../../nan/nan_new.h:189:
../../nan/nan_implementation_12_inl.h:356:37: error: too few arguments to function call, expected 2, have 1
  return v8::StringObject::New(value).As<v8::StringObject>();
         ~~~~~~~~~~~~~~~~~~~~~      ^
/Users/kato/Library/Caches/node-gyp/12.14.0/include/node/v8.h:5426:3: note: 'New' declared here
  static Local<Value> New(Isolate* isolate, Local<String> value);
  ^
In file included from ../src/fb-bindings.cc:14:
In file included from ../src/./fb-bindings-connection.h:15:
In file included from ../src/./fb-bindings.h:11:
In file included from ../../nan/nan.h:223:
In file included from ../../nan/nan_new.h:189:
../../nan/nan_implementation_12_inl.h:356:58: error: expected '(' for function-style cast or type construction
  return v8::StringObject::New(value).As<v8::StringObject>();
                                         ~~~~~~~~~~~~~~~~^
../../nan/nan_implementation_12_inl.h:356:60: error: expected expression
  return v8::StringObject::New(value).As<v8::StringObject>();
                                                           ^
In file included from ../src/fb-bindings.cc:14:
In file included from ../src/./fb-bindings-connection.h:15:
In file included from ../src/./fb-bindings.h:11:
In file included from ../../nan/nan.h:2722:
../../nan/nan_object_wrap.h:24:25: error: no member named 'IsNearDeath' in 'Nan::Persistent<v8::Object, v8::NonCopyablePersistentTraits<v8::Object> >'
    assert(persistent().IsNearDeath());
           ~~~~~~~~~~~~ ^