EyalAr / lwip

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

Installation Failed - Build issue #306

Open gjsjy opened 7 years ago

gjsjy commented 7 years ago

Hi,

I have taken care of windows specific installation requirements. initial errors were fixed. But now i am getting this build error.

C:\duel\node_modules\lwip\src\lib\cimg\CImg.h(15385): warning C4319: '~': zero extending 'unsigned long' to 'double' of greater size (compiling source file ..\src\image\paste_worker.cpp) [C:\duel\node_modules\lwip\build\lwip_image.vcxproj]
  C:\duel\node_modules\lwip\src\lib\cimg\CImg.h(15384): note: while compiling class template member function 'double cimg_library::CImg<float>::_cimg_math_parser::mp_bitwise_not(cimg_library::CImg<float>::_cimg_math_parser &)' (compiling source file ..\src\image\paste_worker.cpp)
  C:\duel\node_modules\lwip\src\lib\cimg\CImg.h(14674): note: see reference to function template instantiation 'double cimg_library::CImg<float>::_cimg_math_parser::mp_bitwise_not(cimg_library::CImg<float>::_cimg_math_parser &)' being compiled (compiling source file ..\src\image\paste_worker.cpp)
C:\duel\node_modules\lwip\src\lib\cimg\CImg.h(14673): warning C4319: '~': zero extending 'unsigned long' to 'const double' of greater size (compiling source file ..\src\image\setpixel_worker.cpp) [C:\duel\node_modules\lwip\build\lwip_image.vcxproj]
  C:\duel\node_modules\lwip\src\lib\cimg\CImg.h(14067): note: while compiling class template member function 'unsigned int cimg_library::CImg<float>::_cimg_math_parser::compile(char *,char *,unsigned int *)' (compiling source file ..\src\image\setpixel_worker.cpp)
  C:\duel\node_modules\lwip\src\lib\cimg\CImg.h(14040): note: see reference to function template instantiation 'unsigned int cimg_library::CImg<float>::_cimg_math_parser::compile(char *,char *,unsigned int *)' being compiled (compiling source file ..\src\image\setpixel_worker.cpp)
  C:\duel\node_modules\lwip\src\lib\cimg\CImg.h(17489): note: see reference to class template instantiation 'cimg_library::CImg<float>::_cimg_math_parser' being compiled (compiling source file ..\src\image\setpixel_worker.cpp)
  C:\duel\node_modules\lwip\src\lib\cimg\CImg.h(17478): note: while compiling class template member function 'double cimg_library::CImg<float>::_eval(cimg_library::CImg<float> *const ,const char *const ,const double,const double,const double,const double) const' (compiling source file ..\src\image\setpixel_worker.cpp)
  C:\duel\node_modules\lwip\src\lib\cimg\CImg.h(17474): note: see reference to function template instantiation 'double cimg_library::CImg<float>::_eval(cimg_library::CImg<float> *const ,const char *const ,const double,const double,const double,const double) const' being compiled (compiling source file ..\src\image\setpixel_worker.cpp)
  C:\duel\node_modules\lwip\src\lib\cimg\CImg.h(29155): note: see reference to class template instantiation 'cimg_library::CImg<float>' being compiled (compiling source file ..\src\image\setpixel_worker.cpp)
  C:\duel\node_modules\lwip\src\lib\cimg\CImg.h(51300): note: see reference to class template instantiation 'cimg_library::CImg<char>' being compiled (compiling source file ..\src\image\setpixel_worker.cpp)
C:\duel\node_modules\lwip\src\lib\cimg\CImg.h(15385): warning C4319: '~': zero extending 'unsigned long' to 'double' of greater size (compiling source file ..\src\image\setpixel_worker.cpp) [C:\duel\node_modules\lwip\build\lwip_image.vcxproj]
  C:\duel\node_modules\lwip\src\lib\cimg\CImg.h(15384): note: while compiling class template member function 'double cimg_library::CImg<float>::_cimg_math_parser::mp_bitwise_not(cimg_library::CImg<float>::_cimg_math_parser &)' (compiling source file ..\src\image\setpixel_worker.cpp)
  C:\duel\node_modules\lwip\src\lib\cimg\CImg.h(14674): note: see reference to function template instantiation 'double cimg_library::CImg<float>::_cimg_math_parser::mp_bitwise_not(cimg_library::CImg<float>::_cimg_math_parser &)' being compiled (compiling source file ..\src\image\setpixel_worker.cpp)
     Creating library C:\duel\node_modules\lwip\build\Release\lwip_image.lib and object C:\duel\node_modules\lwip\build\Release\lwip_image.exp
  Generating code
  Finished generating code
  lwip_image.vcxproj -> C:\duel\node_modules\lwip\build\Release\\lwip_image.node
  lwip_image.vcxproj -> C:\duel\node_modules\lwip\build\Release\lwip_image.pdb (Full PDB)
gyp ERR! build error
gyp ERR! stack Error: `C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exe` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onExit (C:\Users\palanicg\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\build.js:258: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 Windows_NT 6.1.7601
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\palanicg\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\duel\node_modules\lwip
gyp ERR! node -v v6.11.0
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
npm ERR! code ELIFECYCLE
npm ERR! errno 1
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.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:

This seems to an issue with build envriornment, can you help me here whats casuing this error?

Sanjiu

Kequc commented 7 years ago

I am getting the following error on linux.

node version 7.10.0 npm version 4.2.0

> node-gyp rebuild

make: Entering directory '/home/kequc/projects/kequc/node_modules/lwip/build'
  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
In file included from ../src/lib/png/png.c:14:0:
../src/lib/png/pngpriv.h:805:4: error: #error ZLIB_VERNUM != PNG_ZLIB_VERNUM "-I (include path) error: see the notes in pngpriv.h"
 #  error ZLIB_VERNUM != PNG_ZLIB_VERNUM \
    ^
lwip_decoder.target.mk:165: recipe for target 'Release/obj.target/lwip_decoder/src/lib/png/png.o' failed
make: *** [Release/obj.target/lwip_decoder/src/lib/png/png.o] Error 1
make: Leaving directory '/home/kequc/projects/kequc/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:194:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12)
gyp ERR! System Linux 4.4.0-83-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/kequc/projects/kequc/node_modules/lwip
gyp ERR! node -v v7.10.0
gyp ERR! node-gyp -v v3.5.0
gyp ERR! not ok 
npm ERR! Linux 4.4.0-83-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install"
npm ERR! node v7.10.0
npm ERR! npm  v4.2.0
npm ERR! code ELIFECYCLE
npm ERR! errno 1

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!     /home/kequc/.npm/_logs/2017-07-14T17_59_26_476Z-debug.log
jatinderbhola commented 7 years ago

Hi @EyalAr Kindly help me in an issue regarding the lwip build. I am trying to update my node version on my local and Heroku but I got stuck with the build error. I am testing following node version and failed in all Node version: 6.11.1, 7.10.1, or 8.1.4

46877 verbose stack Error: lwip@0.0.8 install: `node-gyp rebuild`
46877 verbose stack Exit status 1
46877 verbose stack     at EventEmitter.<anonymous> (C:\Users\Jaish\AppData\Roaming\nvm\v7.10.1\node_modules\npm\lib\utils\lifecycle.js:279:16)
46877 verbose stack     at emitTwo (events.js:106:13)
46877 verbose stack     at EventEmitter.emit (events.js:194:7)
46877 verbose stack     at ChildProcess.<anonymous> (C:\Users\Jaish\AppData\Roaming\nvm\v7.10.1\node_modules\npm\lib\utils\spawn.js:40:14)
46877 verbose stack     at emitTwo (events.js:106:13)
46877 verbose stack     at ChildProcess.emit (events.js:194:7)
46877 verbose stack     at maybeClose (internal/child_process.js:899:16)
46877 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
46878 verbose pkgid lwip@0.0.8
46879 verbose cwd D:\work\rugcopro
46880 error Windows_NT 10.0.15063
46881 error argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install"
46882 error node v7.10.1
46883 error npm  v4.2.0
46884 error code ELIFECYCLE
46885 error errno 1
46886 error lwip@0.0.8 install: `node-gyp rebuild`
46886 error Exit status 1
46887 error Failed at the lwip@0.0.8 install script 'node-gyp rebuild'.
46887 error Make sure you have the latest version of node.js and npm installed.
46887 error If you do, this is most likely a problem with the lwip package,
46887 error not with npm itself.
46887 error Tell the author that this fails on your system:
46887 error     node-gyp rebuild
46887 error You can get information on how to open an issue for this project with:
46887 error     npm bugs lwip
46887 error Or if that isn't available, you can get their info via:
davidpfahler commented 7 years ago

I am running into the same (?) issue. Here is the output:

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

> lwip@0.0.9 install $USER/localhost/excellenteasy/android-splash-generate/node_modules/lwip
> node-gyp rebuild

  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:8:56: warning: ISO C++11 does not allow conversion from string
      literal to 'char *' [-Wwritable-strings]
    _height(0), _channels(0), _trans(false), _metadata("") {
                                                       ^
1 warning generated.
  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
In file included from ../src/lib/png/png.c:14:
../src/lib/png/pngpriv.h:805:4: error: ZLIB_VERNUM != PNG_ZLIB_VERNUM "-I (include path) error: see
      the notes in pngpriv.h"
#  error ZLIB_VERNUM != PNG_ZLIB_VERNUM \
   ^
1 error generated.
make: *** [Release/obj.target/lwip_decoder/src/lib/png/png.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:258:23)
gyp ERR! stack     at emitTwo (events.js:125:13)
gyp ERR! stack     at ChildProcess.emit (events.js:213:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:197:12)
gyp ERR! System Darwin 16.7.0
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd $USER/localhost/excellenteasy/android-splash-generate/node_modules/lwip
gyp ERR! node -v v8.0.0
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok 
npm ERR! code ELIFECYCLE
npm ERR! errno 1
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.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     $USER/.npm/_logs/2017-08-05T06_21_45_228Z-debug.log
TheShashank commented 7 years ago

Same issue

jatinderbhola commented 7 years ago

Try using sharp library.

On Fri, Aug 11, 2017, 6:42 AM SR, notifications@github.com wrote:

Same issue

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/EyalAr/lwip/issues/306#issuecomment-321781294, or mute the thread https://github.com/notifications/unsubscribe-auth/AMLQg8JwmctR4KOigSkdilrnwot675_Sks5sXC_6gaJpZM4OEPX7 .

lucky-newbie commented 6 years ago

i user node 6.10.2, and i met the same problem, how to solve it? try other node version?

antonfjodorov commented 6 years ago

Same issue

Kukiwon commented 6 years ago

same issue here:

In file included from ../src/lib/png/png.c:14:
../src/lib/png/pngpriv.h:805:4: error: ZLIB_VERNUM != PNG_ZLIB_VERNUM "-I (include path) error: see the notes in pngpriv.h"
#  error ZLIB_VERNUM != PNG_ZLIB_VERNUM \
   ^
1 error generated.
m8r1x commented 6 years ago

Has anyone found a workaround for this?

m8r1x commented 6 years ago

Finally got it to install on node -v 6.9.0 & npm -v 3.10.8 But with a shit ton of console warnings. 😁

leslc commented 6 years ago

@m8r1x, thanks. Going back to node 6.9.0 worked for me as well. (with yarn install)

rochan commented 6 years ago

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

softacid commented 6 years ago

@m8r1x didn't worked for me :(

`npm ERR! node v6.9.0 npm ERR! npm v3.10.8 npm ERR! code ELIFECYCLE

npm ERR! lwip@0.0.9 install: node-gyp rebuild npm ERR! Exit status 1 `

m8r1x commented 6 years ago

Hi @softacid Based on what you've provided I think you need to install node-gyp first before proceeding to install lwip.

Vaidas737 commented 6 years ago

@softacid try npm install --save-exact node-gyp@3.6.2 before installing lwip

tom-james-watson commented 6 years ago

This version works - https://github.com/Pajk/lwip

softacid commented 6 years ago

thank you guys .. atm i was downgrading the node version and worked with 4.xx I'll try your sugesstions

8secz-johndpope commented 5 years ago

https://github.com/nvm-sh/nvm nvm install 6.9.0 nvm use 6.9.0

works.