Skip to content
This repository was archived by the owner on Mar 3, 2023. It is now read-only.
This repository was archived by the owner on Mar 3, 2023. It is now read-only.

Atom will not build against iojs 3.2.0+ / node 4 #8508

Closed

Description

@ryanpcmcquen

I have commented on the node-runas issue which I believe to be the cause of this, but perhaps it should be a new issue (and will get more exposure here):

../node_modules/nan/nan.h: In function ‘v8::Local<v8::Object> NanBufferUse(char*, uint32_t)’:
../node_modules/nan/nan.h:682:12: error: ‘Use’ is not a member of ‘node::Buffer’
     return node::Buffer::Use(v8::Isolate::GetCurrent(), data, size);
            ^
make: *** [Release/obj.target/runas/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/lib64/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:172:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Linux 3.10.17
gyp ERR! command "/usr/bin/iojs" "/usr/lib64/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /tmp/SBo/atom-1.0.7/build/node_modules/runas
gyp ERR! node -v v3.2.0
gyp ERR! node-gyp -v v2.0.2
gyp ERR! not ok 
npm ERR! Linux 3.10.17
npm ERR! argv "/usr/bin/iojs" "/usr/bin/npm" "--userconfig=/tmp/SBo/atom-1.0.7/build/.npmrc" "install" "--loglevel" "error"
npm ERR! node v3.2.0
npm ERR! npm  v2.13.3
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 runas 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 runas
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /tmp/SBo/atom-1.0.7/build/npm-debug.log

Here is the full npm-debug.log: https://gist.github.com/ryanpcmcquen/8e798b2d172b96c5d9ab

And the node-runas issue:

atom-archive/node-runas#11

Activity

  1. winstliu commented on Aug 26, 2015

    @winstliu
    Contributor

    Atom currently can't be built using io.js v3.x since that would require all NAN dependencies to be upgraded to 2.x.

  2. winstliu commented on Aug 26, 2015

    @winstliu
    Contributor

    Re-opening as a tracking issue.

  3. ryanpcmcquen commented on Aug 28, 2015

    @ryanpcmcquen
    Author

    @50Wliu what version is it supposed to build with? I am having issues here on node 0.12.6, 0.12.7 and iojs 2.5.0.

  4. winstliu commented on Aug 28, 2015

    @winstliu
    Contributor

    Node 0.12 and iojs 2.x should both be fine...could you try running script/clean before script/build?

  5. ryanpcmcquen commented on Aug 28, 2015

    @ryanpcmcquen
    Author

    1.0.8 builds with node 0.12.7, so that works for me! 👍

  6. ryanpcmcquen commented on Aug 28, 2015

    @ryanpcmcquen
    Author

    It must have been an issue with me not running script/clean, because I was able to build 1.0.7 also after doing that. Thank you @50Wliu!

  7. changed the title [-]Atom 1.0.7 will not build against iojs 3.2.0[/-] [+]Atom 1.0.7 will not build against iojs 3.2.0+ / node 4[/+] on Sep 13, 2015
  8. changed the title [-]Atom 1.0.7 will not build against iojs 3.2.0+ / node 4[/-] [+]Atom will not build against iojs 3.2.0+ / node 4[/+] on Sep 17, 2015
  9. winstliu commented on Sep 23, 2015

    @winstliu
    Contributor

    No longer blocked - all native modules that Atom depends on have been updated to support Node 4.

  10. YurySolovyov commented on Sep 24, 2015

    @YurySolovyov

    Is that 4.x or 4.0 ?

    for the record:

    user@y ~/atom(master)$ ./script/clean 
    user@y ~/atom(master)$ node -v
    v4.0.0
    user@y ~/atom(master)$ npm -v
    2.14.2
    user@y ~/atom(master)$ ./script/build
    Node: v4.0.0
    npm: v2.14.2
    Installing build modules...
    In file included from ../src/main.cc:1:0:
    ../node_modules/nan/nan.h:260:25: error: redefinition of ‘template<class T> v8::Local<T> _NanEnsureLocal(v8::Local<T>)’
     NAN_INLINE v8::Local<T> _NanEnsureLocal(v8::Local<T> val) {
                             ^
    ../node_modules/nan/nan.h:255:25: error: ‘template<class T> v8::Local<T> _NanEnsureLocal(v8::Handle<T>)’ previously declared here
     NAN_INLINE v8::Local<T> _NanEnsureLocal(v8::Handle<T> val) {
                             ^
    ../node_modules/nan/nan.h:660:13: error: ‘node::smalloc’ has not been declared
         , node::smalloc::FreeCallback callback
                 ^
    ../node_modules/nan/nan.h:660:35: error: expected ‘,’ or ‘...’ before ‘callback’
         , node::smalloc::FreeCallback callback
                                       ^
    ../node_modules/nan/nan.h: In function ‘v8::Local<v8::Object> NanNewBufferHandle(char*, size_t, int)’:
    ../node_modules/nan/nan.h:664:50: error: ‘callback’ was not declared in this scope
             v8::Isolate::GetCurrent(), data, length, callback, hint);
                                                      ^
    ../node_modules/nan/nan.h:664:60: error: ‘hint’ was not declared in this scope
             v8::Isolate::GetCurrent(), data, length, callback, hint);
                                                                ^
    ../node_modules/nan/nan.h: In function ‘v8::Local<v8::Object> NanNewBufferHandle(const char*, uint32_t)’:
    ../node_modules/nan/nan.h:671:67: error: call of overloaded ‘New(v8::Isolate*, const char*&, uint32_t&)’ is ambiguous
         return node::Buffer::New(v8::Isolate::GetCurrent(), data, size);
                                                                       ^
    ../node_modules/nan/nan.h:671:67: note: candidates are:
    In file included from ../node_modules/nan/nan.h:25:0,
                     from ../src/main.cc:1:
    /home/user/.node-gyp/4.0.0/src/node_buffer.h:31:40: note: v8::MaybeLocal<v8::Object> node::Buffer::New(v8::Isolate*, v8::Local<v8::String>, node::encoding) <near match>
     NODE_EXTERN v8::MaybeLocal<v8::Object> New(v8::Isolate* isolate,
                                            ^
    /home/user/.node-gyp/4.0.0/src/node_buffer.h:31:40: note:   no known conversion for argument 3 from ‘uint32_t {aka unsigned int}’ to ‘node::encoding’
    /home/user/.node-gyp/4.0.0/src/node_buffer.h:43:40: note: v8::MaybeLocal<v8::Object> node::Buffer::New(v8::Isolate*, char*, size_t) <near match>
     NODE_EXTERN v8::MaybeLocal<v8::Object> New(v8::Isolate* isolate,
                                            ^
    /home/user/.node-gyp/4.0.0/src/node_buffer.h:43:40: note:   no known conversion for argument 2 from ‘const char*’ to ‘char*’
    In file included from ../src/main.cc:1:0:
    ../node_modules/nan/nan.h: In function ‘v8::Local<v8::Object> NanNewBufferHandle(uint32_t)’:
    ../node_modules/nan/nan.h:675:61: error: could not convert ‘node::Buffer::New(v8::Isolate::GetCurrent(), ((size_t)size))’ from ‘v8::MaybeLocal<v8::Object>’ to ‘v8::Local<v8::Object>’
         return node::Buffer::New(v8::Isolate::GetCurrent(), size);
                                                                 ^
    ../node_modules/nan/nan.h: In function ‘v8::Local<v8::Object> NanBufferUse(char*, uint32_t)’:
    ../node_modules/nan/nan.h:682:12: error: ‘Use’ is not a member of ‘node::Buffer’
         return node::Buffer::Use(v8::Isolate::GetCurrent(), data, size);
                ^
    make: *** [Release/obj.target/runas/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 (/home/user/.nvm/versions/node/v4.0.0/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:270:23)
    gyp ERR! stack     at emitTwo (events.js:87:13)
    gyp ERR! stack     at ChildProcess.emit (events.js:172:7)
    gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
    gyp ERR! System Linux 3.19.0-28-generic
    gyp ERR! command "/home/user/.nvm/versions/node/v4.0.0/bin/node" "/home/user/.nvm/versions/node/v4.0.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
    gyp ERR! cwd /home/user/atom/build/node_modules/runas
    gyp ERR! node -v v4.0.0
    gyp ERR! node-gyp -v v3.0.1
    gyp ERR! not ok 
    npm ERR! Linux 3.19.0-28-generic
    npm ERR! argv "/home/user/.nvm/versions/node/v4.0.0/bin/node" "/home/user/.nvm/versions/node/v4.0.0/bin/npm" "--userconfig=/home/user/atom/build/.npmrc" "install" "--loglevel" "error"
    npm ERR! node v4.0.0
    npm ERR! npm  v2.14.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 runas 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 runas
    npm ERR! There is likely additional logging output above.
    
    npm ERR! Please include the following file with any support request:
    npm ERR!     /home/user/atom/build/npm-debug.log
    user@y ~/atom(master)$
    
  11. conraid commented on Sep 24, 2015

    @conraid

    Idem for me. With master branch.

    Node: v4.1.1
    npm: v2.14.4
    Installing build modules...
    In file included from ../src/main.cc:1:0:
    ../node_modules/nan/nan.h:260:25: error: redefinition of ‘template<class T> v8::Local<T> _NanEnsureLocal(v8::Local<T>)’
     NAN_INLINE v8::Local<T> _NanEnsureLocal(v8::Local<T> val) {
                             ^
    ../node_modules/nan/nan.h:255:25: note: ‘template<class T> v8::Local<T> _NanEnsureLocal(v8::Handle<T>)’ previously declared here
     NAN_INLINE v8::Local<T> _NanEnsureLocal(v8::Handle<T> val) {
                             ^
    ../node_modules/nan/nan.h:660:13: error: ‘node::smalloc’ has not been declared
         , node::smalloc::FreeCallback callback
                 ^
    ../node_modules/nan/nan.h:660:35: error: expected ‘,’ or ‘...’ before ‘callback’
         , node::smalloc::FreeCallback callback
                                       ^
    ../node_modules/nan/nan.h: In function ‘v8::Local<v8::Object> NanNewBufferHandle(char*, size_t, int)’:
    ../node_modules/nan/nan.h:664:50: error: ‘callback’ was not declared in this scope
             v8::Isolate::GetCurrent(), data, length, callback, hint);
                                                      ^
    ../node_modules/nan/nan.h:664:60: error: ‘hint’ was not declared in this scope
             v8::Isolate::GetCurrent(), data, length, callback, hint);
                                                                ^
    ../node_modules/nan/nan.h: In function ‘v8::Local<v8::Object> NanNewBufferHandle(const char*, uint32_t)’:
    ../node_modules/nan/nan.h:671:67: error: call of overloaded ‘New(v8::Isolate*, const char*&, uint32_t&)’ is ambiguous
         return node::Buffer::New(v8::Isolate::GetCurrent(), data, size);
                                                                       ^
    ../node_modules/nan/nan.h:671:67: note: candidates are:
    In file included from ../node_modules/nan/nan.h:25:0,
                     from ../src/main.cc:1:
    /root/.node-gyp/4.1.1/include/node/node_buffer.h:31:40: note: v8::MaybeLocal<v8::Object> node::Buffer::New(v8::Isolate*, v8::Local<v8::String>, node::encoding) <near match>
     NODE_EXTERN v8::MaybeLocal<v8::Object> New(v8::Isolate* isolate,
                                            ^
    /root/.node-gyp/4.1.1/include/node/node_buffer.h:31:40: note:   no known conversion for argument 3 from ‘uint32_t {aka unsigned int}’ to ‘node::encoding’
    /root/.node-gyp/4.1.1/include/node/node_buffer.h:43:40: note: v8::MaybeLocal<v8::Object> node::Buffer::New(v8::Isolate*, char*, size_t) <near match>
     NODE_EXTERN v8::MaybeLocal<v8::Object> New(v8::Isolate* isolate,
                                            ^
    /root/.node-gyp/4.1.1/include/node/node_buffer.h:43:40: note:   no known conversion for argument 2 from ‘const char*’ to ‘char*’
    In file included from ../src/main.cc:1:0:
    ../node_modules/nan/nan.h: In function ‘v8::Local<v8::Object> NanNewBufferHandle(uint32_t)’:
    ../node_modules/nan/nan.h:675:61: error: could not convert ‘node::Buffer::New(v8::Isolate::GetCurrent(), ((size_t)size))’ from ‘v8::MaybeLocal<v8::Object>’ to ‘v8::Local<v8::Object>’
         return node::Buffer::New(v8::Isolate::GetCurrent(), size);
                                                                 ^
    ../node_modules/nan/nan.h: In function ‘v8::Local<v8::Object> NanBufferUse(char*, uint32_t)’:
    ../node_modules/nan/nan.h:682:12: error: ‘Use’ is not a member of ‘node::Buffer’
         return node::Buffer::Use(v8::Isolate::GetCurrent(), data, size);
                ^
    make: *** [Release/obj.target/runas/src/main.o] Errore 1
    gyp ERR! build error 
    gyp ERR! stack Error: `make` failed with exit code: 2
    gyp ERR! stack     at ChildProcess.onExit (/usr/lib64/node_modules/npm/node_modules/node-gyp/lib/build.js:270:23)
    gyp ERR! stack     at emitTwo (events.js:87:13)
    gyp ERR! stack     at ChildProcess.emit (events.js:172:7)
    gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
    gyp ERR! System Linux 4.2.1-cf
    gyp ERR! command "/usr/bin/node" "/usr/lib64/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
    gyp ERR! cwd /tmp/pkg/atom-master/build/node_modules/runas
    gyp ERR! node -v v4.1.1
    gyp ERR! node-gyp -v v3.0.3
    gyp ERR! not ok 
    npm ERR! Linux 4.2.1-cf
    npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "--userconfig=/tmp/pkg/atom-master/build/.npmrc" "install" "--loglevel" "error"
    npm ERR! node v4.1.1
    npm ERR! npm  v2.14.4
    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 runas 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 runas
    npm ERR! There is likely additional logging output above.
    
    npm ERR! Please include the following file with any support request:
    npm ERR!     /tmp/pkg/atom-master/build/npm-debug.log
    

    Error also cz-electron-32 branch

    UPDATE:

    why
    Failed at the [email protected]
    when
    "runas": "^3.1",
    in package.json?

  12. YurySolovyov commented on Sep 24, 2015

    @YurySolovyov

    could be related: atom-archive/node-runas#11

  13. winstliu commented on Sep 24, 2015

    @winstliu
    Contributor

    @zcbenz I think build/package.json also needs to be updated:

    "runas": "^2",

  14. conraid commented on Sep 24, 2015

    @conraid

    @50Wliu yes, now building without error. Thanks.

  15. ryanpcmcquen commented on Sep 24, 2015

    @ryanpcmcquen
    Author

    Built here (Node: v4.1.1, npm: v2.14.4, Linux: 4.1.8) after changing the build/package.json file. 👍

  16. ryanpcmcquen commented on Sep 25, 2015

    @ryanpcmcquen
    Author

    Here is one-liner for packagers until the new release:

    ## fix package dependency (upstream will merge this on the next release)
    sed -i.bak 's/"runas": "^2",/"runas": "^3",/g' build/package.json
    
  17. mnquintana commented on Sep 25, 2015

    @mnquintana
    Contributor

    Fixed in #8926

  18. lock commented on Jan 20, 2019

    @lock

    This issue has been automatically locked since there has not been any recent activity after it was closed. If you can still reproduce this issue in Safe Mode then please open a new issue and fill out the entire issue template to ensure that we have enough information to address your issue. Thanks!

  19. locked as resolved and limited conversation to collaborators on Jan 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions