Giter VIP home page Giter VIP logo

Comments (22)

kornelski avatar kornelski commented on July 20, 2024

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.

mtt87 avatar mtt87 commented on July 20, 2024

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.

iharosi avatar iharosi commented on July 20, 2024

same issue here :-/

from pngquant-bin.

kevva avatar kevva commented on July 20, 2024

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.

mtt87 avatar mtt87 commented on July 20, 2024

I solved this with npm cache clear and then re-install

from pngquant-bin.

cebor avatar cebor commented on July 20, 2024

I solved it with installing libpng on OSX Mavericks:

brew install libpng

from pngquant-bin.

vladikoff avatar vladikoff commented on July 20, 2024

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.

kevva avatar kevva commented on July 20, 2024

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.

vladikoff avatar vladikoff commented on July 20, 2024

@kevva what is your npm version ?

from pngquant-bin.

kevva avatar kevva commented on July 20, 2024
$ 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.

sindresorhus avatar sindresorhus commented on July 20, 2024

@kevva this issue is coming up all over the place. Seems like a new issue. Might be a regression somewhere.

google/WebFundamentals#513

from pngquant-bin.

corydorning avatar corydorning commented on July 20, 2024

same thing on OSX Mavericks...

from pngquant-bin.

corydorning avatar corydorning commented on July 20, 2024

thx @cebor! brew install libpng worked for me as well on OSX Mavericks

from pngquant-bin.

Charlie610790 avatar Charlie610790 commented on July 20, 2024

brew install libpng worked for me thanks!

from pngquant-bin.

RobinQu avatar RobinQu commented on July 20, 2024

libpng is required, which should be mentioned this in README.md

Wasted a lot of time.

from pngquant-bin.

kornelski avatar kornelski commented on July 20, 2024

@RobinQu Updated readme #27

from pngquant-bin.

shinnn avatar shinnn commented on July 20, 2024

This issue can be closed by #28.

from pngquant-bin.

ni3bk avatar ni3bk commented on July 20, 2024

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.

ni3bk avatar ni3bk commented on July 20, 2024

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.

kornelski avatar kornelski commented on July 20, 2024

@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.

ni3bk avatar ni3bk commented on July 20, 2024

@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.

kornelski avatar kornelski commented on July 20, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.