[Solved] Don't make a mess with libpng.

Post Reply
Zizo
Posts: 4
Joined: Thu Jul 01, 2010 7:43 pm

[Solved] Don't make a mess with libpng.

Post by Zizo »

Hello,
I'm shocked about your way to manage missing libraries, especially libpng:

Code: Select all

if [ -e /usr/lib/libpng14.so -a ! -e /usr/lib/libpng12.so.0 ] ; then
	ln -s /usr/lib/libpng14.so /usr/lib/libpng12.so.0
fi
if [ -e /usr/lib64/libpng14.so -a ! -e /usr/lib64/libpng12.so.0 ] ; then
	ln -s /usr/lib64/libpng14.so /usr/lib64/libpng12.so.0
fi
Are you crazy?! Am I really paying for this?

Please find a way to fix it, or simply switch to libpng14 and release a legacy version with libpng12.

Thanks.
Last edited by Zizo on Sun Jul 18, 2010 9:10 pm, edited 1 time in total.
zedonet
Site Admin
Posts: 2156
Joined: Fri Oct 06, 2006 8:02 am

Post by zedonet »

Hello,

thank you for your feedback!

It is absolutely normal under Linux to have symbolic links from older library versions to backward compatible newer versions - if you look into /usr/lib you will see dozens such links.
Otherwise it would be almost impossible to install any binary that hasn't been specifically compiled for the specific Linux version.

I agree that it is not very good to add such a link from a software installer. However this specific symbolic link is safe and has been suggested in many forums as you can see by searching on the web for

"ln -s /usr/lib/libpng14.so"
Zizo
Posts: 4
Joined: Thu Jul 01, 2010 7:43 pm

Post by Zizo »

Maybe this is the default behaviour of a low level debian based distro, but this doesn't mean that it is the good way do to such a thing.
If you are so much in love with links between different versions you should be able to do the opposite thing:

Code: Select all

if [ -e /usr/lib/libpng12.so -a ! -e /usr/lib/libpng14.so.0 ] ; then
   ln -s /usr/lib/libpng12.so /usr/lib/libpng14.so.0
fi
if [ -e /usr/lib64/libpng12.so -a ! -e /usr/lib64/libpng14.so.0 ] ; then
   ln -s /usr/lib64/libpng12.so /usr/lib64/libpng14.so.0
fi
P.S.: I don't have any of the links you are talking about, i'm with gentoo linux.
Zizo
Posts: 4
Joined: Thu Jul 01, 2010 7:43 pm

Post by Zizo »

turboprint 2.16-1 Chagelog wrote:- libpng12 dependency removed
Thanks.

EDIT: Gimp's plugin main file "gpturboprint" still require libpng12. Can you fix it too? Thanks in advance.
zedonet
Site Admin
Posts: 2156
Joined: Fri Oct 06, 2006 8:02 am

Post by zedonet »

Thank you for the hint - I will do that.

The dependency on libpng is an indirect one, so it is possible to avoid the symbolic link!
Zizo
Posts: 4
Joined: Thu Jul 01, 2010 7:43 pm

Post by Zizo »

Thanks for your efforts. I really appreciated them and I'll wait 2.16-2 for the dependencies fix.

Regards, Luca.
Post Reply