Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

libjpeg and libpng version problem #77

Open
chensivan opened this issue Nov 5, 2017 · 3 comments
Open

libjpeg and libpng version problem #77

chensivan opened this issue Nov 5, 2017 · 3 comments

Comments

@chensivan
Copy link

I'm running to an issue where the version of the packages are just not right. I ran

th run_model.lua -input_image imgs/test.png -gpu -1

It says:

libpng warning: Application built with libpng-1.4.12 but running with 1.6.34
/Users/yanchenm/torch/install/bin/lua: /Users/yanchenm/torch/install/share/lua/5.2/image/init.lua:156: [read_png] png_create_read_struct failed
stack traceback:
	[C]: in function 'load'
	/Users/yanchenm/torch/install/share/lua/5.2/image/init.lua:156: in function 'loader'
	/Users/yanchenm/torch/install/share/lua/5.2/image/init.lua:388: in function 'load'
	run_model.lua:67: in function 'run_image'
	run_model.lua:164: in main chunk
	[C]: in function 'dofile'
	...henm/torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:150: in main chunk
	[C]: in ?

And if I used .jpg

th run_model.lua -input_image imgs/elephant.jpg -gpu -1

/Users/yanchenm/torch/install/bin/lua: /Users/yanchenm/torch/install/share/lua/5.2/image/init.lua:235: Wrong JPEG library version: library is 90, caller expects 80
stack traceback:
	[C]: in function 'load'
	/Users/yanchenm/torch/install/share/lua/5.2/image/init.lua:235: in function 'loader'
	/Users/yanchenm/torch/install/share/lua/5.2/image/init.lua:388: in function 'load'
	run_model.lua:67: in function 'run_image'
	run_model.lua:164: in main chunk
	[C]: in function 'dofile'
	...henm/torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:150: in main chunk
	[C]: in ?

I've tried to uninstall libjpeg and libpng, and also had libjpeg8d (with 9 and w/o), and libpng1.4.12 (with 1.6 and w/o) copied in the same location. I tried both lua5.2, 5.3.

I'm using MacOS 10.12.6. Please help!

@sabpap
Copy link

sabpap commented Dec 11, 2017

Did you find any solution??
same issue here..

@noamlerner
Copy link

Found a solution, albeit kinda hacky
first i removed all libpng files from my computer
brew uninstall libpng' found the rest using find /usr/ /Library/ /opt/ /lib/ -iname "libpng*.dylib" 2>/dev/nullmanually runningrm` on the results.

Then i followed the instructions here to install libpng 1.4.12
http://mac-dev-env.patrickbougie.com/libpng/
and created my own symlinks.
The symlinks created on that website arent the right ones.
To find the right ones I reinstalled libpng using homebrew
brew install libpng
and saw replaced all the symlinks it created. The symlinks should be in /usr/local/lib/

@Jason-xin
Copy link

the same question, and many methods have tried but no one succeed... TAT

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants