[Digikam-devel] Review Request 119201: Be explicit with OpenCV components

Gilles Caulier caulier.gilles at gmail.com
Wed Jul 23 08:47:48 BST 2014


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/119201/#review62922
-----------------------------------------------------------


Sound like it miss something to link digiKam against OpenCV. I got an error under OSX at linking time :

In file included from /Users/gilles/Devel/GIT/4.x/core/libs/database/imgqsort/imgqsort.cpp:25:
In file included from /Users/gilles/Devel/GIT/4.x/core/digikam/utils/libopencv.h:38:
In file included from /opt/local/include/opencv2/opencv.hpp:47:
In file included from /opt/local/include/opencv2/core/core.hpp:4856:
/opt/local/include/opencv2/core/mat.hpp:538:13: warning: cast from 'uchar *' (aka 'unsigned char *') to 'short *' increases required alignment from 1 to 2 [-Wcast-align]
    return ((_Tp*)(data + step.p[0]*i0))[i1];
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/gilles/Devel/GIT/4.x/core/libs/database/imgqsort/imgqsort.cpp:366:31: note: in instantiation of function template specialization 'cv::Mat::at<short>' requested here
            short value = out.at<short>(i,j);
                              ^
6 warnings generated.
Linking CXX executable digikam.app/Contents/MacOS/digikam
Undefined symbols for architecture x86_64:
  "cv::GaussianBlur(cv::_InputArray const&, cv::_OutputArray const&, cv::Size_<int>, double, double, int)", referenced from:
      Digikam::ImgQSort::blurdetector2() const in imgqsort.cpp.o
  "cv::blur(cv::_InputArray const&, cv::_OutputArray const&, cv::Size_<int>, cv::Point_<int>, int)", referenced from:
      Digikam::ImgQSort::CannyThreshold(int, void*) const in imgqsort.cpp.o
  "cv::Canny(cv::_InputArray const&, cv::_OutputArray const&, double, double, int, bool)", referenced from:
      Digikam::ImgQSort::CannyThreshold(int, void*) const in imgqsort.cpp.o
  "cv::calcHist(cv::Mat const*, int, int const*, cv::_InputArray const&, cv::_OutputArray const&, int, int const*, float const**, bool, bool)", referenced from:
      Digikam::ImgQSort::exposureamount() const in imgqsort.cpp.o
  "cv::Laplacian(cv::_InputArray const&, cv::_OutputArray const&, int, int, double, double, int)", referenced from:
      Digikam::ImgQSort::blurdetector2() const in imgqsort.cpp.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [core/digikam/digikam.app/Contents/MacOS/digikam] Error 1
make[1]: *** [core/digikam/CMakeFiles/digikam.dir/all] Error 2
make: *** [all] Error 2

- Gilles Caulier


On July 22, 2014, 8:34 p.m., Vadim Zhukov wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/119201/
> -----------------------------------------------------------
> 
> (Updated July 22, 2014, 8:34 p.m.)
> 
> 
> Review request for Digikam.
> 
> 
> Repository: digikam
> 
> 
> Description
> -------
> 
> This makes Digikam being explicit in what OpenCV components are needed. This results in less number of libraries to be linked to. As a result, Digikam starts a bit faster, eats a bit less memory and makes downstream (packagers) a bit more happy. Also it helps in cases when OpenCV package is split (for example, with non-free components separated) - without explicit mentioning of what components are needed, it's not clear will Digikam link to some components or not.
> 
> 
> Diffs
> -----
> 
>   tests/imgqsort/detectnoise/CMakeLists.txt 18ead8a 
>   CMakeLists.txt d591a2f 
>   tests/imgqsort/detectblur/CMakeLists.txt 29df499 
>   tests/imgqsort/detectcompression/CMakeLists.txt 73ba98d 
> 
> Diff: https://git.reviewboard.kde.org/r/119201/diff/
> 
> 
> Testing
> -------
> 
> OpenBSD/i386-CURRENT, KDE 4.11.5+Digikam 3.x and KDE 4.13.2+Digikam 4.x
> 
> 
> Thanks,
> 
> Vadim Zhukov
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/digikam-devel/attachments/20140723/5ebe301f/attachment.html>


More information about the Digikam-devel mailing list