Bug 175844 - Crashes at startup loading Export tools
Summary: Crashes at startup loading Export tools
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Portability-Runtime (show other bugs)
Version: unspecified
Platform: openSUSE Linux
: NOR crash
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-11-22 22:48 UTC by bogdan
Modified: 2018-02-04 11:24 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In: 6.0.0


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description bogdan 2008-11-22 22:48:06 UTC
Version:           0.10.0 (using KDE 4.1.3)
Compiler:          gcc version 4.3.1 20080507  
OS:                Linux
Installed from:    SuSE RPMs

See crash dump below

Application: digiKam (digikam), signal SIGSEGV
[?1034h[Thread debugging using libthread_db enabled]
[New Thread 0x7ff87195a700 (LWP 9122)]
[New Thread 0x421ff950 (LWP 9130)]
[New Thread 0x408a8950 (LWP 9127)]
[New Thread 0x419fe950 (LWP 9126)]
[New Thread 0x411fd950 (LWP 9123)]
[KCrash handler]
#5  0x0000000000000000 in ?? ()
#6  0x00007ff86d616149 in KIPI::Interface::hasFeature (this=0x31c39e0, 
    feature=KIPI::ImagesHasTime)
    at /home/software/installed/digikam/kdegraphics/libs/libkipi/libkipi/interface.cpp:73
#7  0x00007ff86d6165f0 in KIPI::Interface::hasFeature (this=0x31c39e0, 
    feature=@0x31c7348)
    at /home/software/installed/digikam/kdegraphics/libs/libkipi/libkipi/interface.cpp:87
#8  0x00007ff86d613078 in PluginLoader (this=0x2f84f20, 
    ignores=@0x7fff799bdbe0, interface=0x31c39e0)
    at /home/software/installed/digikam/kdegraphics/libs/libkipi/libkipi/pluginloader.cpp:233
#9  0x0000000000633232 in Digikam::DigikamApp::loadPlugins (this=0xbfa750)
    at /home/software/installed/digikam/graphics/digikam/digikam/digikamapp.cpp:2047
#10 0x000000000064d427 in DigikamApp (this=0xbfa750)
    at /home/software/installed/digikam/graphics/digikam/digikam/digikamapp.cpp:220
#11 0x000000000068acdc in main (argc=1, argv=0x7fff799be6a8)
    at /home/software/installed/digikam/graphics/digikam/digikam/main.cpp:162
#0  0x00007ff86671b261 in nanosleep () from /lib64/libc.so.6
Comment 1 caulier.gilles 2008-11-23 06:56:26 UTC
crash is due to use last libkipi from trunk feature, but it cannot be found by digikam

I suspect that 2 version  of libkipi is installed on your system. digikam have been compiled with last implementation of libkipi, but at run time it use a previous version not binary compatible...

Gilles Caulier
Comment 2 Arnd Baecker 2008-11-23 08:32:55 UTC
Gilles, is there any way to detect this during run-time?
I.e., during compile, store the used library versions somewhere,
and on start, inquire the currently used library and report any mismatches
(either on the konsole, or more prominently)....
Comment 3 caulier.gilles 2008-11-23 11:49:28 UTC
Well this job is normally delegate to CMake + kipi library version (currently increased).

So, i don't understand why another libkipi version is used at run time.

Gilles
Comment 4 bogdan 2008-11-23 17:56:21 UTC
I had digikam 0.94 (KDE3) and its libraries on the system and I removed them, but I still have the same problem.

There is one thing that may explain this problem: When I compile the graphics directory after I compile and install kdegraphics , make complains about having the wrong or missing libkexiv2, but I have the right one I suppose because I compiled it earlier. See below maybe you can find an explanation to this and to the loading of plugins.  In order to compile I hacked CMakeList.txt to SET(KEXIV2_FOR_DIGIKAM TRUE) 

I don't know why itis not recognized as it is the only one on the system:

bogdan@high:/home/software/installed/digikam/graphics/digikam> find /usr/ -name libkexiv* 2>/dev/null
/usr/lib64/libkexiv2.so.7
/usr/lib64/libkexiv2.so.7.2.0
/usr/lib64/pkgconfig/libkexiv2.pc
/usr/lib64/libkexiv2.so
/usr/include/libkexiv2
/usr/include/libkexiv2/libkexiv2_export.h

Here is the output from make 

bogdan@high:/home/software/installed/digikam/graphics/digikam> make                                                                            
-- Found Qt-Version 4.4.3 (using /usr/bin/qmake)                                                                                               
-- Found X11: /usr/lib64/libX11.so                                                                                                             
-- Found Threads: TRUE                                                                                                                         
-- Found Automoc4: /usr/bin/automoc4                                                                                                           
-- Found Perl: /usr/bin/perl                                                                                                                   
-- Found KDE 4.1 include dir: /usr/include                                                                                                     
-- Found KDE 4.1 library dir: /usr/lib64                                                                                                       
-- Found KDE4 kconfig_compiler preprocessor: /usr/bin/kconfig_compiler                                                                         
-- Found automoc4: /usr/bin/automoc4                                                                                                           
-- Found Freetype: -lfreetype -lz                                                                                                              
-- Found libksane: /usr/lib64/libksane.so                                                                                                      
-- Found Kexiv2 library in cache: /usr/lib64/libkexiv2.so                                                                                      
-- Found Kdcraw library in cache: /usr/lib64/libkdcraw.so                                                                                      
-- Found Kipi library in cache: /usr/lib64/libkipi.so                                                                                          
-- Found JPEG: /usr/lib64/libjpeg.so                                                                                                           
-- Found PNG: /usr/lib64/libpng.so                                                                                                             
-- Found lcms version 1.17, /usr/lib64/liblcms.so                                                                                              
-- Found JPEG: /usr/lib64/libjpeg.so                                                                                                           
-- Found PNG: /usr/lib64/libpng.so                                                                                                             
-- Found JPEG: /usr/lib64/libjpeg.so                                                                                                           
-- Found Jasper: /usr/lib64/libjasper.so                                                                                                       
-- Found Kdcraw library in cache: /usr/lib64/libkdcraw.so                                                                                      
-- Found Kexiv2 library in cache: /usr/lib64/libkexiv2.so                                                                                      
-- Found Kipi library in cache: /usr/lib64/libkipi.so                                                                                          
-- Found gphoto2: -L/usr/lib64 -lgphoto2_port;-L/usr/lib64 -lgphoto2 -lgphoto2_port -lm                                                        
-- Found KDE PIM libraries                                                                                                                     
-- Found LensFun: /usr/include                                                                                                                 
--                                                                                                                                             
-- ----------------------------------------------------------------------------------                                                          
--  digiKam 0.10.0-beta6 dependencies results   <http://www.digikam.org>                                                                       
--                                                                                                                                             
--  Qt4 SQL module found................ YES                                                                                                   
--  libjpeg library found............... YES                                                                                                   
--  libtiff library found............... YES                                                                                                   
--  libpng library found................ YES                                                                                                   
--  libjasper library found............. YES                                                                                                   
--  liblcms library found............... YES                                                                                                   
--  libkipi library found............... YES                                                                                                   
--  libkexiv2 library found............. NO                                                                                                    
--                                                                                                                                             
CMake Error at digikam/CMakeLists.txt:181 (MESSAGE):                                                                                           
   digiKam needs libkexiv2 library >= 0.5.0. You need to install libkexiv2 first                                                               


--  libkexiv2 website is at http://www.digikam.org/sharedlibs
--                                                           
--  libkdcraw library found............. YES                 
--  libgphoto2 library found............ YES                 
--  libkdepimlibs library found......... YES (optional)      
--  libmarblewidget library found....... YES (optional)      
--  liblensfun library found............ YES (optional)      
--  digiKam will be compiled............ YES                 
-- ----------------------------------------------------------------------------------
--                                                                                   
-- Adjusting compilation flags for GCC version ( 4.3.1)                              
-- Found Kexiv2 library in cache: /usr/lib64/libkexiv2.so                            
-- Found Kdcraw library in cache: /usr/lib64/libkdcraw.so                            
-- Found Kipi library in cache: /usr/lib64/libkipi.so                                
-- Found JPEG: /usr/lib64/libjpeg.so                                                 
-- Found PNG: /usr/lib64/libpng.so                                                   
-- Found EXPAT: /usr/lib64/libexpat.so                                               
-- Found Threads: TRUE                                                               
-- OpenCV root directory: /usr                                                       
-- OpenCV Include Directory: /usr/include/opencv;/usr/include/opencv;/usr/include/opencv;/usr/include/opencv
-- OpenCV Libraries: /usr/lib64/libcv.so;/usr/lib64/libcxcore.so;/usr/lib64/libcvaux.so;/usr/lib64/libhighgui.so
-- KDE CMake PKGCONFIG macro indicates that gpod-1.0 is not installed on your computer.                         
-- Install the package which contains gpod-1.0.pc if you want to support this feature.                          
-- Found GLIB2: /usr/lib64/libglib-2.0.so                                                                       
-- Found GObject libraries: /usr/lib64/libgobject-2.0.so;/usr/lib64/libgmodule-2.0.so;/usr/lib64/libgthread-2.0.so;/usr/lib64/libglib-2.0.so
-- Found GObject includes : /usr/include/glib-2.0/gobject                                                                                   
-- Found KDE PIM libraries                                                                                                                  
-- Found X11: /usr/lib64/libX11.so                                                                                                          
-- Found libksane: /usr/lib64/libksane.so                                                                                                   
--                                                                                                                                          
-- ----------------------------------------------------------------------------------                                                       
--  kipi-plugins 0.2.0-beta4 dependencies results   <http://www.kipi-plugins.org>                                                           
--                                                                                                                                          
--  libjpeg library found............... YES                                                                                                
--  libtiff library found............... YES
--  libpng library found................ YES
--  libkipi library found............... YES
--  libkexiv2 library found............. YES
--  libkdcraw library found............. YES
--  libxml2 library found............... YES (optional)
--  libxslt library found............... YES (optional)
--  libexpat library found.............. YES (optional)
--  native threads support found........ YES (optional)
--  libopengl library found............. YES (optional)
--  libopencv library found............. YES (optional)
--  libgpod library found............... YES (optional)
--  libkdepim library found............. YES (optional)
--  libX11 library found................ YES (optional)
--  libksane library found.............. YES (optional)
--
--  kipi-plugins will be compiled....... YES
--  HtmlExport will be compiled......... YES (optional)
--  SlideShow will be compiled.......... YES (optional)
--  ImageViewer will be compiled........ YES (optional)
--  AcquireImages will be compiled...... YES (optional)
--  DNGConverter will be compiled....... YES (optional)
--  RemoveRedEyes will be compiled...... YES (optional)
--  IpodExport will be compiled......... YES (optional)
--  Calendar will be compiled........... YES (optional)
-- ----------------------------------------------------------------------------------
--
--
-----------------------------------------------------------------------------
-- The following external packages were located on your system.
-- This installation will have the extra features provided by these packages.
+ libopengl
+ imlib
+ libgphoto2
Congratulations! All external packages have been found.
-----------------------------------------------------------------------------

-- Configuring incomplete, errors occurred!
make: *** [cmake_check_build_system] Error 1
Comment 5 Angelo Naselli 2008-11-24 10:17:00 UTC
> Gilles, is there any way to detect this during run-time?
> I.e., during compile, store the used library versions somewhere,
> and on start, inquire the currently used library and report any mismatches
> (either on the konsole, or more prominently)....
mhhm, maybe we can use dlopen or something like that to check if new api is in,
in this case anyway i suspect a wrong backport from svn by SuSE. Maybe they have
not changed libkipi & co. versions and leave the same as it is in kde 4.1.3....

Comment 6 caulier.gilles 2008-12-04 15:26:04 UTC
bogdan,

Please give us a fresh feedback here, using 0.10.0-beta6 release.

Thanks in advance

Gilles Caulier
Comment 7 bogdan 2008-12-05 02:34:43 UTC
Gilles, 
I think I figured out the problem. I tried various combinations including digikam 0.10.0-beta6. They all crash at load time  and the output is the same, so there is no point of pasting it again. 
I downloaded digikam 0.10.0-64 build by SuSE and that works flawlessly. Doing ldd on this one I discovered that it is linked against libkipi.so.5 unlike the trunk version and the beta6 version, which are linked against libkipi.so.6.

So there must be a problem inside libkipi.so.6, which prevents loading the plugins on a KDE 4.1.3 system (64 bits ,I don't know if this is important).

I hope that this finding helps you.  If I had more time ( I am in my exam session right now)  I could have actually run it under debugger and give you more info.
Comment 8 Marcel Wiesweg 2008-12-06 16:58:06 UTC
If there is a package compiled against a library and it then runs against a binary-incompatible release, then this is a packaging error and could be marked as DOWNSTREAM. We cannot try to work around anything like this.

The output from CMake gives /usr/lib64/libkipi.so which can only be one, either .so.6 or .so.7. Headers and library versions must match.
Comment 9 bogdan 2008-12-06 19:37:00 UTC
I am not sure that you are correct. 
I removed the .5 version and recompiled from scratch kdegraphics and digikam.

Look at my ldd output for the compiled one: 

bogdan@high:/home/software/installed/digikam/graphics> ldd /usr/bin/digikam | grep kipi
        libkipi.so.6 => /usr/lib64/libkipi.so.6 (0x00007f3bc4488000)

And it is still crashing.

Look also at the output below.

ls -l /usr/lib64/libkipi*
lrwxrwxrwx 1 root root      19 2008-12-04 19:55 /usr/lib64/libkipiplugins.so -> libkipiplugins.so.1
lrwxrwxrwx 1 root root      23 2008-12-04 19:55 /usr/lib64/libkipiplugins.so.1 -> libkipiplugins.so.1.0.0
-rwxr-xr-x 1 root root 1365421 2008-12-06 13:28 /usr/lib64/libkipiplugins.so.1.0.0
lrwxrwxrwx 1 root root      12 2008-12-04 20:06 /usr/lib64/libkipi.so -> libkipi.so.6
lrwxrwxrwx 1 root root      16 2008-12-04 20:06 /usr/lib64/libkipi.so.6 -> libkipi.so.6.0.0
-rwxr-xr-x 1 root root 1469156 2008-12-03 13:30 /usr/lib64/libkipi.so.6.0.0

Comment 10 Marcel Wiesweg 2008-12-26 18:21:26 UTC
Bogdan, since Christmas I have running OpenSuse 11.1 on x86_64 as well. I have the standard KDE 4.1.3 environment from Suse and only compiled kdegraphics/libs and digikam myself. No crash, works flawlessly.
Comment 11 caulier.gilles 2008-12-26 22:21:38 UTC
Bogdan,

As Marcel said, you need to recompile and install digiKam using libkipi, libkexiv2, and libkdcraw from svn trunk, as explained here :

http://www.digikam.org/drupal/sharedlibs

These libraries will be released with KDE 4.2 and are now stabilized.

I close this file as DOWNSTREAM

Gilles Caulier 
Comment 12 bogdan 2008-12-27 15:33:43 UTC
Hi Marcel & Gilles,

I upgraded SuSE to 11.1 a few days ago. I tried again today and I recompiled the libs and digikam. It works fine now.  I don't know whether the libraries from SuSE 11.0 were at fault or you made some changes to the source code, but the main thing is that it works now.

Bogdan
Comment 13 caulier.gilles 2018-02-04 11:23:50 UTC
Problem fixed in 6.0.0 where all tools are now in digiKam core