Bug 261946

Summary: unable to compile beta1 of digikam
Product: [Applications] digikam Reporter: Dan Ohnesorg <dan>
Component: Portability-CompilationAssignee: Digikam Developers <digikam-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: ahuggel, caulier.gilles, mike
Priority: NOR    
Version: 2.0.0   
Target Milestone: ---   
Platform: openSUSE   
OS: Linux   
Latest Commit: Version Fixed In: 2.0.0
Sentry Crash Report:
Attachments: Log of the failed build
Also second fail

Description Dan Ohnesorg 2011-01-03 12:43:36 UTC
Created attachment 55514 [details]
Log of the failed build

Version:           2.0.0 (using KDE 4.4.4) 
OS:                Linux

Linking CXX shared module ../../../lib/kipiplugin_timeadjust.so                                                                                                                                                                               
CMakeFiles/kipiplugin_timeadjust.dir/plugin_timeadjust.cpp.o: In function `Plugin_TimeAdjust::setup(QWidget*)':                                                                                                                               
/home/dan/vyvoj/digikam-2.0.0-beta1/extra/kipi-plugins/timeadjust/plugin_timeadjust.cpp:64: undefined reference to `KIPI::Plugin::actionCollection(QWidget*)'
collect2: ld returned 1 exit status
make[2]: *** [lib/kipiplugin_timeadjust.so] Error 1
make[1]: *** [extra/kipi-plugins/timeadjust/CMakeFiles/kipiplugin_timeadjust.dir/all] Error 2
make: *** [all] Error 2

Reproducible: Always
Comment 1 caulier.gilles 2011-01-03 13:43:19 UTC
I fixed a stupid bug in cmake scripts. 

2.0.0--beta1 tarball is updated on sf.net. Can you try again ?

Gilles Caulier
Comment 2 Dan Ohnesorg 2011-01-03 14:15:57 UTC
Created attachment 55517 [details]
Also second fail

This time build failed on sane, but I have to say, that even 1.7 is did compiled only without sane support.
Comment 3 caulier.gilles 2011-01-03 14:27:05 UTC
Not reproducible here.

2 solutions :

- install more recent libksane version from KDEGraphics.
- uninstall you current version

Q : which libksane version you use exactly ?

Gilles Caulier
Comment 4 caulier.gilles 2011-01-03 15:03:32 UTC
The libksane error :

/home/dan/vyvoj/digikam-2.0.0-beta1/extra/kipi-plugins/acquireimages/scandialog.cpp:149:20: error: ‘class KSaneIface::KSaneWidget’ has no member named ‘closeDevice’

is due to an old libksane version installed on your computer. The KSaneWidget::closeDevice() have been implemented in febary 2009 :

http://websvn.kde.org/trunk/KDE/kdegraphics/libs/libksane/libksane/ksane.h?r1=913107&r2=923469

There is no difference in AcquireImage kipi-plugin implementation from trunk (1.7.0) and this version (2.0.0)

Gilles Caulier
Comment 5 Dan Ohnesorg 2011-01-03 15:09:41 UTC
A have also version libksane0-4.4.4-2.1.1.i586 from OpenSuSE 11.3. Anyway compilation suceeded using

cmake -DCMAKE_INSTALL_PREFIX=`kde4-config --prefix` -DKSANE_LIBRARY:BOOL=FALSE  ..

You are right, that 1.7.0 had the same problem ;-)

now I am dealing with some problem on make install, which is probably caused by two versions of libkexiv2.so on my system. I will report later.
Comment 6 caulier.gilles 2011-01-03 15:12:23 UTC
The libkexiv2, libkdcraw, and libkipi included in digiKam 2.0.0 software collection have a bumped revision to 2.0.0. No conflict must be seen about.

Gilles Caulier
Comment 7 Dan Ohnesorg 2011-01-03 15:20:04 UTC
[100%] Built target digikamimageplugin_transform
[100%] Built target digikamdatabaseserver_automoc
[100%] Built target digikamdatabaseserver
Linking CXX executable CMakeFiles/CMakeRelink.dir/libkmap_demo
../../../lib/libkexiv2.so.10.0.0: undefined reference to `Exiv2::ExifKey::tagDesc() const'                                                                                                                                                    
../../../lib/libkexiv2.so.10.0.0: undefined reference to `Exiv2::ExifTags::groupList()'
../../../lib/libkexiv2.so.10.0.0: undefined reference to `Exiv2::ExifKey::ExifKey(Exiv2::TagInfo const&)'
../../../lib/libkexiv2.so.10.0.0: undefined reference to `Exiv2::LogMsg::handler_'
collect2: ld returned 1 exit status
make[2]: *** [extra/libkmap/demo/CMakeFiles/CMakeRelink.dir/libkmap_demo] Error 1
make[1]: *** [extra/libkmap/demo/CMakeFiles/libkmap_demo.dir/preinstall] Error 2
make: *** [preinstall] Error 2


this is result of make install after make without any warning.
Comment 8 caulier.gilles 2011-01-03 15:23:15 UTC
Strange, "make" and "make install" work fine here.

Michael ?

Gilles Caulier
Comment 9 Dan Ohnesorg 2011-01-03 15:33:05 UTC
Also it fails reproducible:

dan@dan:~/vyvoj/digikam-2.0.0-beta1/build/extra/libkmap/demo> make clean
dan@dan:~/vyvoj/digikam-2.0.0-beta1/build/extra/libkmap/demo> make
Generating mytreewidget.moc
Generating mainwindow.moc                                                                                                                                                                                                                     
Generating dragdrophandler.moc                                                                                                                                                                                                                
[  0%] Built target libkmap_demo_automoc                                                                                                                                                                                                      
[  0%] Built target kmap_automoc
[ 50%] Built target kmap
[ 50%] Built target kexiv2_automoc
[100%] Built target kexiv2
[100%] Building CXX object extra/libkmap/demo/CMakeFiles/libkmap_demo.dir/libkmap_demo_automoc.cpp.o
[100%] Building CXX object extra/libkmap/demo/CMakeFiles/libkmap_demo.dir/demo-main.cpp.o                                                                                                                                                     
[100%] Building CXX object extra/libkmap/demo/CMakeFiles/libkmap_demo.dir/mainwindow.cpp.o                                                                                                                                                    
[100%] Building CXX object extra/libkmap/demo/CMakeFiles/libkmap_demo.dir/myimageitem.cpp.o                                                                                                                                                   
[100%] Building CXX object extra/libkmap/demo/CMakeFiles/libkmap_demo.dir/mytreewidget.cpp.o                                                                                                                                                  
[100%] Building CXX object extra/libkmap/demo/CMakeFiles/libkmap_demo.dir/dragdrophandler.cpp.o                                                                                                                                               
Linking CXX executable libkmap_demo                                                                                                                                                                                                           
[100%] Built target libkmap_demo                                                                                                                                                                                                              
dan@dan:~/vyvoj/digikam-2.0.0-beta1/build/extra/libkmap/demo> make install
[  0%] Built target libkmap_demo_automoc
[  0%] Built target kmap_automoc
[ 50%] Built target kmap
[ 50%] Built target kexiv2_automoc
[100%] Built target kexiv2
[100%] Built target libkmap_demo
Linking CXX executable CMakeFiles/CMakeRelink.dir/libkmap_demo
../../../lib/libkexiv2.so.10.0.0: undefined reference to `Exiv2::ExifKey::tagDesc() const'                                                                                                                                                    
../../../lib/libkexiv2.so.10.0.0: undefined reference to `Exiv2::ExifTags::groupList()'
../../../lib/libkexiv2.so.10.0.0: undefined reference to `Exiv2::ExifKey::ExifKey(Exiv2::TagInfo const&)'
../../../lib/libkexiv2.so.10.0.0: undefined reference to `Exiv2::LogMsg::handler_'
collect2: ld returned 1 exit status
make[2]: *** [extra/libkmap/demo/CMakeFiles/CMakeRelink.dir/libkmap_demo] Error 1
make[1]: *** [extra/libkmap/demo/CMakeFiles/libkmap_demo.dir/preinstall] Error 2
make: *** [preinstall] Error 2

and the linker finds correct version

ldd libkmap_demo
        linux-gate.so.1 =>  (0xffffe000)
        libkmap.so.1 => /home/dan/vyvoj/digikam-2.0.0-beta1/build/lib/libkmap.so.1 (0xb77ea000)
        libkexiv2.so.10 => /home/dan/vyvoj/digikam-2.0.0-beta1/build/lib/libkexiv2.so.10 (0xb7764000)
Comment 10 Michael G. Hansen 2011-01-03 15:42:32 UTC
Works fine here, too. If the libkmap_demo is the only one failing, remove it
from the build for now by commenting out line 91 in
extra/libkmap/CMakeLists.txt: # SUBDIRS(demo)

Michael
Comment 11 Michael G. Hansen 2011-01-03 15:52:25 UTC
Sorry, I misread your error messages. It looks like exiv2 is not new enough. Gilles, do you know in which version the missing symbols are?

Dan, what is your exiv2 version? Make sure the output of "exiv2 -V" (here: 0.21) and "cat /usr/include/exiv2/version.hpp | grep EXIV2_MINOR_VERSION" (or adjust the include path) matches (here: 21).

Michael
Comment 12 caulier.gilles 2011-01-03 15:54:12 UTC
[100%] Built target libkmap_demo
Linking CXX executable CMakeFiles/CMakeRelink.dir/libkmap_demo
../../../lib/libkexiv2.so.10.0.0: undefined reference to
`Exiv2::ExifKey::tagDesc() const'                                               
../../../lib/libkexiv2.so.10.0.0: undefined reference to
`Exiv2::ExifTags::groupList()'
../../../lib/libkexiv2.so.10.0.0: undefined reference to
`Exiv2::ExifKey::ExifKey(Exiv2::TagInfo const&)'
../../../lib/libkexiv2.so.10.0.0: undefined reference to
`Exiv2::LogMsg::handler_'
collect2: ld returned 1 exit status


I'm not sure. I think 0.21. I CC Andreas for info...

Gilles Caulier
Comment 13 Dan Ohnesorg 2011-01-03 16:00:43 UTC
Also I had 0.19 is /usr and 0.21 in /usr/local (which is also preferred in my configs), now I removed the 0.19 permanently and will make new build.
Comment 14 Dan Ohnesorg 2011-01-03 17:15:55 UTC
Also removing of exiv2 helped, but there is another problem

CMake Error at extra/libkface/libkface/cmake_install.cmake:56 (FILE):
  file INSTALL cannot find
  "/home/dan/vyvoj/digikam-2.0.0-beta1/extra/libkface/libkface/faceitem.h".
Call Stack (most recent call first):
  extra/libkface/cmake_install.cmake:45 (INCLUDE)
  extra/cmake_install.cmake:40 (INCLUDE)
  cmake_install.cmake:37 (INCLUDE)

and the file is really missing in the tarball

dan@dan:~/vyvoj/digikam-2.0.0-beta1> ls -l extra/libkface/libkface/face*
-rw-r--r-- 1 dan users 4289 13. lis 19.37 extra/libkface/libkface/face.cpp
-rw-r--r-- 1 dan users 3146 13. lis 19.37 extra/libkface/libkface/facedetector.cpp
-rw-r--r-- 1 dan users 3010 13. lis 19.37 extra/libkface/libkface/facedetector.h
-rw-r--r-- 1 dan users 6100 13. lis 19.37 extra/libkface/libkface/face.h

I have to copy files:

dan@dan:~/vyvoj/digikam-2.0.0-beta1> cp extra/libkface/test/gui/* extra/libkface/libkface/

to be able to run make install. But now I can report, that digikam is UP AND RUNNING ;-)

thanks a lot
Comment 15 caulier.gilles 2011-01-03 18:43:44 UTC
Yes, i forget certainly to include last commit from Michael today.

I will regenerate the tarball tomorrow and post the announcement.

Gilles Caulier
Comment 16 Michael G. Hansen 2011-01-03 19:02:09 UTC
Dan,

you can find the required changes which are missing in the tarball here:

http://websvn.kde.org/branches/extragear/graphics/digikam/extra/libkface/libkface/CMakeLists.txt?r1=1211275&r2=1211274&pathrev=1211275

Also, you can try make install/fast, which does not care about missing dependencies IIRC.

Hope that helps,

Michael
Comment 17 Dan Ohnesorg 2011-01-03 20:53:57 UTC
Michael,

I can confirm, that after removing 4 lines from CMakeLists.txt is possible to compile and install the beta1 without any problem (except my -DKSANE_LIBRARY:BOOL=FALSE which is not digikam fault).

Thanks a lot

Dan
Comment 18 Andreas Huggel 2011-01-04 00:57:14 UTC
Just to confirm, judging from the missing symbols, this libkexiv2 requires at least exiv2 0.21