lwip: Failed to install with node7: ZLIB_VERNUM != PNG_ZLIB_VERNUM
Today I tried to install lwip on ubuntu 16.04 and I get this error during the compilation phase:
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
Am I missing something?
About this issue
- Original URL
- State: open
- Created 7 years ago
- Reactions: 78
- Comments: 41
Commits related to this issue
- Support for nvm and npm-cache + other fixes This version now requires `nodejs.version` to be set as a parameter on the build. Due to an issue with LWIP (https://github.com/EyalAr/lwip/issues/297), I'... — committed to GuyPaddock/drupal-teamcity-aegir-ci by deleted user 7 years ago
- Use pajk-lwip instead of lwip library See also https://github.com/EyalAr/lwip/issues/297 — committed to icybin/react-hackathon-board by deleted user 7 years ago
- use pajk-lwip as a temporary workaround for EyalAr/lwip#297 — committed to crafatar/crafatar by jomo 7 years ago
- Remove lwip due to EyalAr/lwip/issues/297 — committed to KuduApps/NodeAppWithNativeNpmModules by ahmelsayed 7 years ago
- use pajk-lwip as a temporary workaround for EyalAr/lwip#297 — committed to vpro/eyeglass-spriting by frenkie 7 years ago
- Use pajk-lwip to fix zlib/libpng error EyalAr/lwip#297 — committed to m1cr0man/m1cr0blog_express by m1cr0man 7 years ago
- Per https://github.com/EyalAr/lwip/issues/297, only support node >= 8. — committed to randytarampi/pseudoimage by randytarampi 6 years ago
- Restrict node version https://github.com/EyalAr/lwip/issues/297#issuecomment-300206001 — committed to hackmdio/emojify.js by Yukaii 5 years ago
- refactor: use gulp.spritesmith-multi Drop 'sprity', use 'gulp.spritesmith-multi'. The plugin 'sprity' is great, but its dependencies are so complicated [1]. > That library can be replaced by the sp... — committed to pzhlkj6612/kitauji-gwent by pzhlkj6612 4 years ago
- refactor: use gulp.spritesmith-multi Drop 'sprity', use 'gulp.spritesmith-multi'. The plugin 'sprity' is great, but its dependencies are so complicated [1]. > That library can be replaced by the sp... — committed to pzhlkj6612/kitauji-gwent by pzhlkj6612 4 years ago
- refactor: use gulp.spritesmith-multi Drop 'sprity', use 'gulp.spritesmith-multi'. The plugin 'sprity' is great, but its dependencies are so complicated [1]. > That library can be replaced by the sp... — committed to pzhlkj6612/kitauji-gwent by pzhlkj6612 4 years ago
- refactor: use gulp.spritesmith-multi Drop 'sprity', use 'gulp.spritesmith-multi'. The plugin 'sprity' is great, but its dependencies are so complicated [1]. > That library can be replaced by the sp... — committed to pzhlkj6612/kitauji-gwent by pzhlkj6612 4 years ago
- refactor: use gulp.spritesmith-multi Drop 'sprity', use 'gulp.spritesmith-multi'. The plugin 'sprity' is great, but its dependencies are so complicated [1]. > That library can be replaced by the sp... — committed to pzhlkj6612/kitauji-gwent by pzhlkj6612 4 years ago
- refactor: use gulp.spritesmith-multi Drop 'sprity', use 'gulp.spritesmith-multi'. The plugin 'sprity' is great, but its dependencies are so complicated [1]. > That library can be replaced by the sp... — committed to pzhlkj6612/kitauji-gwent by pzhlkj6612 4 years ago
- refactor: use gulp.spritesmith-multi Drop 'sprity', use 'gulp.spritesmith-multi'. The plugin 'sprity' is great, but its dependencies are so complicated [1]. > That library can be replaced by the sp... — committed to pzhlkj6612/kitauji-gwent by pzhlkj6612 4 years ago
- refactor: use gulp.spritesmith-multi Drop 'sprity', use 'gulp.spritesmith-multi'. The plugin 'sprity' is great, but its dependencies are so complicated [1]. > That library can be replaced by the sp... — committed to pzhlkj6612/kitauji-gwent by pzhlkj6612 4 years ago
- refactor: use gulp.spritesmith-multi Drop 'sprity', use 'gulp.spritesmith-multi'. The plugin 'sprity' is great, but its dependencies are so complicated [1]. > That library can be replaced by the sp... — committed to pzhlkj6612/kitauji-gwent by pzhlkj6612 4 years ago
- refactor: use gulp.spritesmith-multi Drop 'sprity', use 'gulp.spritesmith-multi'. The plugin 'sprity' is great, but its dependencies are so complicated [1]. > That library can be replaced by the sp... — committed to pzhlkj6612/kitauji-gwent by pzhlkj6612 4 years ago
- refactor: use gulp.spritesmith-multi Drop 'sprity', use 'gulp.spritesmith-multi'. The plugin 'sprity' is great, but its dependencies are so complicated [1]. > That library can be replaced by the sp... — committed to pzhlkj6612/kitauji-gwent by pzhlkj6612 4 years ago
- refactor: use gulp.spritesmith-multi Drop 'sprity', use 'gulp.spritesmith-multi'. The plugin 'sprity' is great, but its dependencies are so complicated [1]. > That library can be replaced by the sp... — committed to pzhlkj6612/kitauji-gwent by pzhlkj6612 4 years ago
I have manually tested a range of Node versions:
Hope this helps someone. Using a Node version manager you can install this using a working version on the same major version as you are currently using, and then after installing it, switch back to latest version of that major version.
P.S. An easier option might be to simply use a image manipulation library written solely in javascript. See below.
– edit on July 19: added Node versions used in Meteor edit on Nov 3: added comment to a patch to replace with
jimp
Finally I solve my problem replacing
lwip
forpajk-lwip
.I have the exact same error using lwip v0.0.9 with Node v6.10.2 and npm version 4.4.4. I can’t understand what is wrong.
+1 in node 7, In node 6 works fine! Thanks @ajuste
For the benefit of anyone else in search of a solution, your best bet may be to give jimp a try. It has a similar (and sometimes simpler) API, with zero external dependencies, so no more struggling with node-gyp.
https://www.npmjs.com/package/jimp
It works also in version 6.10.1 or less. The problem is in version 6.10.2.
I have this issue in node 6.10.2
Hello from 2020 where this issue is still actual
This issue could be resolved by installing graphicsmagick locally. See graphicsmagick for more info
the matching zlib is included from my local node-gyp version (there are different node-gyp version in %USERPROFILE%/./node-gyp . The node-gyp version 4.4.2 has the right ZLIB_VERNUM=0x1280 in zlib.h. I could solve the problem by specficing a target version for node-gyp via commandline: SET NPM_CONFIG_TARGET=v4.4.2 npm config set target=v4.4.2 --global npm install --global sprity
@edittler save my day. Have macOS 10.12.4 and I’m able to install it without error using node v6.0.0, but get the same error on node v6.10.2 and v.7.8.0.
If you are using it on
sprity-lwip
extension I’ve done this extension https://github.com/xcaliber-tech/sprity-jimp using jimp insteadv7.9.0 ~/home/slava/.node-gyp/7.9.0/include/node/zlib.h
#define ZLIB_VERSION "1.2.11"
#define ZLIB_VERNUM 0x12b0
#define ZLIB_VER_REVISION 11
#define ZLIB_VERNUM 0x12b0 v6.9.1#define ZLIB_VERSION "1.2.8"
#define ZLIB_VERNUM 0x1280
#define ZLIB_VER_REVISION 8
#define ZLIB_VERNUM 0x1280lwip/src/decoder/pnglibconf.h
#define PNG_ZLIB_VERNUM 0x1280
lwip/src/lib/png/pngpriv.h
if PNG_ZLIB_VERNUM != 0 && PNG_ZLIB_VERNUM != ZLIB_VERNUM error ZLIB_VERNUM != PNG_ZLIB_VERNUM \ "-I (include path) error: see the notes in pngpriv.h"
If you change the version of zlib to 0x12b0 in pnglibconf.h, then the project is compiled. And the tests are executed without errors.
It works, but it’s not right … Probably you need to connect the zlib directory from the project instead of the node directory.
Changing the
lwip
version inpackage.json
to the development branch of this package solved the issue in Node v6.10.2:Change the use of version
0.0.9
tohttps://github.com/Pajk/lwip#development
Node 7.4 and earlier is also working for me, 7.8 not. Haven’t tried other versions in between, yet.
Hello from 2023
Ok so for anyone having the same issues on Osx and having problems figuring this issue out with homebrew.
I’m on OSX and using brew to manage my packages but that didn’t work, I switched to NVM. Here is what I did:
I uninstalled Node from Brew because it only allows you to install: node@4, node@6, node@8 and a few others.
Then I installed NPM (node package manager) and pulled in Node 7.5.0 as suggested by @fatso83 with: nvm install v7.5.0
Just a follow up to my comment above: if all you care about is actually getting your image manipulation working in a short amount of time, you could just replace
lwip
with the pure-jsjimp
library. This will avoid all the noise fromnode-gyp
forever.jimp
has almost the same API, and my entire diff was like this:Click to display diff
Ok, so I updated to node 8.11.1 on Windows so that I could get lwip to compile with Visual Studio 2017, only to find that now while the compiler gets invoked, there is this error…
@fatso83, thanks for posting results for different node-versions! This saved me lots of time!
Hi,
Waiting for a new version of this lib too. I have the same probleme with the last version of node 6
+1