Skip to content

io.js 3.0 build failure #59

Closed
Closed

Description

@ai
> node-zopfli@1.3.4 install /home/ai/Dev/amplifr/front/node_modules/gulp-zopfli/node_modules/node-zopfli
> node-pre-gyp install --fallback-to-build

make: Entering directory '/home/ai/Dev/amplifr/front/node_modules/gulp-zopfli/node_modules/node-zopfli/build'
  CXX(target) Release/obj.target/zopfli/src/zopfli-binding.o
In file included from ../src/zopfli-binding.h:5:0,
                 from ../src/zopfli-binding.cc:3:
../node_modules/nan/nan.h:324:27: error: redefinition of ‘template<class T> v8::Local<T> Nan::imp::NanEnsureHandleOrPersistent(const v8::Local<T>&)’
   NAN_INLINE v8::Local<T> NanEnsureHandleOrPersistent(const v8::Local<T> &val) 
                           ^
../node_modules/nan/nan.h:319:17: note: ‘template<class T> v8::Handle<T> Nan::imp::NanEnsureHandleOrPersistent(v8::Handle<T>&)’ previously declared here
   v8::Handle<T> NanEnsureHandleOrPersistent(const v8::Handle<T> &val) {
                 ^
../node_modules/nan/nan.h:344:27: error: redefinition of ‘template<class T> v8::Local<T> Nan::imp::NanEnsureLocal(v8::Handle<T>&)’
   NAN_INLINE v8::Local<T> NanEnsureLocal(const v8::Handle<T> &val) {
                           ^
../node_modules/nan/nan.h:334:27: note: ‘template<class T> v8::Local<T> Nan::imp::NanEnsureLocal(const v8::Local<T>&)’ previously declared here
   NAN_INLINE v8::Local<T> NanEnsureLocal(const v8::Local<T> &val) {
                           ^
../node_modules/nan/nan.h:757:13: error: ‘node::smalloc’ has not been declared
     , node::smalloc::FreeCallback callback
             ^
../node_modules/nan/nan.h:757: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:761:50: error: ‘callback’ was not declared in this scope
         v8::Isolate::GetCurrent(), data, length, callback, hint);
                                                  ^
../node_modules/nan/nan.h:761: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:768:67: error: no matching function for call to ‘New(v8::Isolate*, const char*&, uint32_t&)’
     return node::Buffer::New(v8::Isolate::GetCurrent(), data, size);
                                                                   ^
In file included from ../node_modules/nan/nan.h:25:0,
                 from ../src/zopfli-binding.h:5,
                 from ../src/zopfli-binding.cc:3:
/home/ai/.node-gyp/3.1.0/include/node/node_buffer.h:31:40: note: candidate: v8::MaybeLocal<v8::Object> node::Buffer::New(v8::Isolate*, v8::Handle<v8::String>, node::encoding) <near match>
 NODE_EXTERN v8::MaybeLocal<v8::Object> New(v8::Isolate* isolate,
                                        ^
/home/ai/.node-gyp/3.1.0/include/node/node_buffer.h:31:40: note:   conversion of argument 3 would be ill-formed:
In file included from ../src/zopfli-binding.h:5:0,
                 from ../src/zopfli-binding.cc:3:
../node_modules/nan/nan.h:768:67: error: invalid conversion from ‘uint32_t {aka unsigned int}’ to ‘node::encoding’ [-fpermissive]
     return node::Buffer::New(v8::Isolate::GetCurrent(), data, size);
                                                                   ^
In file included from ../node_modules/nan/nan.h:25:0,
                 from ../src/zopfli-binding.h:5,
                 from ../src/zopfli-binding.cc:3:
/home/ai/.node-gyp/3.1.0/include/node/node_buffer.h:43:40: note: candidate: 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/ai/.node-gyp/3.1.0/include/node/node_buffer.h:43:40: note:   conversion of argument 2 would be ill-formed:
In file included from ../src/zopfli-binding.h:5:0,
                 from ../src/zopfli-binding.cc:3:
../node_modules/nan/nan.h:768:67: error: invalid conversion from ‘const char*’ to ‘char*’ [-fpermissive]
     return node::Buffer::New(v8::Isolate::GetCurrent(), data, size);
                                                                   ^
../node_modules/nan/nan.h: In function ‘v8::Local<v8::Object> NanNewBufferHandle(uint32_t)’:
../node_modules/nan/nan.h:772:29: 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:779:12: error: ‘Use’ is not a member of ‘node::Buffer’
     return node::Buffer::Use(v8::Isolate::GetCurrent(), data, size);
            ^
zopfli.target.mk:122: recipe for target 'Release/obj.target/zopfli/src/zopfli-binding.o' failed
make: *** [Release/obj.target/zopfli/src/zopfli-binding.o] Error 1
make: Leaving directory '/home/ai/Dev/amplifr/front/node_modules/gulp-zopfli/node_modules/node-zopfli/build'
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/home/ai/.node/iojs/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:172:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Linux 4.1.5-200.fc22.x86_64
gyp ERR! command "/home/ai/.node/iojs/bin/iojs" "/home/ai/.node/iojs/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/home/ai/Dev/amplifr/front/node_modules/gulp-zopfli/node_modules/node-zopfli/lib/binding/node-v45-linux-x64/zopfli.node" "--module_name=zopfli" "--module_path=/home/ai/Dev/amplifr/front/node_modules/gulp-zopfli/node_modules/node-zopfli/lib/binding/node-v45-linux-x64"
gyp ERR! cwd /home/ai/Dev/amplifr/front/node_modules/gulp-zopfli/node_modules/node-zopfli
gyp ERR! node -v v3.1.0
gyp ERR! node-gyp -v v2.0.2
gyp ERR! not ok 
node-pre-gyp ERR! build error 
node-pre-gyp ERR! stack Error: Failed to execute '/home/ai/.node/iojs/bin/iojs /home/ai/.node/iojs/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/home/ai/Dev/amplifr/front/node_modules/gulp-zopfli/node_modules/node-zopfli/lib/binding/node-v45-linux-x64/zopfli.node --module_name=zopfli --module_path=/home/ai/Dev/amplifr/front/node_modules/gulp-zopfli/node_modules/node-zopfli/lib/binding/node-v45-linux-x64' (1)
node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (/home/ai/Dev/amplifr/front/node_modules/gulp-zopfli/node_modules/node-zopfli/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack     at emitTwo (events.js:87:13)
node-pre-gyp ERR! stack     at ChildProcess.emit (events.js:172:7)
node-pre-gyp ERR! stack     at maybeClose (internal/child_process.js:764:16)
node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)
node-pre-gyp ERR! System Linux 4.1.5-200.fc22.x86_64
node-pre-gyp ERR! command "/home/ai/.node/iojs/bin/iojs" "/home/ai/Dev/amplifr/front/node_modules/gulp-zopfli/node_modules/node-zopfli/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /home/ai/Dev/amplifr/front/node_modules/gulp-zopfli/node_modules/node-zopfli
node-pre-gyp ERR! node -v v3.1.0
node-pre-gyp ERR! node-pre-gyp -v v0.6.9
node-pre-gyp ERR! not ok 
Failed to execute '/home/ai/.node/iojs/bin/iojs /home/ai/.node/iojs/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/home/ai/Dev/amplifr/front/node_modules/gulp-zopfli/node_modules/node-zopfli/lib/binding/node-v45-linux-x64/zopfli.node --module_name=zopfli --module_path=/home/ai/Dev/amplifr/front/node_modules/gulp-zopfli/node_modules/node-zopfli/lib/binding/node-v45-linux-x64' (1)

/cc @pierreinglebert

Activity

  1. ai commented on Aug 24, 2015

    @ai
    Author

    Or it is relevant to #58 ?

  2. pierreinglebert commented on Aug 24, 2015

    @pierreinglebert
    Owner

    Yep #58 will support io.js v3, I will publish it in a few days :)

  3. ai commented on Sep 7, 2015

    @ai
    Author

    @pierreinglebert any updates?

  4. pierreinglebert commented on Sep 7, 2015

    @pierreinglebert
    Owner

    I noticed a little memory leak but I don't really have time to look for it. I'll publish it as is and investigate later.

  5. ai commented on Sep 7, 2015

    @ai
    Author

    @pierreinglebert yeap, at east I run it only ro build frontend, so I can deal with memory leaks.

  6. pierreinglebert commented on Sep 7, 2015

    @pierreinglebert
    Owner

    It no longer build with iojs 3 on linux (but works on osx :/)

  7. ai commented on Sep 7, 2015

    @ai
    Author

    @pierreinglebert it is blocking issue. Because every web server is a Linux server. So without linux build there will be not deploy :(.

  8. nstepien commented on Sep 8, 2015

    @nstepien
    Contributor

    May as well focus on getting node-zopfli to support node v4 instead and skip iojs v3, as it should come out very soon:
    nodejs/node#2715

  9. pierreinglebert commented on Sep 8, 2015

    @pierreinglebert
    Owner

    It's ok, it was because travis was using g++ 4.6 and iojs requires at least 4.8

  10. pierreinglebert commented on Sep 8, 2015

    @pierreinglebert
    Owner

    v1.4.0 is out

  11. kentcdodds commented on Oct 29, 2015

    @kentcdodds

    Is node-zopfli working for people using io.js 3 or Node 4? It doesn't appear to be working for me. I'm getting this error:

    module.js:338
    throw err;
    ^

    Error: Cannot find module '/var/go/node_modules/node-zopfli/lib/binding/node-v45-linux-x64/zopfli.node'
    at Function.Module._resolveFilename (module.js:336:15)
    at Function.Module._load (module.js:286:25)
    at Module.require (module.js:365:17)
    at require (module.js:384:17)
    at Object. (/var/go/node_modules/node-zopfli/lib/zopfli.js:7:14)
    at Module._compile (module.js:430:26)
    at Object.Module._extensions..js (module.js:448:10)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)
    at Module.require (module.js:365:17)
    at require (module.js:384:17)
    at Object. (/var/go/node_modules/node-zopfli/bin/zopfli:8:14)
    at Module._compile (module.js:430:26)
    at Object.Module._extensions..js (module.js:448:10)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)

    I get that with both io.js 3 and Node v4. Works fine with io.js 2. Any ideas?

  12. pierreinglebert commented on Oct 29, 2015

    @pierreinglebert
    Owner

    Yes it works for both. You must rebuild your native modules when switching
    version. Run "npm rebuild" on your project.
    Le 29 oct. 2015 6:20 PM, "Kent C. Dodds" notifications@github.com a
    écrit :

    Is node-zopfli working for people using io.js 3 or Node 4? It doesn't
    appear to be working for me. I'm getting this error:

    module.js:338
    throw err;
    ^

    Error: Cannot find module
    '/var/go/node_modules/node-zopfli/lib/binding/node-v45-linux-x64/zopfli.node'
    at Function.Module._resolveFilename (module.js:336:15)
    at Function.Module._load (module.js:286:25)
    at Module.require (module.js:365:17)
    at require (module.js:384:17)
    at Object. (/var/go/node_modules/node-zopfli/lib/zopfli.js:7:14)
    at Module._compile (module.js:430:26)
    at Object.Module._extensions..js (module.js:448:10)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)
    at Module.require (module.js:365:17)
    at require (module.js:384:17)
    at Object. (/var/go/node_modules/node-zopfli/bin/zopfli:8:14)
    at Module._compile (module.js:430:26)
    at Object.Module._extensions..js (module.js:448:10)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)

    I get that with both io.js 3 and Node v4. Works fine with io.js 2. Any
    ideas?

    —
    Reply to this email directly or view it on GitHub
    #59 (comment)
    .

  13. kentcdodds commented on Oct 29, 2015

    @kentcdodds

    Thanks. But this seems odd... I'm using nvm, and veggie I run the install,
    I switch to Node 4... Seems like I shouldn't have to rebuild. I would
    expect that is built properly the first time.

    On Thu, Oct 29, 2015, 11:54 AM Pierre Inglebert notifications@github.com
    wrote:

    Yes it works for both. You must rebuild your native modules when switching
    version. Run "npm rebuild" on your project.
    Le 29 oct. 2015 6:20 PM, "Kent C. Dodds" notifications@github.com a
    écrit :

    Is node-zopfli working for people using io.js 3 or Node 4? It doesn't
    appear to be working for me. I'm getting this error:

    module.js:338
    throw err;
    ^

    Error: Cannot find module

    '/var/go/node_modules/node-zopfli/lib/binding/node-v45-linux-x64/zopfli.node'
    at Function.Module._resolveFilename (module.js:336:15)
    at Function.Module._load (module.js:286:25)
    at Module.require (module.js:365:17)
    at require (module.js:384:17)
    at Object. (/var/go/node_modules/node-zopfli/lib/zopfli.js:7:14)
    at Module._compile (module.js:430:26)
    at Object.Module._extensions..js (module.js:448:10)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)
    at Module.require (module.js:365:17)
    at require (module.js:384:17)
    at Object. (/var/go/node_modules/node-zopfli/bin/zopfli:8:14)
    at Module._compile (module.js:430:26)
    at Object.Module._extensions..js (module.js:448:10)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)

    I get that with both io.js 3 and Node v4. Works fine with io.js 2. Any
    ideas?

    —
    Reply to this email directly or view it on GitHub
    <
    #59 (comment)

    .

    —
    Reply to this email directly or view it on GitHub
    #59 (comment)
    .

  14. pierreinglebert commented on Oct 29, 2015

    @pierreinglebert
    Owner

    no, io.js v3 has ABI v44 and node.js v4 has ABI v45 so you need to rebuild it.
    It's the same for all native modules.

    When switching between major nodejs version, you must run it : https://docs.npmjs.com/cli/rebuild

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions