Solved Need help building 'bigint.cc'

I'm trying to install a Node.js package called node-bigint:

npm install bigint

The problem looks like it's with a C++ library that needs to be compiled as a dependency bigint.cc. The whole thing fails with the following output:

Code:
> bigint@0.4.2 install /usr/local/fxasync/node_modules/bigint
> node-gyp configure build

child_process: customFds option is deprecated, use stdio instead.
gmake: Entering directory '/usr/local/fxasync/node_modules/bigint/build'
  CXX(target) Release/obj.target/bigint/bigint.o
../bigint.cc:57: error: expected class-name before '{' token
../bigint.cc:74: error: expected ',' or '...' before '&' token
../bigint.cc:74: error: ISO C++ forbids declaration of 'Arguments' with no type
../bigint.cc:75: error: expected ',' or '...' before '&' token
../bigint.cc:75: error: ISO C++ forbids declaration of 'Arguments' with no type
../bigint.cc:76: error: expected ',' or '...' before '&' token
../bigint.cc:76: error: ISO C++ forbids declaration of 'Arguments' with no type
../bigint.cc:77: error: expected ',' or '...' before '&' token
../bigint.cc:77: error: ISO C++ forbids declaration of 'Arguments' with no type
../bigint.cc:78: error: expected ',' or '...' before '&' token
../bigint.cc:78: error: ISO C++ forbids declaration of 'Arguments' with no type
../bigint.cc:79: error: expected ',' or '...' before '&' token
../bigint.cc:79: error: ISO C++ forbids declaration of 'Arguments' with no type
../bigint.cc:80: error: expected ',' or '...' before '&' token
../bigint.cc:80: error: ISO C++ forbids declaration of 'Arguments' with no type
../bigint.cc:81: error: expected ',' or '...' before '&' token
../bigint.cc:81: error: ISO C++ forbids declaration of 'Arguments' with no type
../bigint.cc:82: error: expected ',' or '...' before '&' token
../bigint.cc:82: error: ISO C++ forbids declaration of 'Arguments' with no type
../bigint.cc:83: error: expected ',' or '...' before '&' token
../bigint.cc:83: error: ISO C++ forbids declaration of 'Arguments' with no type
../bigint.cc:84: error: expected ',' or '...' before '&' token
../bigint.cc:84: error: ISO C++ forbids declaration of 'Arguments' with no type
../bigint.cc:85: error: expected ',' or '...' before '&' token
../bigint.cc:85: error: ISO C++ forbids declaration of 'Arguments' with no type
../bigint.cc:86: error: expected ',' or '...' before '&' token
../bigint.cc:86: error: ISO C++ forbids declaration of 'Arguments' with no type
../bigint.cc:87: error: expected ',' or '...' before '&' token
../bigint.cc:87: error: ISO C++ forbids declaration of 'Arguments' with no type
../bigint.cc:88: error: expected ',' or '...' before '&' token
../bigint.cc:88: error: ISO C++ forbids declaration of 'Arguments' with no type
../bigint.cc:89: error: expected ',' or '...' before '&' token
../bigint.cc:89: error: ISO C++ forbids declaration of 'Arguments' with no type
../bigint.cc:90: error: expected ',' or '...' before '&' token
../bigint.cc:90: error: ISO C++ forbids declaration of 'Arguments' with no type
../bigint.cc:91: error: expected ',' or '...' before '&' token
../bigint.cc:91: error: ISO C++ forbids declaration of 'Arguments' with no type
../bigint.cc:92: error: expected ',' or '...' before '&' token
../bigint.cc:92: error: ISO C++ forbids declaration of 'Arguments' with no type
../bigint.cc:93: error: expected ',' or '...' before '&' token
../bigint.cc:93: error: ISO C++ forbids declaration of 'Arguments' with no type
../bigint.cc:94: error: expected ',' or '...' before '&' token
../bigint.cc:94: error: ISO C++ forbids declaration of 'Arguments' with no type
../bigint.cc:95: error: expected ',' or '...' before '&' token
../bigint.cc:95: error: ISO C++ forbids declaration of 'Arguments' with no type
../bigint.cc:96: error: expected ',' or '...' before '&' token
../bigint.cc:96: error: ISO C++ forbids declaration of 'Arguments' with no type
../bigint.cc:97: error: expected ',' or '...' before '&' token
../bigint.cc:97: error: ISO C++ forbids declaration of 'Arguments' with no type
../bigint.cc:98: error: expected ',' or '...' before '&' token
../bigint.cc:98: error: ISO C++ forbids declaration of 'Arguments' with no type
../bigint.cc:99: error: expected ',' or '...' before '&' token
../bigint.cc:99: error: ISO C++ forbids declaration of 'Arguments' with no type
../bigint.cc:100: error: expected ',' or '...' before '&' token
../bigint.cc:100: error: ISO C++ forbids declaration of 'Arguments' with no type
../bigint.cc:101: error: expected ',' or '...' before '&' token
../bigint.cc:101: error: ISO C++ forbids declaration of 'Arguments' with no type
../bigint.cc:102: error: expected ',' or '...' before '&' token
../bigint.cc:102: error: ISO C++ forbids declaration of 'Arguments' with no type
../bigint.cc:103: error: expected ',' or '...' before '&' token
../bigint.cc:103: error: ISO C++ forbids declaration of 'Arguments' with no type
../bigint.cc:104: error: expected ',' or '...' before '&' token
../bigint.cc:104: error: ISO C++ forbids declaration of 'Arguments' with no type
../bigint.cc:105: error: expected ',' or '...' before '&' token
../bigint.cc:105: error: ISO C++ forbids declaration of 'Arguments' with no type
../bigint.cc:106: error: expected ',' or '...' before '&' token
../bigint.cc:106: error: ISO C++ forbids declaration of 'Arguments' with no type
../bigint.cc:107: error: expected ',' or '...' before '&' token
../bigint.cc:107: error: ISO C++ forbids declaration of 'Arguments' with no type
If tried this on FreeBSD 10.1 and 9.3. Both fail with the same problem. I have tried with both CXX=c++, CXX=clang++, and CXX=g++48.

I've even attempted to build bigint.cc on it's own a few different ways with similar results.

c++ bigint.cc -I/usr/local/include -I../../../../.node-gyp/0.12.0/src -I../../../../.node-gyp/0.12.0/deps/v8/include
Code:
bigint.cc:57: error: expected class-name before '{' token

clang++ bigint.cc -I/usr/local/include -I../../../../.node-gyp/0.12.0/src -I../../../../.node-gyp/0.12.0/deps/v8/include

Code:
bigint.cc:57:16: error: expected class name
class BigInt : ObjectWrap {

g++48 bigint.cc -I/usr/local/include -I../../../../.node-gyp/0.12.0/src -I../../../../.node-gyp/0.12.0/deps/v8/include

Code:
bigint.cc:57:27: error: expected class-name before '{' token
class BigInt : ObjectWrap {
  ^
Could someone offer a hint as to what I am doing wrong?

The Github repository for node-bigint can be found at:
https://github.com/substack/node-bigint

I also tried the one with the 'FreeBSD fix' with the same results:
http://github.com/frasertweedale/node-bigint
 
Figured it out. There where many API's broken with the changes in from Node.js 0.10 to 0.12.

In addition to needing #include <node_object_wrap.h>, there are several changes that need to be made to the parts of the code using the V8 API.
 
Back
Top