EyalAr / lwip

Light Weight Image Processor for NodeJS
MIT License
2.37k stars 229 forks source link

Problem installing in VM #290

Open alexturpin opened 7 years ago

alexturpin commented 7 years ago

Hey all,

Trying to install lwip on a Ubuntu 16.04.1 VM on an OS X host. Getting some odd errors that I'm not quite sure what to make of:

npm WARN deprecated lodash-node@2.4.1: This package is discontinued. Use lodash@^4.0.0.

> lwip@0.0.9 install /srv/myproject/node_modules/lwip
> node-gyp rebuild

make: Entering directory '/srv/myproject/node_modules/lwip/build'
make: Warning: File 'lwip_image.target.mk' has modification time 993 s in the future
  CXX(target) Release/obj.target/lwip_decoder/src/decoder/init.o
  CXX(target) Release/obj.target/lwip_decoder/src/decoder/util.o
  CXX(target) Release/obj.target/lwip_decoder/src/decoder/buffer_worker.o
../src/decoder/buffer_worker.cpp: In constructor ‘DecodeBufferWorker::DecodeBufferWorker(Nan::Callback*, v8::Local<v8::Object>&, buf_dec_f_t)’:
../src/decoder/buffer_worker.cpp:8:58: warning: ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings]
     _height(0), _channels(0), _trans(false), _metadata("") {
                                                          ^
  CXX(target) Release/obj.target/lwip_decoder/src/decoder/jpeg_decoder.o
  CXX(target) Release/obj.target/lwip_decoder/src/decoder/png_decoder.o
  CXX(target) Release/obj.target/lwip_decoder/src/decoder/gif_decoder.o
  CC(target) Release/obj.target/lwip_decoder/src/lib/jpeg/jmemnobs.o
  CC(target) Release/obj.target/lwip_decoder/src/lib/jpeg/jcomapi.o
  CC(target) Release/obj.target/lwip_decoder/src/lib/jpeg/jdapimin.o
  CC(target) Release/obj.target/lwip_decoder/src/lib/jpeg/jdapistd.o
  CC(target) Release/obj.target/lwip_decoder/src/lib/jpeg/jdatadst.o
  CC(target) Release/obj.target/lwip_decoder/src/lib/jpeg/jdatasrc.o
  CC(target) Release/obj.target/lwip_decoder/src/lib/jpeg/jdcoefct.o
  CC(target) Release/obj.target/lwip_decoder/src/lib/jpeg/jdcolor.o
  CC(target) Release/obj.target/lwip_decoder/src/lib/jpeg/jddctmgr.o
  CC(target) Release/obj.target/lwip_decoder/src/lib/jpeg/jdhuff.o
  CC(target) Release/obj.target/lwip_decoder/src/lib/jpeg/jdinput.o
  CC(target) Release/obj.target/lwip_decoder/src/lib/jpeg/jdmainct.o
  CC(target) Release/obj.target/lwip_decoder/src/lib/jpeg/jdmarker.o
  CC(target) Release/obj.target/lwip_decoder/src/lib/jpeg/jdmaster.o
  CC(target) Release/obj.target/lwip_decoder/src/lib/jpeg/jdpostct.o
  CC(target) Release/obj.target/lwip_decoder/src/lib/jpeg/jdsample.o
  CC(target) Release/obj.target/lwip_decoder/src/lib/jpeg/jerror.o
  CC(target) Release/obj.target/lwip_decoder/src/lib/jpeg/jfdctflt.o
  CC(target) Release/obj.target/lwip_decoder/src/lib/jpeg/jfdctfst.o
  CC(target) Release/obj.target/lwip_decoder/src/lib/jpeg/jfdctint.o
  CC(target) Release/obj.target/lwip_decoder/src/lib/jpeg/jidctflt.o
  CC(target) Release/obj.target/lwip_decoder/src/lib/jpeg/jidctfst.o
  CC(target) Release/obj.target/lwip_decoder/src/lib/jpeg/jidctint.o
  CC(target) Release/obj.target/lwip_decoder/src/lib/jpeg/jutils.o
  CC(target) Release/obj.target/lwip_decoder/src/lib/jpeg/jmemmgr.o
  CC(target) Release/obj.target/lwip_decoder/src/lib/jpeg/jdarith.o
  CC(target) Release/obj.target/lwip_decoder/src/lib/jpeg/jdmerge.o
  CC(target) Release/obj.target/lwip_decoder/src/lib/jpeg/jaricom.o
  CC(target) Release/obj.target/lwip_decoder/src/lib/jpeg/jquant1.o
  CC(target) Release/obj.target/lwip_decoder/src/lib/jpeg/jquant2.o
  CC(target) Release/obj.target/lwip_decoder/src/lib/png/png.o
  CC(target) Release/obj.target/lwip_decoder/src/lib/png/pngset.o
  CC(target) Release/obj.target/lwip_decoder/src/lib/png/pngget.o
  CC(target) Release/obj.target/lwip_decoder/src/lib/png/pngrutil.o
  CC(target) Release/obj.target/lwip_decoder/src/lib/png/pngtrans.o
  CC(target) Release/obj.target/lwip_decoder/src/lib/png/pngread.o
  CC(target) Release/obj.target/lwip_decoder/src/lib/png/pngwrite.o
  CC(target) Release/obj.target/lwip_decoder/src/lib/png/pngrio.o
  CC(target) Release/obj.target/lwip_decoder/src/lib/png/pngrtran.o
  CC(target) Release/obj.target/lwip_decoder/src/lib/png/pngmem.o
  CC(target) Release/obj.target/lwip_decoder/src/lib/png/pngerror.o
  CC(target) Release/obj.target/lwip_decoder/src/lib/png/pngpread.o
  CC(target) Release/obj.target/lwip_decoder/src/lib/zlib/adler32.o
  CC(target) Release/obj.target/lwip_decoder/src/lib/zlib/crc32.o
  CC(target) Release/obj.target/lwip_decoder/src/lib/zlib/gzlib.o
../src/lib/zlib/gzlib.c: In function ‘gz_open’:
../src/lib/zlib/gzlib.c:14:17: warning: implicit declaration of function ‘lseek’ [-Wimplicit-function-declaration]
 #  define LSEEK lseek
                 ^
../src/lib/zlib/gzlib.c:256:24: note: in expansion of macro ‘LSEEK’
         state->start = LSEEK(state->fd, 0, SEEK_CUR);
                        ^
  CC(target) Release/obj.target/lwip_decoder/src/lib/zlib/gzread.o
../src/lib/zlib/gzread.c: In function ‘gz_load’:
../src/lib/zlib/gzread.c:30:15: warning: implicit declaration of function ‘read’ [-Wimplicit-function-declaration]
         ret = read(state->fd, buf + *have, len - *have);
               ^
../src/lib/zlib/gzread.c: In function ‘gzclose_r’:
../src/lib/zlib/gzread.c:591:11: warning: implicit declaration of function ‘close’ [-Wimplicit-function-declaration]
     ret = close(state->fd);
           ^
  CC(target) Release/obj.target/lwip_decoder/src/lib/zlib/infback.o
  CC(target) Release/obj.target/lwip_decoder/src/lib/zlib/inflate.o
  CC(target) Release/obj.target/lwip_decoder/src/lib/zlib/inftrees.o
  CC(target) Release/obj.target/lwip_decoder/src/lib/zlib/inffast.o
  CC(target) Release/obj.target/lwip_decoder/src/lib/zlib/uncompr.o
  CC(target) Release/obj.target/lwip_decoder/src/lib/zlib/zutil.o
  CC(target) Release/obj.target/lwip_decoder/src/lib/zlib/trees.o
  CC(target) Release/obj.target/lwip_decoder/src/lib/gif/dgif_lib.o
../src/lib/gif/dgif_lib.c: In function ‘DGifOpenFileHandle’:
../src/lib/gif/dgif_lib.c:32:64: warning: signed and unsigned type in conditional expression [-Wsign-compare]
     ((GifFilePrivateType*)_gif->Private)->Read(_gif,_buf,_len) : \
                                                                ^
../src/lib/gif/dgif_lib.c:117:9: note: in expansion of macro ‘READ’
     if (READ(GifFile, (unsigned char *)Buf, GIF_STAMP_LEN) != GIF_STAMP_LEN) {
         ^
../src/lib/gif/dgif_lib.c: In function ‘DGifOpen’:
../src/lib/gif/dgif_lib.c:32:64: warning: signed and unsigned type in conditional expression [-Wsign-compare]
     ((GifFilePrivateType*)_gif->Private)->Read(_gif,_buf,_len) : \
                                                                ^
../src/lib/gif/dgif_lib.c:193:9: note: in expansion of macro ‘READ’
     if (READ(GifFile, (unsigned char *)Buf, GIF_STAMP_LEN) != GIF_STAMP_LEN) {
         ^
../src/lib/gif/dgif_lib.c: In function ‘DGifGetScreenDesc’:
../src/lib/gif/dgif_lib.c:32:64: warning: signed and unsigned type in conditional expression [-Wsign-compare]
     ((GifFilePrivateType*)_gif->Private)->Read(_gif,_buf,_len) : \
                                                                ^
../src/lib/gif/dgif_lib.c:250:9: note: in expansion of macro ‘READ’
     if (READ(GifFile, Buf, 3) != 3) {
         ^
../src/lib/gif/dgif_lib.c:32:64: warning: signed and unsigned type in conditional expression [-Wsign-compare]
     ((GifFilePrivateType*)_gif->Private)->Read(_gif,_buf,_len) : \
                                                                ^
../src/lib/gif/dgif_lib.c:274:17: note: in expansion of macro ‘READ’
             if (READ(GifFile, Buf, 3) != 3) {
                 ^
../src/lib/gif/dgif_lib.c: In function ‘DGifGetRecordType’:
../src/lib/gif/dgif_lib.c:32:64: warning: signed and unsigned type in conditional expression [-Wsign-compare]
     ((GifFilePrivateType*)_gif->Private)->Read(_gif,_buf,_len) : \
                                                                ^
../src/lib/gif/dgif_lib.c:307:9: note: in expansion of macro ‘READ’
     if (READ(GifFile, &Buf, 1) != 1) {
         ^
../src/lib/gif/dgif_lib.c: In function ‘DGifGetImageDesc’:
../src/lib/gif/dgif_lib.c:32:64: warning: signed and unsigned type in conditional expression [-Wsign-compare]
     ((GifFilePrivateType*)_gif->Private)->Read(_gif,_buf,_len) : \
                                                                ^
../src/lib/gif/dgif_lib.c:354:9: note: in expansion of macro ‘READ’
     if (READ(GifFile, Buf, 1) != 1) {
         ^
../src/lib/gif/dgif_lib.c:379:23: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
         for (i = 0; i < GifFile->Image.ColorMap->ColorCount; i++) {
                       ^
../src/lib/gif/dgif_lib.c:32:64: warning: signed and unsigned type in conditional expression [-Wsign-compare]
     ((GifFilePrivateType*)_gif->Private)->Read(_gif,_buf,_len) : \
                                                                ^
../src/lib/gif/dgif_lib.c:381:17: note: in expansion of macro ‘READ’
             if (READ(GifFile, Buf, 3) != 3) {
                 ^
../src/lib/gif/dgif_lib.c: In function ‘DGifGetExtension’:
../src/lib/gif/dgif_lib.c:32:64: warning: signed and unsigned type in conditional expression [-Wsign-compare]
     ((GifFilePrivateType*)_gif->Private)->Read(_gif,_buf,_len) : \
                                                                ^
../src/lib/gif/dgif_lib.c:531:9: note: in expansion of macro ‘READ’
     if (READ(GifFile, &Buf, 1) != 1) {
         ^
../src/lib/gif/dgif_lib.c: In function ‘DGifGetExtensionNext’:
../src/lib/gif/dgif_lib.c:32:64: warning: signed and unsigned type in conditional expression [-Wsign-compare]
     ((GifFilePrivateType*)_gif->Private)->Read(_gif,_buf,_len) : \
                                                                ^
../src/lib/gif/dgif_lib.c:551:9: note: in expansion of macro ‘READ’
     if (READ(GifFile, &Buf, 1) != 1) {
         ^
../src/lib/gif/dgif_lib.c:32:64: warning: signed and unsigned type in conditional expression [-Wsign-compare]
     ((GifFilePrivateType*)_gif->Private)->Read(_gif,_buf,_len) : \
                                                                ^
../src/lib/gif/dgif_lib.c:559:13: note: in expansion of macro ‘READ’
         if (READ(GifFile, &((*Extension)[1]), Buf) != Buf) {
             ^
../src/lib/gif/dgif_lib.c: In function ‘DGifGetWord’:
../src/lib/gif/dgif_lib.c:32:64: warning: signed and unsigned type in conditional expression [-Wsign-compare]
     ((GifFilePrivateType*)_gif->Private)->Read(_gif,_buf,_len) : \
                                                                ^
../src/lib/gif/dgif_lib.c:681:9: note: in expansion of macro ‘READ’
     if (READ(GifFile, c, 2) != 2) {
         ^
../src/lib/gif/dgif_lib.c: In function ‘DGifGetCodeNext’:
../src/lib/gif/dgif_lib.c:32:64: warning: signed and unsigned type in conditional expression [-Wsign-compare]
     ((GifFilePrivateType*)_gif->Private)->Read(_gif,_buf,_len) : \
                                                                ^
../src/lib/gif/dgif_lib.c:726:9: note: in expansion of macro ‘READ’
     if (READ(GifFile, &Buf, 1) != 1) {
         ^
../src/lib/gif/dgif_lib.c:32:64: warning: signed and unsigned type in conditional expression [-Wsign-compare]
     ((GifFilePrivateType*)_gif->Private)->Read(_gif,_buf,_len) : \
                                                                ^
../src/lib/gif/dgif_lib.c:736:13: note: in expansion of macro ‘READ’
         if (READ(GifFile, &((*CodeBlock)[1]), Buf) != Buf) {
             ^
../src/lib/gif/dgif_lib.c: In function ‘DGifSetupDecompress’:
../src/lib/gif/dgif_lib.c:32:64: warning: signed and unsigned type in conditional expression [-Wsign-compare]
     ((GifFilePrivateType*)_gif->Private)->Read(_gif,_buf,_len) : \
                                                                ^
../src/lib/gif/dgif_lib.c:761:9: note: in expansion of macro ‘READ’
     if (READ(GifFile, &CodeSize, 1) < 1) {    /* Read Code size from file. */
         ^
../src/lib/gif/dgif_lib.c: In function ‘DGifBufferedInput’:
../src/lib/gif/dgif_lib.c:32:64: warning: signed and unsigned type in conditional expression [-Wsign-compare]
     ((GifFilePrivateType*)_gif->Private)->Read(_gif,_buf,_len) : \
                                                                ^
../src/lib/gif/dgif_lib.c:1037:13: note: in expansion of macro ‘READ’
         if (READ(GifFile, Buf, 1) != 1) {
             ^
../src/lib/gif/dgif_lib.c:32:64: warning: signed and unsigned type in conditional expression [-Wsign-compare]
     ((GifFilePrivateType*)_gif->Private)->Read(_gif,_buf,_len) : \
                                                                ^
../src/lib/gif/dgif_lib.c:1049:13: note: in expansion of macro ‘READ’
         if (READ(GifFile, &Buf[1], Buf[0]) != Buf[0]) {
             ^
  CC(target) Release/obj.target/lwip_decoder/src/lib/gif/gif_err.o
  CC(target) Release/obj.target/lwip_decoder/src/lib/gif/gifalloc.o
  SOLINK_MODULE(target) Release/obj.target/lwip_decoder.node
  COPY Release/lwip_decoder.node
cp: preserving permissions for ‘Release/lwip_decoder.node’: Operation not permitted
lwip_decoder.target.mk:212: recipe for target 'Release/lwip_decoder.node' failed
make: *** [Release/lwip_decoder.node] Error 1
make: Leaving directory '/srv/myproject/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:276:23)
gyp ERR! stack     at emitTwo (events.js:106:13)
gyp ERR! stack     at ChildProcess.emit (events.js:191:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12)
gyp ERR! System Linux 4.4.0-31-generic
gyp ERR! command "/usr/bin/nodejs" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /srv/myproject/node_modules/lwip
gyp ERR! node -v v6.9.2
gyp ERR! node-gyp -v v3.4.0
gyp ERR! not ok 
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.0.17: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm ERR! Linux 4.4.0-31-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install" "lwip"
npm ERR! node v6.9.2
npm ERR! npm  v4.1.1
npm ERR! code ELIFECYCLE

npm ERR! lwip@0.0.9 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the lwip@0.0.9 install script 'node-gyp rebuild'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, 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 information on how to open an issue for this project with:
npm ERR!     npm bugs lwip
npm ERR! Or if that isn't available, 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!     /srv/myproject/npm-debug.log

Anyone has any clue how to get around this?

Cheers

rshamyan commented 7 years ago

Got same error

rochan commented 7 years ago

This issue could be resolved by installing graphicsmagick locally. See graphicsmagick for more info

apt-get install graphicsmagick