nodejs-pack icon indicating copy to clipboard operation
nodejs-pack copied to clipboard

Install fails with node v0.12.4

Open the-nicolas opened this issue 9 years ago • 14 comments

npm install hipack /

[email protected] install /Users/nwild/Documents/DEV/JS/secucard-connect-nodejs-client-opidemo/node_modules/hipack node-gyp rebuild

CXX(target) Release/obj.target/hipack/pack.o ../pack.cc:74:24: error: unexpected namespace name 'Buffer': expected expression char *BufferData(node::Buffer *b) { ^ ../pack.cc:74:32: error: use of undeclared identifier 'b' char *BufferData(node::Buffer *b) { ^ ../pack.cc:74:34: error: expected ';' after top level declarator char *BufferData(node::Buffer *b) { ^ ; ../pack.cc:115:33: error: unknown type name 'Arguments'; did you mean 'v8::internal::Arguments'? static Handle<Value> New(const Arguments& args) { ^~~~~~~~~ v8::internal::Arguments /Users/nwild/.node-gyp/0.12.4/deps/v8/include/v8.h:127:7: note: 'v8::internal::Arguments' declared here class Arguments; ^ ../pack.cc:152:33: error: unknown type name 'Arguments'; did you mean 'v8::internal::Arguments'? static Handle<Value> pack(const Arguments& argv) ^~~~~~~~~ v8::internal::Arguments /Users/nwild/.node-gyp/0.12.4/deps/v8/include/v8.h:127:7: note: 'v8::internal::Arguments' declared here class Arguments; ^ ../pack.cc:644:35: error: unknown type name 'Arguments'; did you mean 'v8::internal::Arguments'? static Handle<Value> unpack(const Arguments& argv) ^~~~~~~~~ v8::internal::Arguments /Users/nwild/.node-gyp/0.12.4/deps/v8/include/v8.h:127:7: note: 'v8::internal::Arguments' declared here class Arguments; ^ ../pack.cc:1049:38: error: unknown type name 'Arguments'; did you mean 'v8::internal::Arguments'? static Handle<Value> setdebug( const Arguments& argv ) ^~~~~~~~~ v8::internal::Arguments /Users/nwild/.node-gyp/0.12.4/deps/v8/include/v8.h:127:7: note: 'v8::internal::Arguments' declared here class Arguments; ^ ../pack.cc:112:32: error: use of undeclared identifier 'debug_mode' static void SetDebug(int n) { debug_mode = n; } ^ ../pack.cc:113:32: error: use of undeclared identifier 'debug_mode' static int IsDebug() { return debug_mode; } ^ ../pack.cc:116:18: error: calling a protected constructor of class 'v8::HandleScope' HandleScope scope; ^ /Users/nwild/.node-gyp/0.12.4/deps/v8/include/v8.h:816:13: note: declared protected here V8_INLINE HandleScope() {} ^ ../pack.cc:119:26: error: member access into incomplete type 'const v8::internal::Arguments' hipack->Wrap(args.This()); ^ /Users/nwild/.node-gyp/0.12.4/deps/v8/include/v8.h:127:7: note: forward declaration of 'v8::internal::Arguments' class Arguments; ^ ../pack.cc:121:20: error: member access into incomplete type 'const v8::internal::Arguments' return args.This(); ^ /Users/nwild/.node-gyp/0.12.4/deps/v8/include/v8.h:127:7: note: forward declaration of 'v8::internal::Arguments' class Arguments; ^ ../pack.cc:154:17: error: calling a protected constructor of class 'v8::HandleScope' HandleScope scope; ^ /Users/nwild/.node-gyp/0.12.4/deps/v8/include/v8.h:816:13: note: declared protected here V8_INLINE HandleScope() {} ^ ../pack.cc:169:20: error: member access into incomplete type 'const v8::internal::Arguments' num_args = argv.Length(); ^ /Users/nwild/.node-gyp/0.12.4/deps/v8/include/v8.h:127:7: note: forward declaration of 'v8::internal::Arguments' class Arguments; ^ ../pack.cc:170:10: error: member access into incomplete type 'const v8::internal::Arguments' if (argv.Length() < 2 ) { ^ /Users/nwild/.node-gyp/0.12.4/deps/v8/include/v8.h:127:7: note: forward declaration of 'v8::internal::Arguments' class Arguments; ^ ../pack.cc:171:68: error: member access into incomplete type 'const v8::internal::Arguments' NODEJS_ERROR( "Not enough arguements, total args: %d", argv.Length() ); ^ ../pack.cc:49:85: note: expanded from macro 'NODEJS_ERROR'

define NODEJS_ERROR( strfmt, arg ) THROW_ERROR( _buf, (_buf, (const char*)strfmt, arg) )

                                                                                   ^

../pack.cc:32:12: note: expanded from macro 'THROW_ERROR' sprintf x;
^ /Users/nwild/.node-gyp/0.12.4/deps/v8/include/v8.h:127:7: note: forward declaration of 'v8::internal::Arguments' class Arguments; ^ ../pack.cc:171:9: error: no member named 'New' in 'v8::String'; did you mean simply 'New'? NODEJS_ERROR( "Not enough arguements, total args: %d", argv.Length() ); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../pack.cc:49:38: note: expanded from macro 'NODEJS_ERROR'

define NODEJS_ERROR( strfmt, arg ) THROW_ERROR( _buf, (_buf, (const char*)strfmt, arg) )

                                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

../pack.cc:33:44: note: expanded from macro 'THROW_ERROR' return ThrowException(Exception::Error (String::New(bufname)));
^~~~~~~~ ../pack.cc:115:23: note: 'New' declared here static Handle<Value> New(const Arguments& args) { ^ ../pack.cc:171:9: error: reference to type 'const v8::internal::Arguments' could not bind to an lvalue of type 'char [256]' NODEJS_ERROR( "Not enough arguements, total args: %d", argv.Length() ); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../pack.cc:49:51: note: expanded from macro 'NODEJS_ERROR'

define NODEJS_ERROR( strfmt, arg ) THROW_ERROR( _buf, (_buf, (const char*)strfmt, arg) )

                                                 ^~~~

../pack.cc:33:56: note: expanded from macro 'THROW_ERROR' return ThrowException(Exception::Error (String::New(bufname)));
^ ../pack.cc:115:44: note: passing argument to parameter 'args' here static Handle<Value> New(const Arguments& args) { ^ ../pack.cc:174:10: error: member access into incomplete type 'const v8::internal::Arguments' if (argv.Length() >= 1 ) ^ /Users/nwild/.node-gyp/0.12.4/deps/v8/include/v8.h:127:7: note: forward declaration of 'v8::internal::Arguments' class Arguments; ^ fatal error: too many errors emitted, stopping now [-ferror-limit=] 20 errors generated. make: *** [Release/obj.target/hipack/pack.o] Error 1 gyp ERR! build error gyp ERR! stack Error: make failed with exit code: 2 gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:269:23) gyp ERR! stack at ChildProcess.emit (events.js:110:17) gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:1074:12) gyp ERR! System Darwin 14.5.0 gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" gyp ERR! cwd /Users/nwild/Documents/DEV/JS/secucard-connect-nodejs-client-opidemo/node_modules/hipack gyp ERR! node -v v0.12.4 gyp ERR! node-gyp -v v2.0.2 gyp ERR! not ok npm ERR! Darwin 14.5.0 npm ERR! argv "node" "/usr/local/bin/npm" "install" "hipack" npm ERR! node v0.12.4 npm ERR! npm v2.13.2 npm ERR! code ELIFECYCLE

npm ERR! [email protected] install: node-gyp rebuild npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the [email protected] install script 'node-gyp rebuild'. npm ERR! This is most likely a problem with the hipack package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! node-gyp rebuild npm ERR! You can get their info via: npm ERR! npm owner ls hipack npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request: npm ERR! /Users/nwild/Documents/DEV/JS/secucard-connect-nodejs-client-opidemo/npm-debug.log

the-nicolas avatar Sep 06 '15 19:09 the-nicolas

I see you are on a Mac. I will have to check if its a new node 0.12 issue or a mac compiler issue. Will first verify on latest node v8 source tree before the mac.

Cheers

rauls avatar Sep 07 '15 01:09 rauls

I'm having a similar problem on node 4.1.1

Any update on this?

gianu avatar Sep 28 '15 19:09 gianu

I am having the exact same problem on node 4.2.1 (yes I am also on a mac)

Any more infos ?

Tuetuopay avatar Oct 19 '15 17:10 Tuetuopay

Same here on 5.0.0

bartolkaruza avatar Nov 12 '15 12:11 bartolkaruza

will update the nodegyp stuff shortly.

rauls avatar Nov 18 '15 23:11 rauls

any update on this? prevents from moving to node 0.12.X

jperry avatar Dec 04 '15 16:12 jperry

Same issue. On a mac.

BarryCarlyon avatar Dec 14 '15 14:12 BarryCarlyon

I am see the exact same error (or there abouts) under Ubuntu also

Both Mac/Ubuntu under node v4.2.3

BarryCarlyon avatar Dec 14 '15 15:12 BarryCarlyon

Same for me.

On a MacBook (El Capitain 10.11.2; Darwin 15.2.0) with node 5.0.0

DannyvdSluijs avatar Jan 14 '16 15:01 DannyvdSluijs

Has anyone found another good alternative to this library or forked it and updated the pack.cc file?

jperry avatar Jan 14 '16 16:01 jperry

Same issue here too. Any updates?

tibsar avatar Apr 25 '16 18:04 tibsar

Well, same for me. It does not compile on anything older than 0.10.x I found a js implementation of PHP's pack here: http://locutus.io/php/misc/pack/ It's part of a greater project, but the pack function is completely stand-alone.

Tested, works nicely :)

OffbeatPlanet avatar Jun 15 '16 08:06 OffbeatPlanet

Are there any recommendations for those who need unpack functionality too?

khitrenovich avatar Sep 18 '16 11:09 khitrenovich

https://github.com/peze/node-pack It works well on node version > 4

acgpiano avatar Dec 23 '16 06:12 acgpiano