Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Problem rebuilding with the bundled node-gyp in v2.0.0 #1619

Copy link
Copy link
@laukaichung

Description

@laukaichung
Issue body actions

Hi, I just downloaded v2.0.0 to test on my server. In v1.8.1, I could solve the error Failed to load c++ bson extension, using pure JS version from mongoose 3.8 using the bundled node-gyp from io.js:

1.cd /iojs-v1.8.1-linux-x64/lib/node_modules/npm/node_modules/node-gyp
2.npm link -f
3.cd /app/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/node_modules/bson/
4.node-gyp rebuild

But I can't rebuild js-bson in v2.0.0. It gives me a lot of error like wrong number of arguments specified for 'deprecated' attribute:

gyp info it worked if it ends with ok
gyp info using node-gyp@1.0.3
gyp info using node@2.0.0 | linux | x64
gyp info spawn python
gyp info spawn args [ '/2/iojs-v2.0.0-linux-x64/lib/node_modules/npm/node_module                                             s/node-gyp/gyp/gyp_main.py',
gyp info spawn args   'binding.gyp',
gyp info spawn args   '-f',
gyp info spawn args   'make',
gyp info spawn args   '-I',
gyp info spawn args   '/usr/local/apps/js/node_modules/mongoose/node_modules/mon                                             godb/node_modules/bson/build/config.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/2/iojs-v2.0.0-linux-x64/lib/node_modules/npm/node_module                                             s/node-gyp/addon.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/root/.node-gyp/2.0.0/common.gypi',
gyp info spawn args   '-Dlibrary=shared_library',
gyp info spawn args   '-Dvisibility=default',
gyp info spawn args   '-Dnode_root_dir=/root/.node-gyp/2.0.0',
gyp info spawn args   '-Dmodule_root_dir=/usr/local/apps/js/node_modules/mongoos                                             e/node_modules/mongodb/node_modules/bson',
gyp info spawn args   '--depth=.',
gyp info spawn args   '--no-parallel',
gyp info spawn args   '--generator-output',
gyp info spawn args   'build',
gyp info spawn args   '-Goutput_dir=.' ]
gyp info spawn make
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
make: Entering directory `/usr/local/apps/js/node_modules/mongoose/node_modules/                                             mongodb/node_modules/bson/build'
  CXX(target) Release/obj.target/bson/ext/bson.o
In file included from ../ext/bson.cc:22:
/root/.node-gyp/2.0.0/src/node.h:80: error: wrong number of arguments specified                                              for 'deprecated' attribute
In file included from ../ext/bson.cc:22:
/root/.node-gyp/2.0.0/src/node.h:252: error: wrong number of arguments specified                                              for 'deprecated' attribute
/root/.node-gyp/2.0.0/src/node.h:262: error: wrong number of arguments specified                                              for 'deprecated' attribute
/root/.node-gyp/2.0.0/src/node.h:278: error: wrong number of arguments specified                                              for 'deprecated' attribute
/root/.node-gyp/2.0.0/src/node.h:297: error: wrong number of arguments specified                                              for 'deprecated' attribute
/root/.node-gyp/2.0.0/src/node.h:310: error: wrong number of arguments specified                                              for 'deprecated' attribute
In file included from /root/.node-gyp/2.0.0/src/node_buffer.h:5,
                 from ../ext/bson.cc:24:
/root/.node-gyp/2.0.0/src/smalloc.h:29: error: wrong number of arguments specifi                                             ed for 'deprecated' attribute
/root/.node-gyp/2.0.0/src/smalloc.h:60: error: wrong number of arguments specifi                                             ed for 'deprecated' attribute
/root/.node-gyp/2.0.0/src/smalloc.h:67: error: wrong number of arguments specifi                                             ed for 'deprecated' attribute
/root/.node-gyp/2.0.0/src/smalloc.h:75: error: wrong number of arguments specifi                                             ed for 'deprecated' attribute
/root/.node-gyp/2.0.0/src/smalloc.h:84: error: wrong number of arguments specifi                                             ed for 'deprecated' attribute
/root/.node-gyp/2.0.0/src/smalloc.h:99: error: wrong number of arguments specifi                                             ed for 'deprecated' attribute
/root/.node-gyp/2.0.0/src/smalloc.h:108: error: wrong number of arguments specif                                             ied for 'deprecated' attribute
In file included from ../ext/bson.cc:24:
/root/.node-gyp/2.0.0/src/node_buffer.h:26: error: wrong number of arguments spe                                             cified for 'deprecated' attribute
/root/.node-gyp/2.0.0/src/node_buffer.h:34: error: wrong number of arguments spe                                             cified for 'deprecated' attribute
/root/.node-gyp/2.0.0/src/node_buffer.h:44: error: wrong number of arguments spe                                             cified for 'deprecated' attribute
/root/.node-gyp/2.0.0/src/node_buffer.h:54: error: wrong number of arguments spe                                             cified for 'deprecated' attribute
/root/.node-gyp/2.0.0/src/node_buffer.h:67: error: wrong number of arguments spe                                             cified for 'deprecated' attribute
In file included from ../node_modules/nan/nan_new.h:190,
                 from ../node_modules/nan/nan.h:80,
                 from ../ext/bson.h:17,
                 from ../ext/bson.cc:36:
../node_modules/nan/nan_implementation_12_inl.h: In static member function 'stat                                             ic v8::Local<v8::Signature> NanIntern::Factory<v8::Signature>::New(NanIntern::Fa                                             ctory<v8::Signature>::FTH, int, NanIntern::Factory<v8::Signature>::FTH*)':
../node_modules/nan/nan_implementation_12_inl.h:181: error: no matching function                                              for call to 'v8::Signature::New(v8::Isolate*, NanIntern::Factory<v8::Signature>                                             ::FTH&, int&, NanIntern::Factory<v8::Signature>::FTH*&)'
/root/.node-gyp/2.0.0/deps/v8/include/v8.h:4188: note: candidates are: static v8                                             ::Local<v8::Signature> v8::Signature::New(v8::Isolate*, v8::Handle<v8::FunctionT                                             emplate>)
make: *** [Release/obj.target/bson/ext/bson.o] Error 1
make: Leaving directory `/usr/local/apps/js/node_modules/mongoose/node_modules/m                                             ongodb/node_modules/bson/build'
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/2/iojs-v2.0.0-linux-x64/lib/node_mod                                             ules/npm/node_modules/node-gyp/lib/build.js:269:23)
gyp ERR! stack     at emitTwo (events.js:87:13)
gyp ERR! stack     at ChildProcess.emit (events.js:169:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:1009                                             :12)
gyp ERR! System Linux 2.6.32-042stab106.6
gyp ERR! command "/usr/bin/node" "/usr/bin/node-gyp" "rebuild"
gyp ERR! cwd /usr/local/apps/js/node_modules/mongoose/node_modules/mongodb/node_                                             modules/bson
gyp ERR! node -v v2.0.0
gyp ERR! node-gyp -v v1.0.3
gyp ERR! not ok

I have also tried upgrading mongoose to version 4 but the errors don't go away.

Metadata

Metadata

Assignees

No one assigned

    Labels

    c++Issues and PRs that require attention from people who are familiar with C++.Issues and PRs that require attention from people who are familiar with C++.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.