Bug 338037 - digiKam 4.2.0 compilation error: undefined reference to `cvFillImage'
Summary: digiKam 4.2.0 compilation error: undefined reference to `cvFillImage'
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Portability-Compilation (show other bugs)
Version: 4.2.0
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-08-04 18:52 UTC by nucleo
Modified: 2017-08-19 20:59 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description nucleo 2014-08-04 18:52:47 UTC
digiKam 4.2.0 compilation failed with error:

[ 66%] Building CXX object extra/kipi-plugins/photolayoutseditor/CMakeFiles/libphotolayoutseditor.dir/effects/PhotoEffectsGroup.cpp.o
cd /builddir/build/BUILD/digikam-4.2.0/i686-redhat-linux-gnu/extra/kipi-plugins/photolayoutseditor && /usr/bin/c++   -DAREA_CODE_GENERAL=51000 -DAREA_CODE_LOADING=51001 -DKDE4_CMAKE_TOPLEVEL_DIR_LENGTH=21 -DKDE_DEFAULT_DEBUG_AREA=51000 -DKDE_DEPRECATED_WARNINGS -DQT_NO_CAST_TO_ASCII -DQT_NO_STL -DQT_USE_FAST_CONCATENATION -DQT_USE_FAST_OPERATOR_PLUS -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_REENTRANT -D_XOPEN_SOURCE=500 -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches  -m32 -march=i686 -mtune=atom -fasynchronous-unwind-tables  -Wnon-virtual-dtor -Wno-long-long -Wundef -Wcast-align -Wchar-subscripts -Wall -W -Wpointer-arith -Wformat-security -fno-exceptions -DQT_NO_EXCEPTIONS -fno-check-new -fno-common -Woverloaded-virtual -fno-threadsafe-statics -fvisibility=hidden -Werror=return-type -fvisibility-inlines-hidden -O2 -DNDEBUG -DQT_NO_DEBUG -I/builddir/build/BUILD/digikam-4.2.0/i686-redhat-linux-gnu/extra/kipi-
plugins/photolayoutseditor -I/builddir/build/BUILD/digikam-4.2.0/extra/kipi-plugins/photolayoutseditor -I/builddir/build/BUILD/digikam-4.2.0/extra/kipi-plugins/common/libkipiplugins -I/builddir/build/BUILD/digikam-4.2.0/i686-redhat-linux-gnu/extra/kipi-plugins/common/libkipiplugins -I/builddir/build/BUILD/digikam-4.2.0/extra/kipi-plugins/common/libkipiplugins/dialogs -I/builddir/build/BUILD/digikam-4.2.0/extra/kipi-plugins/common/libkipiplugins/widgets -I/builddir/build/BUILD/digikam-4.2.0/extra/kipi-plugins/common/libkipiplugins/tools -I/builddir/build/BUILD/digikam-4.2.0/extra/kipi-plugins/common/libkipiplugins/tools/imageio -I/builddir/build/BUILD/digikam-4.2.0/extra/kipi-plugins/photolayoutseditor/borders -I/builddir/build/BUILD/digikam-4.2.0/extra/kipi-plugins/photolayoutseditor/borderplugins -I/builddir/build/BUILD/digikam-4.2.0/extra/kipi-plugins/photolayoutseditor/borderplugins/polaroid -I/builddir/build/BUILD/digikam-4.2.0/extra/kipi-plugins/photolayoutseditor/borderplugins/solid -I/builddir/build/
BUILD/digikam-4.2.0/extra/kipi-plugins/photolayoutseditor/effects -I/builddir/build/BUILD/digikam-4.2.0/extra/kipi-plugins/photolayoutseditor/effectplugins -I/builddir/build/BUILD/digikam-4.2.0/extra/kipi-plugins/photolayoutseditor/effectplugins/blur -I/builddir/build/BUILD/digikam-4.2.0/extra/kipi-plugins/photolayoutseditor/effectplugins/colorize -I/builddir/build/BUILD/digikam-4.2.0/extra/kipi-plugins/photolayoutseditor/effectplugins/grayscale -I/builddir/build/BUILD/digikam-4.2.0/extra/kipi-plugins/photolayoutseditor/effectplugins/sepia -I/builddir/build/BUILD/digikam-4.2.0/extra/kipi-plugins/photolayoutseditor/effectplugins/negative -I/builddir/build/BUILD/digikam-4.2.0/extra/kipi-plugins/photolayoutseditor/events -I/builddir/build/BUILD/digikam-4.2.0/extra/kipi-plugins/photolayoutseditor/listeners -I/builddir/build/BUILD/digikam-4.2.0/extra/kipi-plugins/photolayoutseditor/models -I/builddir/build/BUILD/digikam-4.2.0/extra/kipi-plugins/photolayoutseditor/plugin -I/builddir/build/BUILD/digikam-4.2.0/extra/
kipi-plugins/photolayoutseditor/settings -I/builddir/build/BUILD/digikam-4.2.0/extra/kipi-plugins/photolayoutseditor/threads -I/builddir/build/BUILD/digikam-4.2.0/extra/kipi-plugins/photolayoutseditor/undo -I/builddir/build/BUILD/digikam-4.2.0/extra/kipi-plugins/photolayoutseditor/extra -I/builddir/build/BUILD/digikam-4.2.0/extra/kipi-plugins/photolayoutseditor/extra/qtpropertybrowser/src -I/builddir/build/BUILD/digikam-4.2.0/extra/kipi-plugins/photolayoutseditor/widgets -I/builddir/build/BUILD/digikam-4.2.0/extra/kipi-plugins/photolayoutseditor/widgets/canvas -I/builddir/build/BUILD/digikam-4.2.0/extra/kipi-plugins/photolayoutseditor/widgets/dialogs -I/builddir/build/BUILD/digikam-4.2.0/extra/kipi-plugins/photolayoutseditor/widgets/extra -I/builddir/build/BUILD/digikam-4.2.0/extra/kipi-plugins/photolayoutseditor/widgets/items -I/builddir/build/BUILD/digikam-4.2.0/extra/kipi-plugins/photolayoutseditor/widgets/layers -I/builddir/build/BUILD/digikam-4.2.0/extra/kipi-plugins/photolayoutseditor/widgets/menus -I/
builddir/build/BUILD/digikam-4.2.0/extra/kipi-plugins/photolayoutseditor/widgets/tools -I/usr/include/opencv -I/usr/include/kde4 -I/usr/include/kde4/KDE -I/usr/include/KDE -I/usr/include/phonon -I/usr/include/QtXmlPatterns -I/usr/include/QtXml -I/usr/include/QtWebKit -I/usr/include/QtUiTools -I/usr/include/QtTest -I/usr/include/QtSvg -I/usr/include/QtSql -I/usr/include/QtScriptTools -I/usr/include/QtScript -I/usr/include/QtOpenGL -I/usr/include/QtNetwork -I/usr/include/QtMultimedia -I/usr/include/QtHelp -I/usr/include/QtDesigner -I/usr/include/QtDeclarative -I/usr/include/QtDBus -I/usr/include/Qt3Support -I/usr/include/QtGui -I/usr/include/QtCore -I/usr/include/Qt -I/usr/lib/qt4/mkspecs/default    -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -fPIC -o CMakeFiles/libphotolayoutseditor.dir/effects/PhotoEffectsGroup.cpp.o -c /builddir/build/BUILD/digikam-4.2.0/extra/kipi-plugins/photolayoutseditor/effects/PhotoEffectsGroup.cpp
Linking CXX shared module ../../../lib/kipiplugin_facebook.so
cd /builddir/build/BUILD/digikam-4.2.0/i686-redhat-linux-gnu/extra/kipi-plugins/facebook && /usr/bin/cmake -E cmake_link_script CMakeFiles/kipiplugin_facebook.dir/link.txt --verbose=1
/usr/bin/c++  -fPIC -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches  -m32 -march=i686 -mtune=atom -fasynchronous-unwind-tables  -Wnon-virtual-dtor -Wno-long-long -Wundef -Wcast-align -Wchar-subscripts -Wall -W -Wpointer-arith -Wformat-security -fno-exceptions -DQT_NO_EXCEPTIONS -fno-check-new -fno-common -Woverloaded-virtual -fno-threadsafe-statics -fvisibility=hidden -Werror=return-type -fvisibility-inlines-hidden -O2 -DNDEBUG -DQT_NO_DEBUG -Wl,--enable-new-dtags -Wl,--fatal-warnings -Wl,--no-undefined -lc  -Wl,-z,relro  -shared -Wl,-soname,kipiplugin_facebook.so -o ../../../lib/kipiplugin_facebook.so CMakeFiles/kipiplugin_facebook.dir/kipiplugin_facebook_automoc.cpp.o CMakeFiles/kipiplugin_facebook.dir/plugin_facebook.cpp.o CMakeFiles/kipiplugin_facebook.dir/fbwindow.cpp.o CMakeFiles/kipiplugin_facebook.dir/fbwidget.cpp.o CMakeFiles/kipiplugin_facebook.dir/fbalbum.cpp.o CMakeFiles/kipiplugin_facebook.
dir/fbtalker.cpp.o CMakeFiles/kipiplugin_facebook.dir/mpform.cpp.o CMakeFiles/kipiplugin_facebook.dir/facebookjob.cpp.o  -L/usr/lib/kde4/devel  -L/builddir/build/BUILD/digikam-4.2.0/i686-redhat-linux-gnu/lib ../../../lib/libkipiplugins.so.4.2.0 -lkipi -lkexiv2 -lkdcraw /usr/lib/libkio.so.5.13.3 /usr/lib/libkdeui.so.5.13.3 -lqjson /usr/lib/libkio.so.5.13.3 /usr/lib/libQtNetwork.so /usr/lib/libQtXml.so /usr/lib/libkdeui.so.5.13.3 /usr/lib/libQtSvg.so /usr/lib/libkdecore.so.5.13.3 /usr/lib/libQtDBus.so /usr/lib/libQtGui.so /usr/lib/libQtCore.so -lpthread -Wl,-rpath,/usr/lib/kde4/devel:/builddir/build/BUILD/digikam-4.2.0/i686-redhat-linux-gnu/lib: 
CMakeFiles/kipiplugin_removeredeyes.dir/detection/locators/haarclassifier/haarclassifierlocator.cpp.o: In function `KIPIRemoveRedEyesPlugin::HaarClassifierLocator::allocateBuffers()':
/builddir/build/BUILD/digikam-4.2.0/extra/kipi-plugins/removeredeyes/detection/locators/haarclassifier/haarclassifierlocator.cpp:238: undefined reference to `cvFillImage'
/builddir/build/BUILD/digikam-4.2.0/extra/kipi-plugins/removeredeyes/detection/locators/haarclassifier/haarclassifierlocator.cpp:239: undefined reference to `cvFillImage'
CMakeFiles/kipiplugin_removeredeyes.dir/detection/locators/haarclassifier/haarclassifierlocator.cpp.o: In function `KIPIRemoveRedEyesPlugin::HaarClassifierLocator::findBlobs(_IplImage*, int)':
/builddir/build/BUILD/digikam-4.2.0/extra/kipi-plugins/removeredeyes/detection/locators/haarclassifier/haarclassifierlocator.cpp:213: undefined reference to `cvFillImage'
/usr/bin/cmake -E cmake_progress_report /builddir/build/BUILD/digikam-4.2.0/i686-redhat-linux-gnu/CMakeFiles 
collect2: error: ld returned 1 exit status
extra/kipi-plugins/removeredeyes/CMakeFiles/kipiplugin_removeredeyes.dir/build.make:672: recipe for target 'lib/kipiplugin_removeredeyes.so' failed
make[2]: Leaving directory '/builddir/build/BUILD/digikam-4.2.0/i686-redhat-linux-gnu'
make[2]: *** [lib/kipiplugin_removeredeyes.so] Error 1
make[1]: *** [extra/kipi-plugins/removeredeyes/CMakeFiles/kipiplugin_removeredeyes.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
Comment 1 caulier.gilles 2014-08-04 19:39:07 UTC
An OpenCV library component is missing in you system.

Cmake rules define this components to link with OpenCV :

https://projects.kde.org/projects/extragear/graphics/kipi-plugins/repository/revisions/master/entry/CMakeLists.txt#L122

This work fine under Linux MAgeia, OSX Macports, and Windows

Gilles Caulier
Comment 2 nucleo 2014-08-04 19:42:34 UTC
(In reply to Gilles Caulier from comment #1)
> An OpenCV library component is missing in you system.
> 
> Cmake rules define this components to link with OpenCV :
> 
> https://projects.kde.org/projects/extragear/graphics/kipi-plugins/repository/
> revisions/master/entry/CMakeLists.txt#L122
> 
> This work fine under Linux MAgeia, OSX Macports, and Windows
> 
> Gilles Caulier

-- First try at finding OpenCV...
-- Great, found OpenCV on the first try.
-- OpenCV Root directory is: /usr/lib/OpenCV
-- OpenCV: Found version 2.4.9 (required: 2.4.9)
-- OpenCV headers: /usr/include/opencv;/usr/include
-- OpenCV libs   : opencv_core;opencv_highgui;opencv_objdetect;opencv_contrib
Comment 3 nucleo 2014-08-04 19:46:10 UTC
Maybe problem related with this?
http://fedoraproject.org/wiki/Features/ChangeInImplicitDSOLinking
Comment 4 caulier.gilles 2014-08-04 19:47:31 UTC
Perhaps. In this case, it's an UPSTREAM problem...

Gilles Caulier
Comment 5 nucleo 2014-08-04 19:49:07 UTC
digiKam 4.1.0 built fine with opencv 2.4.9, so problem because something changed in 4.2.0.
Comment 6 caulier.gilles 2014-08-04 20:03:09 UTC
In 4.1.0, there is no restriction about components to link with OpenCV.

With 4.2.0, we link explicitly with OPenCV components needs.

This is relevant of this review board entry solved with 4.2.0 :

https://git.reviewboard.kde.org/r/119413/

Perhaps under Fedora, we need to link with more OpenCV components...

The cmake script which check OpenCV components is here :

https://projects.kde.org/projects/extragear/graphics/kipi-plugins/repository/revisions/master/entry/cmake/modules/MacroOpenCV.cmake

Gilles Caulier
Comment 7 Pedro Celestino Reis Rodrigues 2014-08-05 14:16:38 UTC
For me this error went away after replacing the line

DETECT_OPENCV(2.4.6 core highgui objdetect contrib)

with the line

DETECT_OPENCV(2.4.9 core highgui objdetect contrib legacy)

in extra/kipi-plugins/CMakeLists.txt
I am using debian jessie, but I suspect that it will work for other distributions.
Comment 8 caulier.gilles 2014-08-05 14:31:04 UTC
Git commit 771e16b08255d11f9b2fd2ea7d4d6e8481b482ee by Gilles Caulier.
Committed on 05/08/2014 at 14:29.
Pushed by cgilles into branch 'master'.

fix OpenCV components reqired to compile fine under Fedora and Debian.

M  +1    -1    CMakeLists.txt
M  +1    -0    README

http://commits.kde.org/digikam/771e16b08255d11f9b2fd2ea7d4d6e8481b482ee
Comment 9 caulier.gilles 2014-08-05 14:31:39 UTC
Git commit 446acbc7a54b5fa7c5cc29027a00d29327f5f67b by Gilles Caulier.
Committed on 05/08/2014 at 14:31.
Pushed by cgilles into branch 'master'.

fix OpenCV components reqired to compile fine under Fedora and Debian.

M  +1    -1    CMakeLists.txt

http://commits.kde.org/libkface/446acbc7a54b5fa7c5cc29027a00d29327f5f67b
Comment 10 caulier.gilles 2014-08-05 14:32:10 UTC
Git commit 7a5970f930b1063a093fece3f8abdfb37078d49d by Gilles Caulier.
Committed on 05/08/2014 at 14:31.
Pushed by cgilles into branch 'master'.

fix OpenCV components reqired to compile fine under Fedora and Debian.
FIXED-IN: 4.3.0

M  +1    -1    CMakeLists.txt
M  +1    -1    README

http://commits.kde.org/kipi-plugins/7a5970f930b1063a093fece3f8abdfb37078d49d
Comment 11 nucleo 2014-08-05 15:50:00 UTC
Now compiled fine in Fedora. Thanks.