Comments (22)
BTW: the git master version has a new ./configure
script that should be much better at finding libpng, so try that too.
from pngquant-bin.
I'm trying to figure out what is exactly the problem because it stopped working just yesterday, did you change something in the previous days?
Right now is still not working using npm install grunt-contrib-imagemin
from pngquant-bin.
same issue here :-/
from pngquant-bin.
I updated the binaries just the other day, could be that. The build fails because you're missing the libpng-dev
package.
Could you guys tell me that OS etc you're running so I know which binaries thats failing?
from pngquant-bin.
I solved this with npm cache clear
and then re-install
from pngquant-bin.
I solved it with installing libpng
on OSX Mavericks:
brew install libpng
from pngquant-bin.
Same issue here:
> [email protected] postinstall /project/node_modules/grunt-contrib-imagemin/node_modules/imagemin/node_modules/imagemin-pngquant/node_modules/pngquant-bin
> node index.js
✗ pre-build test failed, compiling from source...
✗ Error: Command failed: In file included from pngquant.c:59:
./rwpng.h:35:10: fatal error: 'png.h' file not found
#include "png.h" /* libpng header; includes zlib.h */
^
1 error generated.
make: *** [pngquant.o] Error 1
Broken on OS X and " multiple flavors of linux".
$ npm version
{ http_parser: '1.0',
node: '0.10.28',
v8: '3.14.5.9',
ares: '1.9.0-DEV',
uv: '0.10.27',
zlib: '1.2.3',
modules: '11',
openssl: '1.0.1g',
npm: '1.4.9'}
from pngquant-bin.
On Ubuntu 14.04 and OS X for me:
> [email protected] postinstall /kevva/node_modules/pngquant-bin
> node index.js
✓ pre-build test passed successfully
[email protected] node_modules/pngquant-bin
from pngquant-bin.
@kevva what is your npm version
?
from pngquant-bin.
$ npm version
{ http_parser: '1.0',
node: '0.10.28',
v8: '3.14.5.9',
ares: '1.9.0-DEV',
uv: '0.10.27',
zlib: '1.2.3',
modules: '11',
openssl: '1.0.1g',
npm: '1.4.9' }
from pngquant-bin.
@kevva this issue is coming up all over the place. Seems like a new issue. Might be a regression somewhere.
from pngquant-bin.
same thing on OSX Mavericks...
from pngquant-bin.
thx @cebor! brew install libpng
worked for me as well on OSX Mavericks
from pngquant-bin.
brew install libpng worked for me thanks!
from pngquant-bin.
libpng
is required, which should be mentioned this in README.md
Wasted a lot of time.
from pngquant-bin.
from pngquant-bin.
This issue can be closed by #28.
from pngquant-bin.
Getting same issue on Windows, can someone please suggest how can i solve this issue?
I'm new to Windows programming.
e\pngQ\pngquant\target\release\build\pngquant-55a69f10061d96f2\out\rwpng.o" "/c" "rwpng.c"
pngquant.c
rwpng.c
rwpng.c(15): fatal error C1083: Cannot open include file: 'png.h': No such file or directory
exit code: 0
exit code: 2
from pngquant-bin.
I could solve above problem, but unable to link lpng, below are the errors i got
_error: linking with link.exe
failed: exit code: 1120
error: aborting due to previous error
error: Could not compile pngquant
.
Caused by:
process didn't exit successfully: rustc --crate-name pngquant rust/bin.rs --color always --crate-type bin --emit=dep-info,link -C opt-level=3 -C lto --cfg 'feature="default"' --cfg 'feature="imagequant-sys"' --cfg 'feature="lcms2"' --cfg 'feature="lcms2-sys"' --cfg 'feature="sse"' -C metadata=4085dfdaef35af79 -C extra-filename=-4085dfdaef35af79 --out-dir 'C:\Users\nitin.khobragade\pngQ\pngquant\target\release\deps' -L 'dependency=C:\Users\nitin.khobragade\pngQ\pngquant\target\release\deps' --extern 'getopts=C:\Users\nitin.khobragade\pngQ\pngquant\target\release\deps\libgetopts-4a174400976bd2d0.rlib' --extern 'imagequant_sys=C:\Users\nitin.khobragade\pngQ\pngquant\target\release\deps\libimagequant_sys.rlib' --extern 'lcms2_sys=C:\Users\nitin.khobragade\pngQ\pngquant\target\release\deps\liblcms2_sys-1617ce3af664a50e.rlib' --extern 'libc=C:\Users\nitin.khobragade\pngQ\pngquant\target\release\deps\liblibc-b49f3c440d6ef967.rlib' --extern 'libpng_sys=C:\Users\nitin.khobragade\pngQ\pngquant\target\release\deps\liblibpng_sys-dee7b81072565b74.rlib' --extern 'wild=C:\Users\nitin.khobragade\pngQ\pngquant\target\release\deps\libwild-7244012eee2ea441.rlib' -L 'native=C:\Users\nitin.khobragade\pngQ\pngquant\target\release\build\pngquant-55a69f10061d96f2\out' -l static=pngquant -L 'native=C:\Users\nitin.khobragade\pngQ\pngquant\target\release\build\imagequant-sys-b2df9f7d112a9f35\out' -L 'native=C:\Users\nitin.khobragade\pngQ\pngquant\target\release\build\lcms2-sys-5e8cb0308d84e4d8\out' -L 'native=C:\Users\nitin.khobragade\pngQ\pngquant\target\release\build\libz-sys-acb8facb9bb13cf0\out\build'
(exit code: 1)_
from pngquant-bin.
@ni3bk it looks like you don't have Visual Studio installed, or you have an incomplete/broken installation of libpng (perhaps a 32-bit library exists on a 64-bit machine?).
from pngquant-bin.
@kornelski I have Visual Studio 17 installed on my machine. I've also compiled libpng12 for 'LIB RELEASE' x64. But still I'm getting the errors, not sure what I'm missing.
I've kept the zli.lib and libpng.lib at below location "C:\Users\nitin.khobragade.rustup\toolchains\stable-x86_64-pc-windows-msvc\lib\rustlib\x86_64-pc-windows-msvc\lib"
Below are the logs
error: linking with link.exe failed: exit code: 1120
|
= note: "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.15.26726\bin\HostX64\x64\link.exe" "/NOLOGO" "/NXCOMPAT" "/LIBPATH:C:\Users\nitin.khobragade.rustup\toolchains\stable-x86_64-pc-windows-msvc\lib\rustlib\x86_64-pc-windows-msvc\lib" "C:\Users\nitin.khobragade\pngQ\pngquant\target\release\deps\pngquant-4085dfdaef35af79.pngquant.74hvfhzo-cgu.1.rcgu.o" "/OUT:C:\Users\nitin.khobragade\pngQ\pngquant\target\release\deps\pngquant-4085dfdaef35af79.exe" "/OPT:REF,ICF" "/DEBUG" "/NATVIS:C:\Users\nitin.khobragade.rustup\toolchains\stable-x86_64-pc-windows-msvc\lib\rustlib\etc\intrinsic.natvis" "/NATVIS:C:\Users\nitin.khobragade.rustup\toolchains\stable-x86_64-pc-windows-msvc\lib\rustlib\etc\liballoc.natvis" "/NATVIS:C:\Users\nitin.khobragade.rustup\toolchains\stable-x86_64-pc-windows-msvc\lib\rustlib\etc\libcore.natvis" "/LIBPATH:C:\Users\nitin.khobragade\pngQ\pngquant\target\release\deps" "/LIBPATH:C:\Users\nitin.khobragade\pngQ\pngquant\target\release\build\pngquant-55a69f10061d96f2\out" "/LIBPATH:C:\Users\nitin.khobragade\pngQ\pngquant\target\release\build\imagequant-sys-b2df9f7d112a9f35\out" "/LIBPATH:C:\Users\nitin.khobragade\pngQ\pngquant\target\release\build\lcms2-sys-5e8cb0308d84e4d8\out" "/LIBPATH:C:\Users\nitin.khobragade\pngQ\pngquant\target\release\build\libz-sys-acb8facb9bb13cf0\out\build" "/LIBPATH:C:\Users\nitin.khobragade.rustup\toolchains\stable-x86_64-pc-windows-msvc\lib\rustlib\x86_64-pc-windows-msvc\lib" "pngquant.lib" "C:\Users\NITIN1.KHO\AppData\Local\Temp\rustczqeC2v\liblcms2_sys-1617ce3af664a50e.rlib" "C:\Users\NITIN1.KHO\AppData\Local\Temp\rustczqeC2v\liblibz_sys-6d039f3efbd0bf51.rlib" "C:\Users\NITIN~1.KHO\AppData\Local\Temp\rustczqeC2v\libimagequant_sys.rlib" "C:\Users\nitin.khobragade.rustup\toolchains\stable-x86_64-pc-windows-msvc\lib\rustlib\x86_64-pc-windows-msvc\lib\libcompiler_builtins-5fcb08748623a7c4.rlib" "advapi32.lib" "ws2_32.lib" "userenv.lib" "msvcrt.lib"
= note: pngquant.lib(rwpng.o) : error LNK2019: unresolved external symbol png_create_read_struct referenced in function rwpng_read_image24_libpng
pngquant.lib(rwpng.o) : error LNK2019: unresolved external symbol png_create_write_struct referenced in function rwpng_write_image_init
pngquant.lib(rwpng.o) : error LNK2019: unresolved external symbol png_create_info_struct referenced in function rwpng_read_image24_libpng
from pngquant-bin.
Oh, libpng12 is an old buggy garbage. It's 10 years older than the oldest libpng version that I support.
Try:
cargo clean
set PNG_STATIC=1
cargo build --release
from pngquant-bin.
Related Issues (20)
- Error: v5.0.2@postinstall Response code 500 (Internal Server Error) HOT 3
- This is an error about Windows HOT 2
- improper message HOT 1
- Building on OpenBSD - make should be gmake HOT 1
- Current version can't support super big png, could you update pngquant ? HOT 1
- Error on MacOS pngquant-bin/vendor/pngquant ENOENT HOT 4
- "Unknown system error -86" when building on Apple Silicon HOT 2
- Vulnerability in transitive dependency trim-newlines HOT 3
- Change in license HOT 2
- error while loading shared libraries: libimagequant.so.0: cannot open shared object file: No such file or directory HOT 3
- DeprecationWarning: No "main" or "exports" field defined in the package.json HOT 1
- How to use the already globally installed binaries?
- How to use on electron? HOT 1
- SyntaxError: The requested module 'execa' does not provide an export named 'default'
- Unable to locate package libimagequant-dev HOT 1
- yarn add is broken by pngquant-bin dependency
- Pre-compiled are not statically linked
- Replace bin-wrapper HOT 1
- Support `arm` as a binary target
- ReferenceError: primordials is not defined
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pngquant-bin.