lwip icon indicating copy to clipboard operation
lwip copied to clipboard

Does not install on Ubuntu 14.04 with node 4.2.2

Open r2sd opened this issue 9 years ago • 18 comments

npm WARN deprecated [email protected]: This package is no longer maintained. See its readme for upgrade details.

[email protected] install /home/r2sd/relatas/node_modules/lwip node-gyp rebuild

make: Entering directory /home/r2sd/relatas/node_modules/lwip/build' CXX(target) Release/obj.target/lwip_decoder/src/decoder/init.o In file included from ../src/decoder/decoder.h:13:0, from ../src/decoder/init.cpp:1: ../node_modules/nan/nan.h:120: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:115: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: In function ‘v8::Local<v8::Signature> NanNew(v8::Handle<v8::FunctionTemplate>, int, v8::Handle<v8::FunctionTemplate>*)’: ../node_modules/nan/nan.h:207:78: error: no matching function for call to ‘v8::Signature::New(v8::Isolate*, v8::Handle<v8::FunctionTemplate>&, int&, v8::Handle<v8::FunctionTemplate>*&)’ return v8::Signature::New(v8::Isolate::GetCurrent(), receiver, argc, argv); ^ ../node_modules/nan/nan.h:207:78: note: candidate is: In file included from /home/r2sd/.node-gyp/4.2.2/include/node/node.h:42:0, from ../src/decoder/decoder.h:11, from ../src/decoder/init.cpp:1: /home/r2sd/.node-gyp/4.2.2/include/node/v8.h:4675:27: note: static v8::Local<v8::Signature> v8::Signature::New(v8::Isolate*, v8::Local<v8::FunctionTemplate>) static Local<Signature> New( ^ /home/r2sd/.node-gyp/4.2.2/include/node/v8.h:4675:27: note: candidate expects 2 arguments, 4 provided In file included from ../src/decoder/decoder.h:13:0, from ../src/decoder/init.cpp:1: ../node_modules/nan/nan.h: At global scope: ../node_modules/nan/nan.h:289:3: error: redefinition of ‘v8::Local<T> NanNew(P) [with T = v8::StringObject; P = v8::Local<v8::String>]’ NanNew<v8::StringObject, v8::Handle<v8::String> >( ^ ../node_modules/nan/nan.h:282:3: error: ‘v8::Local<T> NanNew(P) [with T = v8::StringObject; P = v8::Local<v8::String>]’ previously declared here NanNew<v8::StringObject, v8::Local<v8::String> >( ^ ../node_modules/nan/nan.h:307:36: error: redefinition of ‘template<class T> v8::Local<v8::RegExp> NanNew(v8::Local<v8::String>, v8::RegExp::Flags)’ NAN_INLINE v8::Local<v8::RegExp> NanNew( ^ ../node_modules/nan/nan.h:301:36: error: ‘template<class T> v8::Local<v8::RegExp> NanNew(v8::Handle<v8::String>, v8::RegExp::Flags)’ previously declared here NAN_INLINE v8::Local<v8::RegExp> NanNew( ^ ../node_modules/nan/nan.h:319:36: error: redefinition of ‘template<class T, class P> v8::Local<v8::RegExp> NanNew(v8::Local<v8::String>, v8::RegExp::Flags)’ NAN_INLINE v8::Local<v8::RegExp> NanNew( ^ ../node_modules/nan/nan.h:313:36: error: ‘template<class T, class P> v8::Local<v8::RegExp> NanNew(v8::Handle<v8::String>, v8::RegExp::Flags)’ previously declared here NAN_INLINE v8::Local<v8::RegExp> NanNew( ^ ../node_modules/nan/nan.h:778:13: error: ‘node::smalloc’ has not been declared , node::smalloc::FreeCallback callback ^ ../node_modules/nan/nan.h:778: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:782:50: error: ‘callback’ was not declared in this scope v8::Isolate::GetCurrent(), data, length, callback, hint); ^ ../node_modules/nan/nan.h:782: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:789: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:789:67: note: candidates are: In file included from ../src/decoder/decoder.h:12:0, from ../src/decoder/init.cpp:1: /home/r2sd/.node-gyp/4.2.2/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, ^ /home/r2sd/.node-gyp/4.2.2/include/node/node_buffer.h:31:40: note: no known conversion for argument 3 from ‘uint32_t {aka unsigned int}’ to ‘node::encoding’ /home/r2sd/.node-gyp/4.2.2/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, ^ /home/r2sd/.node-gyp/4.2.2/include/node/node_buffer.h:43:40: note: no known conversion for argument 2 from ‘const char*’ to ‘char*’ In file included from ../src/decoder/decoder.h:13:0, from ../src/decoder/init.cpp:1: ../node_modules/nan/nan.h: In function ‘v8::Local<v8::Object> NanNewBufferHandle(uint32_t)’: ../node_modules/nan/nan.h:793: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:800:12: error: ‘Use’ is not a member of ‘node::Buffer’ return node::Buffer::Use(v8::Isolate::GetCurrent(), data, size); ^ make: *** [Release/obj.target/lwip_decoder/src/decoder/init.o] Error 1 make: Leaving directory/home/r2sd/relatas/node_modules/lwip/build' gyp ERR! build error gyp ERR! stack Error: make failed with exit code: 2 gyp ERR! stack at ChildProcess.onExit (/usr/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.13.0-51-generic gyp ERR! command "/usr/bin/nodejs" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" gyp ERR! cwd /home/r2sd/relatas/node_modules/lwip gyp ERR! node -v v4.2.2 gyp ERR! node-gyp -v v3.0.3 gyp ERR! not ok npm ERR! Linux 3.13.0-51-generic npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install" "--save" "lwip" npm ERR! node v4.2.2 npm ERR! npm v2.14.7 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 lwip 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 lwip npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request: npm ERR! /home/r2sd/relatas/npm-debug.log

r2sd avatar Dec 04 '15 07:12 r2sd

A deprecation message should not affect another project. Besides the deprecation message (which should be harmless) are you seeing any other issue?

jdalton avatar Dec 06 '15 18:12 jdalton

@r2sd Which version of gcc are you using? Please try to update to the latest.

See https://github.com/EyalAr/lwip/issues/205

EyalAr avatar Dec 07 '15 00:12 EyalAr

I also could not install lwip on Ubuntu 14.04. My gcc version is gcc (Ubuntu 4.8.4-2ubuntu1~14.04) 4.8.4 and my make version is GNU Make 3.81 with v4.1.2 nodejs.

minibear0523 avatar Dec 08 '15 05:12 minibear0523

GCC++ 4.8 and node 4.4.3 build just fine on centos 6.7. I had problems with GCC++ 4.7.

skicomdev avatar Dec 11 '15 20:12 skicomdev

Doesn't build on CircleCI if Node version is set to 4.2 or 5.1. Builds with the default Node 0.10.33.

katspaugh avatar Dec 19 '15 10:12 katspaugh

Same error here... node 4.2.4 gcc (Ubuntu 4.9.2-10ubuntu13) 4.9.2

Error: Command failed: /usr/bin/env npm i --production
In file included from ../src/decoder/decoder.h:13:0,
                 from ../src/decoder/init.cpp:1:
../node_modules/nan/nan.h:261: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:256: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:661:13: error: ‘node::smalloc’ has not been declared
     , node::smalloc::FreeCallback callback
             ^
../node_modules/nan/nan.h:661: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:665:50: error: ‘callback’ was not declared in this scope
         v8::Isolate::GetCurrent(), data, length, callback, hint);
                                                  ^
../node_modules/nan/nan.h:665: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:672: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:672:67: note: candidates are:
In file included from ../src/decoder/decoder.h:12:0,
                 from ../src/decoder/init.cpp:1:
/root/.node-gyp/4.2.4/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,
                                        ^
/root/.node-gyp/4.2.4/src/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.2.4/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,
                                        ^
/root/.node-gyp/4.2.4/src/node_buffer.h:43:40: note:   no known conversion for argument 2 from ‘const char*’ to ‘char*’
In file included from ../src/decoder/decoder.h:13:0,
                 from ../src/decoder/init.cpp:1:
../node_modules/nan/nan.h: In function ‘v8::Local<v8::Object> NanNewBufferHandle(uint32_t)’:
../node_modules/nan/nan.h:676: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:683:12: error: ‘Use’ is not a member of ‘node::Buffer’
     return node::Buffer::Use(v8::Isolate::GetCurrent(), data, size);
            ^
make: *** [Release/obj.target/lwip_decoder/src/decoder/init.o] Error 1

Seems like a problem with nan package :(

APXEOLOG avatar Jan 02 '16 11:01 APXEOLOG

I'm also getting a similar build error on OpenShift (RedHat)

node 4.2.2 npm 3.3.10

ste-vg avatar Jan 05 '16 14:01 ste-vg

this also goes wrong for TravisCI build attempts against Node 4.1, such as in https://travis-ci.org/mozilla/teach.mozilla.org/builds/104231487 -- the lwip compile breaks horrendously because it looks like it has no idea how to compile against a more modern version of V8

Pomax avatar Jan 23 '16 02:01 Pomax

Finding this too on CircleCI using NodeJS v5.7

antony avatar Feb 25 '16 21:02 antony

This exact error still occurs for me on Ubuntu 12.04 as well as Debian 8 with both node v5.1 and v5.7. Updating from gcc 4.6 to gcc 4.8 does not seem to have fixed the problem. Any ideas? We would love to use this in production.

carterbancroft avatar Feb 25 '16 23:02 carterbancroft

+1

shakefu avatar Mar 01 '16 21:03 shakefu

@EyalAr any chance you can set up a Ubuntu VM install using VMWare Player or or VirtualBox to see what's going on?

Pomax avatar Mar 01 '16 21:03 Pomax

Hi,

I'm having the same problem, In my case, Ubuntu 15.10 and Nodejs 4.4 and 5.8

koquipizzi avatar Mar 15 '16 01:03 koquipizzi

+1. on Ubuntu 14.04 got same problem.

bexoss avatar Apr 01 '16 12:04 bexoss

nodejs 5.9.0, npm 3.6.0, ubuntu 14.04, getting the same problem.

jan876 avatar Apr 24 '16 09:04 jan876

I just tried to reproduce this on node 5.11.0 with Ubuntu 14.04 and the install worked.

I used the following container command:

docker run --rm -it --entrypoint bash ubuntu:14.04 -c 'apt-get update -yqq && \
    apt-get install build-essential python-dev curl -yqq && \
    export NODE_VERSION=5.11.0 && \
    curl -SLO "https://nodejs.org/dist/v$NODE_VERSION/node-v$NODE_VERSION-linux-x64.tar.gz" && \
    tar -xzf "node-v$NODE_VERSION-linux-x64.tar.gz" -C /usr/local --strip-components=1 && \
    rm "node-v$NODE_VERSION-linux-x64.tar.gz" && \
    npm install lwip'

... can anyone else confirm it works on 5.11.0?

shakefu avatar Apr 26 '16 23:04 shakefu

For me it works perfectly on Ubuntu 14.04, Node 5.7.1 and NPM 3.8.7. It's sitting on a production system and is handling many image resizing operations per day and runs smoothly. Got no warnings and no errors on npm install lwip.

I'm running this Bitnami EC2 instance: https://aws.amazon.com/marketplace/pp/B00GXYE87S/ref=srh_res_product_title?ie=UTF8&sr=0-3&qid=1461716011793

ChristianRich avatar Apr 27 '16 00:04 ChristianRich

was getting the same error, running

sudo apt-get install -y build-essential

made it install

mdunn85 avatar Jul 27 '16 01:07 mdunn85