Bug 95582 - link failure, -lpng missing in kioslave
Summary: link failure, -lpng missing in kioslave
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Database-Albums (show other bugs)
Version: 0.7.1
Platform: RedHat Enterprise Linux Linux
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-12-21 14:37 UTC by Rex Dieter
Modified: 2017-07-25 10:40 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 5.7.0
Sentry Crash Report:


Attachments
add -lpng to kio_digikamthumbnail_la_LIBADD (1016 bytes, patch)
2004-12-21 14:39 UTC, Rex Dieter
Details

Note You need to log in before you can comment on or make changes to this bug.
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.