Bug 95582

Summary: link failure, -lpng missing in kioslave
Product: [Applications] digikam Reporter: Rex Dieter <rdieter>
Component: Database-AlbumsAssignee: Digikam Developers <digikam-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: caulier.gilles
Priority: NOR    
Version: 0.7.1   
Target Milestone: ---   
Platform: RedHat Enterprise Linux   
OS: Linux   
Latest Commit: Version Fixed In: 5.7.0
Attachments: add -lpng to kio_digikamthumbnail_la_LIBADD

Description Rex Dieter 2004-12-21 14:37:12 UTC
Version:           0.7.1-beta2 (using KDE KDE 3.3.2)
Installed from:    RedHat RPMs
Compiler:          gcc-3.2.2 
OS:                Linux

Making all in kioslave
 make[4]: Entering directory 
 `/usr/local/tmp/BUILD/digikam-0.7.1-beta2/digikam/kiosla
 ve"
 /bin/sh ../../libtool --silent --mode=link --tag=CXX g++  -DNDEBUG 
 -DNO_DEBUG -O2 -fno-exceptions -fno-check-new -fno-common 
 -DQT_CLEAN_NAMESPACE -o kio_digikamthumbnail.la -rpath /usr/lib/kde3 -module 
 -avoid-version -L/usr/lib -L/usr/lib/qt-3.3/lib -L/usr/X11R6/lib  -Wl,--enable-new-dtags 
 -avoid-version -module -no-undefined -Wl,--no-undefined -Wl,--allow-shlib-undefined 
 -L/usr/lib -lImlib2 -lfreetype -lz -lm -ldl -lXext -lXext -lX11 -L/usr/X11R6/lib 
 -lkexif   digikamthumbnail.lo -lkio -ljpeg
 .libs/digikamthumbnail.o(.text+0x9ab): In function `loadPNG(QString 
 const&)":: undefined reference to `png_check_sig"
 
(and lots more undefined references to png_* symbols)
Comment 1 Rex Dieter 2004-12-21 14:39:00 UTC
Created attachment 8747 [details]
add -lpng to kio_digikamthumbnail_la_LIBADD
Comment 2 Renchi Raju 2004-12-21 18:24:13 UTC
this is surprising, since the kioslave links to kio and kexif, both of which link to qt. And qt has to be linked to libpng. can you check if qt in your case links to libpng or not.
ldd /path/to/libqt-mt.so |grep -i png
Comment 3 Rex Dieter 2004-12-21 18:32:36 UTC
$ldd /usr/lib/qt-3.3/lib/libqt-mt.so | grep png
        libpng12.so.0 => /usr/lib/libpng12.so.0 (0x009da000)  

Newer linkers(*) (sometimes?, I don't understand it fully) won't follow that implicit link. If your code uses libpng directly, then your code should link to it.
Comment 4 Renchi Raju 2004-12-21 19:11:28 UTC
CVS commit by pahlibar: 


added libpng explicitly to the linker flags
BUG: 95582


  M +1 -1      Makefile.am   1.12


--- kdeextragear-3/digikam/kioslave/Makefile.am  #1.11:1.12
@@ -6,5 +6,5 @@
 
 kio_digikamthumbnail_la_SOURCES = digikamthumbnail.cpp
-kio_digikamthumbnail_la_LIBADD = $(LIB_KIO) -ljpeg 
+kio_digikamthumbnail_la_LIBADD = $(LIB_KIO) -ljpeg $(LIBPNG) 
 kio_digikamthumbnail_la_LDFLAGS = -module -avoid-version $(all_libraries) \
         $(KDE_PLUGIN) $(LIB_IMLIB2) $(LIBKEXIF_LIBS)


Comment 5 caulier.gilles 2017-07-23 07:58:50 UTC
This problem is relevant of digiKam KIO slaves which have been dropped since 5.0.0 by a multi-threaded interface to query the database. It will never reproducible.