Skip to content

io.js support #173

@timoxley

Description

@timoxley

Updated to latest nan to get io.js support, but looks like there are some code changes required to get gaze to build on io.js.

> npm install nan@latest --save
npm http request GET https://registry.npmjs.org/nan
npm http 304 https://registry.npmjs.org/nan
[email protected] node_modules/nan

> npm install

> [email protected] install /Users/timoxley/Projects/libs/gaze
> node build.js

child_process: customFds option is deprecated, use stdio instead.
child_process: customFds option is deprecated, use stdio instead.
  CXX(target) Release/obj.target/pathwatcher/src/main.o
In file included from ../src/main.cc:22:
In file included from ../src/handle_map.h:27:
../src/unsafe_persistent.h:38:38: error: expected ')'
  NAN_INLINE(v8::Persistent<TypeName>* persistent()) {
                                     ^
../src/unsafe_persistent.h:38:13: note: to match this '('
  NAN_INLINE(v8::Persistent<TypeName>* persistent()) {
            ^
../src/unsafe_persistent.h:38:18: error: non-friend class member 'Persistent' cannot have a qualified name
  NAN_INLINE(v8::Persistent<TypeName>* persistent()) {
             ~~~~^
../src/unsafe_persistent.h:38:18: error: C++ requires a type specifier for all declarations
  NAN_INLINE(v8::Persistent<TypeName>* persistent()) {
  ~~~~~~~~~~     ^
../src/unsafe_persistent.h:38:3: error: 'inline' can only appear on functions
  NAN_INLINE(v8::Persistent<TypeName>* persistent()) {
  ^
../node_modules/nan/nan.h:36:21: note: expanded from macro 'NAN_INLINE'
# define NAN_INLINE inline __attribute__((always_inline))
                    ^
In file included from ../src/main.cc:22:
In file included from ../src/handle_map.h:27:
../src/unsafe_persistent.h:38:3: warning: 'always_inline' attribute only applies to functions [-Wignored-attributes]
../node_modules/nan/nan.h:36:43: note: expanded from macro 'NAN_INLINE'
# define NAN_INLINE inline __attribute__((always_inline))
                                          ^
In file included from ../src/main.cc:22:
In file included from ../src/handle_map.h:27:
../src/unsafe_persistent.h:40:5: error: expected member name or ';' after declaration specifiers
    return handle;
    ^~~~~~
../src/unsafe_persistent.h:29:27: error: member initializer 'value' does not name a non-static data member or base class
  NanUnsafePersistent() : value(0) { }
                          ^~~~~~~~
../src/unsafe_persistent.h:31:5: error: use of undeclared identifier 'value'
    value = handle->ClearAndLeak();
    ^
../src/unsafe_persistent.h:34:41: error: use of undeclared identifier 'nan_isolate'
    v8::Persistent<TypeName> persistent(nan_isolate, handle);
                                        ^
../src/unsafe_persistent.h:35:5: error: use of undeclared identifier 'value'
    value = persistent.ClearAndLeak();
    ^
../src/unsafe_persistent.h:41:4: error: expected ';' after class
  }
   ^
   ;
../src/unsafe_persistent.h:43:14: error: expected unqualified-id
  NAN_INLINE(void Dispose()) {
             ^
../src/unsafe_persistent.h:43:14: error: expected ')'
../src/unsafe_persistent.h:43:13: note: to match this '('
  NAN_INLINE(void Dispose()) {
            ^
../src/unsafe_persistent.h:48:14: error: expected unqualified-id
  NAN_INLINE(void Clear()) {
             ^
../src/unsafe_persistent.h:48:14: error: expected ')'
../src/unsafe_persistent.h:48:13: note: to match this '('
  NAN_INLINE(void Clear()) {
            ^
../src/unsafe_persistent.h:52:24: error: use of undeclared identifier 'TypeName'; did you mean 'typename'?
  NAN_INLINE(v8::Local<TypeName> NewLocal()) {
                       ^~~~~~~~
                       typename
../src/unsafe_persistent.h:52:32: error: expected a qualified name after 'typename'
  NAN_INLINE(v8::Local<TypeName> NewLocal()) {
                               ^
../src/unsafe_persistent.h:52:32: error: expected a type
../src/unsafe_persistent.h:52:34: error: C++ requires a type specifier for all declarations
  NAN_INLINE(v8::Local<TypeName> NewLocal()) {
  ~~~~~~~~~~                     ^
../src/unsafe_persistent.h:53:22: error: use of undeclared identifier 'TypeName'; did you mean 'typename'?
    return v8::Local<TypeName>::New(nan_isolate, *persistent());
                     ^~~~~~~~
                     typename
fatal error: too many errors emitted, stopping now [-ferror-limit=]
1 warning and 20 errors generated.
make: *** [Release/obj.target/pathwatcher/src/main.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:267:23)
gyp ERR! stack     at ChildProcess.emit (events.js:98:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:1038:12)
gyp ERR! System Darwin 14.1.0
gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/timoxley/Projects/libs/gaze
gyp ERR! node -v v1.0.2
gyp ERR! node-gyp -v v1.0.2
gyp ERR! not ok
Build failed

npm ERR! Darwin 14.1.0
npm ERR! argv "node" "/usr/local/bin/npm" "install"
npm ERR! node v1.0.2
npm ERR! npm  v2.1.18
npm ERR! code ELIFECYCLE
npm ERR! [email protected] install: `node build.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script 'node build.js'.
npm ERR! This is most likely a problem with the gaze package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node build.js
npm ERR! You can get their info via:
npm ERR!     npm owner ls gaze
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/timoxley/Projects/libs/gaze/npm-debug.log

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions