You are not logged in.

#1 2011-03-26 15:49:23

vizipok
Member
Registered: 2011-03-26
Posts: 23

libpng trouble [SOLVED]

I got into a serious trouble with libpng, what causes that all my qt apps unable to start. (I know, there are several topics in this forum about the libpng upgrade near february 2010, but now it's an other problem.)

How did it happen? I wanted to install something from aur, what needed libpng12. So i downloaded also libpng12 from aur, and compiled it. Then i tried to install libpng12, but there were a file conflict: /opt/dropbox/libpng12.so.0 existed on my filesystem. I thoght that dropbox is not important for me, and i did the mistake here, i installed libpng by pacman -Uf.

Ok, after that all the qt apps die after start, with error messages like this:

libpng warning: Application was compiled with png.h from libpng-1.2.27
libpng warning: Application  is  running with png.c from libpng-1.4.5
libpng warning: Incompatible libpng version in application and library
texmaker: symbol lookup error: texmaker: undefined symbol: _ZN9QListData11detach_growEPii

or:

kate: symbol lookup error: /usr/lib/libkdecore.so.5: undefined symbol: _ZN9QListData11detach_growEPii

I tried to remove libpng12, reinstall libpng from the repos, and after reinstall all other packages seems to be related to them, and finally i reinstalled all the packages on my system. If libpng12 has been removed, the error messages changes to this:

texmaker: error while loading shared libraries: libpng.so.3: cannot open shared object file: No such file or directory

(How is it, that texmaker from the official repository, looking for a file from a package installed from aur?)

My /usr/lib contains the following, if libpng12 installed:

-rw-r--r-- 1 root root 179316 Mar 25 13:41 /usr/lib/libpng12.a
lrwxrwxrwx 1 root root     18 Mar 25 13:41 /usr/lib/libpng12.so -> libpng12.so.0.27.0
lrwxrwxrwx 1 root root     18 Mar 25 13:41 /usr/lib/libpng12.so.0 -> libpng12.so.0.27.0
-rwxr-xr-x 1 root root 141464 Mar 25 13:41 /usr/lib/libpng12.so.0.27.0
-rw-r--r-- 1 root root 190896 Dec 22 15:18 /usr/lib/libpng14.a
lrwxrwxrwx 1 root root     18 Dec 22 15:18 /usr/lib/libpng14.so -> libpng14.so.14.5.0
lrwxrwxrwx 1 root root     18 Dec 22 15:18 /usr/lib/libpng14.so.14 -> libpng14.so.14.5.0
-rwxr-xr-x 1 root root 153564 Dec 22 15:18 /usr/lib/libpng14.so.14.5.0
lrwxrwxrwx 1 root root     10 Dec 22 15:18 /usr/lib/libpng.a -> libpng14.a
lrwxrwxrwx 1 root root     11 Dec 22 15:18 /usr/lib/libpng.so -> libpng14.so
lrwxrwxrwx 1 root root     16 Mar 25 13:41 /usr/lib/libpng.so.3 -> libpng.so.3.27.0
-rwxr-xr-x 1 root root 150376 Mar 25 13:41 /usr/lib/libpng.so.3.27.0

What is the real cause of this problem? Is there any way to restore the situation preceding my wrong libpng12 install?

Last edited by vizipok (2011-03-27 14:59:00)

Offline

#2 2011-03-26 16:44:01

skottish
Forum Fellow
From: Here
Registered: 2006-06-16
Posts: 7,942

Re: libpng trouble [SOLVED]

If you're system is fully up to date, you shouldn't have any problems with programs in the official repos linking to libpng.so.3. This is all that you should see from these repos currently:

-rw-r--r--  1 root root   258348 Dec 22 06:19 libpng14.a
lrwxrwxrwx  1 root root       18 Dec 22 06:19 libpng14.so -> libpng14.so.14.5.0
lrwxrwxrwx  1 root root       18 Dec 22 06:19 libpng14.so.14 -> libpng14.so.14.5.0
-rwxr-xr-x  1 root root   168632 Dec 22 06:19 libpng14.so.14.5.0
lrwxrwxrwx  1 root root       10 Dec 22 06:19 libpng.a -> libpng14.a
lrwxrwxrwx  1 root root       11 Dec 22 06:19 libpng.so -> libpng14.so

Offline

#3 2011-03-26 17:35:37

vizipok
Member
Registered: 2011-03-26
Posts: 23

Re: libpng trouble [SOLVED]

I did a pacman -Syu immediately before the libpng12 install. And now, i did once again, and it upgraded qt3, qt, poppler, poppler-qt. But nothing changed. Now everything is up to date, and i get this error message:

texmaker: error while loading shared libraries: libpng.so.3: cannot open shared object file: No such file or directory

Actually, the libpng files are the following at my system:

-rw-r--r-- 1 root root 190896 Dec 22 15:18 /usr/lib/libpng14.a
lrwxrwxrwx 1 root root     18 Dec 22 15:18 /usr/lib/libpng14.so -> libpng14.so.14.5.0
lrwxrwxrwx 1 root root     18 Dec 22 15:18 /usr/lib/libpng14.so.14 -> libpng14.so.14.5.0
-rwxr-xr-x 1 root root 153564 Dec 22 15:18 /usr/lib/libpng14.so.14.5.0
lrwxrwxrwx 1 root root     10 Dec 22 15:18 /usr/lib/libpng.a -> libpng14.a
lrwxrwxrwx 1 root root     11 Dec 22 15:18 /usr/lib/libpng.so -> libpng14.so

I don't understand, how is it possible.

Offline

#4 2011-03-26 20:25:49

skottish
Forum Fellow
From: Here
Registered: 2006-06-16
Posts: 7,942

Re: libpng trouble [SOLVED]

I don't normally run most of that software, but I installed QT and texmaker and it starts fine. What's the output of:

pacman -Qi texmaker

Offline

#5 2011-03-26 20:54:54

vizipok
Member
Registered: 2011-03-26
Posts: 23

Re: libpng trouble [SOLVED]

here it is:

# pacman -Qi texmaker
Name           : texmaker
Version        : 2.3-1
URL            : http://www.xm1math.net/texmaker/index.html
Licences       : GPL
Groups         : None
Provides       : None
Depends On     : poppler-qt  ghostscript  openssl
Optional Deps  : None
Required By    : None
Conflicts With : None
Replaces       : None
Installed Size : 12832.00 K
Packager       : Thomas Dziedzic < gostrc at gmail >
Architecture   : i686
Build Date     : Tue 15 Mar 2011 18:08:13 CET
Install Date   : Sat 26 Mar 2011 18:29:50 CET
Install Reason : Explicitly installed
Install Script : No
Description    : Free cross-platform latex editor

and it looks for two versions of libpng:

# ldd -v texmaker | grep libpng
    libpng14.so.14 => /usr/lib/libpng14.so.14 (0xb51f1000)
    libpng.so.3 => not found
        libpng14.so.14 (PNG14_0) => /usr/lib/libpng14.so.14
    /usr/lib/libpng14.so.14:

Offline

#6 2011-03-26 21:03:56

skottish
Forum Fellow
From: Here
Registered: 2006-06-16
Posts: 7,942

Re: libpng trouble [SOLVED]

That's really strange. I'm far from being an expert at linkers and linking (read: clueless), so no help there. Maybe removing texmaker from /var/cache/pacman/pkg and force re-installing it with the -Sf switch will fix it up.

Last edited by skottish (2011-03-26 21:05:35)

Offline

#7 2011-03-26 22:53:03

Snowman
Developer/Forum Fellow
From: Montreal, Canada
Registered: 2004-08-20
Posts: 5,212

Re: libpng trouble [SOLVED]

ldd checks the dependency tree so the problem might be with a texmaker depends. Instead, post the output of :
readelf -d /usr/bin/texmaker

Offline

#8 2011-03-27 00:59:57

vizipok
Member
Registered: 2011-03-26
Posts: 23

Re: libpng trouble [SOLVED]

I tried the reinstallation, what skottish proposed, but no result.

Here is the output:

# readelf -d /usr/bin/texmaker

Dynamic section at offset 0x227034 contains 31 entries:
  Tag        Type                         Name/Value
 0x00000001 (NEEDED)                     Shared library: [libpoppler-qt4.so.3]
 0x00000001 (NEEDED)                     Shared library: [libz.so.1]
 0x00000001 (NEEDED)                     Shared library: [libQtWebKit.so.4]
 0x00000001 (NEEDED)                     Shared library: [libQtXml.so.4]
 0x00000001 (NEEDED)                     Shared library: [libQtGui.so.4]
 0x00000001 (NEEDED)                     Shared library: [libQtNetwork.so.4]
 0x00000001 (NEEDED)                     Shared library: [libQtCore.so.4]
 0x00000001 (NEEDED)                     Shared library: [libpthread.so.0]
 0x00000001 (NEEDED)                     Shared library: [libstdc++.so.6]
 0x00000001 (NEEDED)                     Shared library: [libm.so.6]
 0x00000001 (NEEDED)                     Shared library: [libgcc_s.so.1]
 0x00000001 (NEEDED)                     Shared library: [libc.so.6]
 0x0000000c (INIT)                       0x805e784
 0x0000000d (FINI)                       0x8199a0c
 0x6ffffef5 (GNU_HASH)                   0x8048168
 0x00000005 (STRTAB)                     0x804ecf4
 0x00000006 (SYMTAB)                     0x80493a4
 0x0000000a (STRSZ)                      49835 (bytes)
 0x0000000b (SYMENT)                     16 (bytes)
 0x00000015 (DEBUG)                      0x0
 0x00000003 (PLTGOT)                     0x826f158
 0x00000002 (PLTRELSZ)                   10792 (bytes)
 0x00000014 (PLTREL)                     REL
 0x00000017 (JMPREL)                     0x805bd5c
 0x00000011 (REL)                        0x805bb9c
 0x00000012 (RELSZ)                      448 (bytes)
 0x00000013 (RELENT)                     8 (bytes)
 0x6ffffffe (VERNEED)                    0x805bacc
 0x6fffffff (VERNEEDNUM)                 5
 0x6ffffff0 (VERSYM)                     0x805afa0
 0x00000000 (NULL)                       0x0

And the problem occurs not only with texmaker, but all kde apps.
I run the following script, to find which libraries requires libpng.so.3:

for lib in `ls /lib/ | grep so`; 
do 
if [[ `readelf -d /lib/$lib | grep libpng.so.3`"" != "" ]]; 
then echo $lib; 
fi 
done

The result is this four:

libMendeley.so
libMendeley.so.0.9
libMendeley.so.0.9.8.2
libQtGui.so.4

The fourth is interesting, because all kde libraries (it means dozens of libs and apps) depending on libQtGui.so.4. I could provide libpng.so.3 for them, from the libpng12 package from aur. But it's not a normal way, because the qt is from the repos, and that libpng isn't good for them: it gives error like this:

kate: symbol lookup error: /usr/lib/libkdecore.so.5: undefined symbol: _ZN9QListData11detach_growEPii

Offline

#9 2011-03-27 14:58:17

vizipok
Member
Registered: 2011-03-26
Posts: 23

Re: libpng trouble [SOLVED]

I was thinking about the things i found yesterday. Then i realised, that two copies of libQtGui.so.4 exist on my system:

/lib/libQtGui.so.4
/usr/lib/libQtGui.so.4

Latter owned by qt 4.7, and requires libpng14, former owned by no package, and requires libpng12.

So i removed all the libQt files from /lib, and the problem solved: all qt apps, including texmaker now running fine!

mv /lib/libQt* /some/other/dir

Thanks for all replies!

Offline

#10 2012-11-01 10:12:03

c00ki
Member
Registered: 2012-04-23
Posts: 4

Re: libpng trouble [SOLVED]

vizipok wrote:

I was thinking about the things i found yesterday. Then i realised, that two copies of libQtGui.so.4 exist on my system:

/lib/libQtGui.so.4
/usr/lib/libQtGui.so.4

Latter owned by qt 4.7, and requires libpng14, former owned by no package, and requires libpng12.

So i removed all the libQt files from /lib, and the problem solved: all qt apps, including texmaker now running fine!

mv /lib/libQt* /some/other/dir

Thanks for all replies!


thanks!

what worked on my machine was simply

 cd /usr/lib
 ln -s libpoppler-qt4.so libpoppler-qt4.so.3

Offline

#11 2012-11-01 10:59:00

WorMzy
Forum Moderator
From: Scotland
Registered: 2010-06-16
Posts: 11,787
Website

Re: libpng trouble [SOLVED]

That is not a solution. If you have AUR apps that need rebuilding, rebuild them. If you've having problems with apps in the official repos, make sure you have an up-to-date system. If you have an up-to-date system and still have problems with an application in the official repos, file a bug report; it's possible that someone forgot to rebuild it.

Also, please don't necrobump.


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Online

#12 2012-11-01 12:54:14

fsckd
Forum Fellow
Registered: 2009-06-15
Posts: 4,173

Re: libpng trouble [SOLVED]

As WorMzy said, please do not bump old threads. Closing.


aur S & M :: forum rules :: Community Ethos
Resources for Women, POC, LGBT*, and allies

Offline

Board footer

Powered by FluxBB