You are not logged in.

#1 2010-03-05 01:36:17

j2902
Member
Registered: 2009-12-21
Posts: 20

[solved] Phun and libpng

I hope this is the right forum, but here goes anyways.

I installed phun from the aur and am getting these errors:

$ phun
workdir =  /opt/Phun/
libpng warning: Application was compiled with png.h from libpng-1.4.0
libpng warning: Application  is  running with png.c from libpng-1.2.40
libpng error: Incompatible libpng version in application and library
!! ERROR: Failed to load image "/opt/Phun/data/textures/gui/4px.png" from data. SDL_image error: "Couldn't allocate memory for PNG file or incompatible PNG dll"

libpng warning: Application was compiled with png.h from libpng-1.4.0
libpng warning: Application  is  running with png.c from libpng-1.2.40
libpng error: Incompatible libpng version in application and library

!! ERROR: Failed to close zip archive: Failure to create temporary file: Permission denied

Now, I know this deals with shared libraries, but am rather clueless on how to fix it.

Thanks.

Last edited by j2902 (2010-03-05 04:14:36)

Offline

#2 2010-03-05 03:40:11

my0pic
Member
From: Melbourne, Australia
Registered: 2008-05-23
Posts: 206

Re: [solved] Phun and libpng

A simple pacman -Suy will update your system to use libpng-1.4. Then install phun from aur.

Offline

#3 2010-03-05 03:58:17

j2902
Member
Registered: 2009-12-21
Posts: 20

Re: [solved] Phun and libpng

I removed phun (pacman -Rns phun), updated my system (pacman -Syu), and reinstalled phun from the aur.  I got the same error.

I do not believe I am recompiling phun when I'm installing it -- I don't think it's even possible for me to recompile, because it's closed source (which would fix the libpng error).

Offline

#4 2010-03-05 04:14:21

j2902
Member
Registered: 2009-12-21
Posts: 20

Re: [solved] Phun and libpng

So phun depends on libpng.so.3 (which I believe is a 1.2 library, even though it says it requires 1.4).  Chromium also depends on libpng.so.3, so I had it installed (which is why phun wasn't saying it was missing the library).

However, libpng.so.3 from version 1.2 of libpng is incompatible with phun.  A symlink did the trick.

cd /usr/lib
mv libpng.so.3 libpng.so.3.old
ln -s libpng.so libpng.so.3

This fixes phun, and chromium seems to work (the only other program that I have that depends on libpng.so.3, aka libpng 1.2)

Offline

#5 2010-03-05 07:32:34

wonder
Developer
From: Bucharest, Romania
Registered: 2006-07-05
Posts: 5,941
Website

Re: [solved] Phun and libpng

j2902 wrote:

So phun depends on libpng.so.3 (which I believe is a 1.2 library, even though it says it requires 1.4).  Chromium also depends on libpng.so.3, so I had it installed (which is why phun wasn't saying it was missing the library).

However, libpng.so.3 from version 1.2 of libpng is incompatible with phun.  A symlink did the trick.

cd /usr/lib
mv libpng.so.3 libpng.so.3.old
ln -s libpng.so libpng.so.3

This fixes phun, and chromium seems to work (the only other program that I have that depends on libpng.so.3, aka libpng 1.2)

this kind of "workarounds" are wrong and because of that maybe you have this kind of problems. the proper way is for chromium to use chromium from extra and for the other closed source app to use libpng12 from aur.

Last edited by wonder (2010-03-05 08:16:07)


Give what you have. To someone, it may be better than you dare to think.

Offline

#6 2010-03-05 17:40:45

j2902
Member
Registered: 2009-12-21
Posts: 20

Re: [solved] Phun and libpng

Yes, I know.  It's just chromium from extra lacks features I want (eg, bookmark syncing).

Offline

#7 2010-03-05 17:43:01

wonder
Developer
From: Bucharest, Romania
Registered: 2006-07-05
Posts: 5,941
Website

Re: [solved] Phun and libpng

j2902 wrote:

Yes, I know.  It's just chromium from extra lacks features I want (eg, bookmark syncing).

fals. chromium from extra has bookmark syncing for a long time.


Give what you have. To someone, it may be better than you dare to think.

Offline

#8 2010-03-29 10:37:54

bananaoomarang
Member
Registered: 2009-10-29
Posts: 180

Re: [solved] Phun and libpng

I tried that for phun and it worked but why do I have to do it every startup? Can I put it in a script or is there a better fix because this seems kind of wrong.

Offline

#9 2010-03-29 13:40:28

Cdh
Member
Registered: 2009-02-03
Posts: 1,098

Re: [solved] Phun and libpng

wonder wrote:

and for the other closed source app to use libpng12 from aur.

The problem was not described so clearly.

Phun needs the libpng 1.4.
But it uses the libpng.so.3 which is in the libpng 1.2 package.
The error comes from phun expecting libpng.so.3 being the libpng 1.4 library while it really is the libpng 1.2.

chris@chrispc ~ % LC_ALL=C pacman -Qo /usr/lib/libpng.so.3
/usr/lib/libpng.so.3 is owned by libpng12 1.2.40-1
chris@chrispc ~ % LC_ALL=C pacman -Qo /usr/lib/libpng.so
/usr/lib/libpng.so is owned by libpng 1.4.1-1
chris@chrispc ~ %

The right way would be forcing phun to use libpng.so instead of libpng.so.3, I would say. But how do you do that? Is there some way to control this by system variables or would you need to patch the binary (that would be really ugly)?


฿ 18PRsqbZCrwPUrVnJe1BZvza7bwSDbpxZz

Offline

#10 2010-04-01 12:26:03

bananaoomarang
Member
Registered: 2009-10-29
Posts: 180

Re: [solved] Phun and libpng

I don't have any clue whatsoever of how to do that. Is tis a problem distro wide? It has to be only arch right? Otherwise algodoo (which is the commercial product phun turned into) wouldn't have this problem. If it is just looking for a specific library can't I just put it in the right place or symlink it. I have to do that symlinking thing everytime I boot up. Why? Putting it in a startup script would be ugly but I suppose I could do that if there is no other prettier fix.

Offline

Board footer

Powered by FluxBB