Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upProblem rebuilding with the bundled node-gyp in v2.0.0 #1619
Comments
mscdex
added
the
C++
label
May 5, 2015
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
|
This has been fixed in |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
bnoordhuis
May 5, 2015
Member
There seems to be a secondary issue with the NODE_DEPRECATED macro (the 'wrong number of arguments' errors).
When you run env V=1 node-gyp rebuild, the CXX(target) in the output should have been replaced with the actual compiler. Can you post the output of $actual_compiler -v? Thanks!
|
There seems to be a secondary issue with the NODE_DEPRECATED macro (the 'wrong number of arguments' errors). When you run |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
imyller
May 5, 2015
Member
@stonecold123 should report also but I'm unable to duplicate the secondary issue with NODE_DEPRECATED macro. I am getting (proper?) deprecation warnings:
../ext/bson.cc:825:17: warning: 'DecodeBytes' is deprecated: Use DecodeBytes(isolate, ...) [-Wdeprecated-declarations]
ssize_t len = DecodeBytes(args[0], BINARY);
^
/Users/-/.node-gyp/2.0.0/src/node.h:298:32: note: 'DecodeBytes' has been explicitly marked deprecated here
inline ssize_t DecodeBytes(
^
/Users/-/.node-gyp/2.0.0/src/node.h:47:42: note: expanded from macro 'NODE_DEPRECATED'
__attribute__((deprecated(message))) declarator
^
Compiler version:
Apple LLVM version 6.1.0 (clang-602.0.49) (based on LLVM 3.6.0svn)
Target: x86_64-apple-darwin14.3.0
Thread model: posix
|
@stonecold123 should report also but I'm unable to duplicate the secondary issue with NODE_DEPRECATED macro. I am getting (proper?) deprecation warnings:
Compiler version:
|
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
bnoordhuis
May 5, 2015
Member
I speculate that @stonecold123 uses a version of g++ <= 4.7 but I'd like him/her to confirm.
|
I speculate that @stonecold123 uses a version of g++ <= 4.7 but I'd like him/her to confirm. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
stonecold123
May 5, 2015
Hi imyller and bnoordhuis,
I'll make a test again later and tell you what I get. Here's my g++ version:
[root@user]g++ -v
Using built-in specs.
Target: x86_64-redhat-linux
Thread model: posix
gcc version 4.4.7 20120313 (Red Hat 4.4.7-11) (GCC)
stonecold123
commented
May 5, 2015
|
Hi imyller and bnoordhuis,
|
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
bnoordhuis
May 5, 2015
Member
Thanks. I'll dig up when gcc added the extended deprecated attribute and update src/node.h accordingly.
|
Thanks. I'll dig up when gcc added the extended |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
stonecold123
May 5, 2015
bnoordhuis
I don't know why but when I ran env V=1 node-gyp rebuild I was getting the same error. I didn't see the output you described (CentOS release 6.6 (Final)):
[root@user bson]# env V=1 node-gyp rebuild
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_modules/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/mongodb/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_modules/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/mongoose/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'
g++ '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DBUILDING_NODE_EXTENSION' -I/root/.node-gyp/2.0.0/src -I/root/.node-gyp/2.0.0/deps/uv/include -I/root/.node-gyp/2.0.0/deps/v8/include -I../node_modules/nan -fPIC -pthread -Wall -Wextra -Wno-unused-parameter -m64 -O3 -ffunction-sections -fdata-sections -fno-omit-frame-pointer -fno-rtti -std=gnu++0x -MMD -MF ./Release/.deps/Release/obj.target/bson/ext/bson.o.d.raw -c -o Release/obj.target/bson/ext/bson.o ../ext/bson.cc
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 specified for 'deprecated' attribute
/root/.node-gyp/2.0.0/src/smalloc.h:60: error: wrong number of arguments specified for 'deprecated' attribute
/root/.node-gyp/2.0.0/src/smalloc.h:67: error: wrong number of arguments specified for 'deprecated' attribute
/root/.node-gyp/2.0.0/src/smalloc.h:75: error: wrong number of arguments specified for 'deprecated' attribute
/root/.node-gyp/2.0.0/src/smalloc.h:84: error: wrong number of arguments specified for 'deprecated' attribute
/root/.node-gyp/2.0.0/src/smalloc.h:99: error: wrong number of arguments specified for 'deprecated' attribute
/root/.node-gyp/2.0.0/src/smalloc.h:108: error: wrong number of arguments specified 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 specified for 'deprecated' attribute
/root/.node-gyp/2.0.0/src/node_buffer.h:34: error: wrong number of arguments specified for 'deprecated' attribute
/root/.node-gyp/2.0.0/src/node_buffer.h:44: error: wrong number of arguments specified for 'deprecated' attribute
/root/.node-gyp/2.0.0/src/node_buffer.h:54: error: wrong number of arguments specified for 'deprecated' attribute
/root/.node-gyp/2.0.0/src/node_buffer.h:67: error: wrong number of arguments specified 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 'static v8::Local<v8::Signature> NanIntern::Factory<v8::Signature>::New(NanIntern::Factory<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::FunctionTemplate>)
make: *** [Release/obj.target/bson/ext/bson.o] Error 1
make: Leaving directory `/usr/local/apps/js/node_modules/mongoose/node_modules/mongodb/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_modules/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
stonecold123
commented
May 5, 2015
|
bnoordhuis I don't know why but when I ran env V=1 node-gyp rebuild I was getting the same error. I didn't see the output you described (CentOS release 6.6 (Final)):
|
added a commit
to bnoordhuis/io.js
that referenced
this issue
May 5, 2015
bnoordhuis
referenced this issue
May 5, 2015
Merged
src: fix NODE_DEPRECATED macro with old compilers #1626
added a commit
to bnoordhuis/io.js
that referenced
this issue
May 5, 2015
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
|
Should be fixed in b712af7 -- re-open if it isn't. |
stonecold123 commentedMay 5, 2015
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:
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:
I have also tried upgrading mongoose to version 4 but the errors don't go away.