Bug 311310 - Raw Converter don't build [patch]
Summary: Raw Converter don't build [patch]
Alias: None
Product: digikam
Classification: Applications
Component: BatchQueueManager-RAWProcessing (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR normal (vote)
Target Milestone: ---
Assignee: Digikam Developers
Depends on:
Reported: 2012-12-07 17:24 UTC by Johannes Zarl-Zierl
Modified: 2017-07-09 11:40 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 3.0.0

[PATCH] Refuse to build when libkdcraw version is too old. (765 bytes, patch)
2012-12-17 21:04 UTC, Johannes Zarl-Zierl

Note You need to log in before you can comment on or make changes to this bug.
Description Johannes Zarl-Zierl 2012-12-07 17:24:07 UTC
When building kipi-plugins against the stock libkdcraw version (2.0.1) in debian sid, libkdcraw is found successfully during the cmake step, but afterwards the build fails with the following error:
CMakeFiles/kipiplugins.dir/widgets/kppreviewimage.o: In function `KIPIPlugins::KPPreviewImage::load(QString const&) const':
/home/zing/tmp/digikam-sc/extra/kipi-plugins/common/libkipiplugins/widgets/kppreviewimage.cpp:564: undefined reference to `KDcrawIface::KDcraw::loadRawPreview(QImage&, QString const&)'
CMakeFiles/kipiplugins.dir/tools/kprawthumbthread.o: In function `KIPIPlugins::KPRawThumbThread::run()':
/home/zing/tmp/digikam-sc/extra/kipi-plugins/common/libkipiplugins/tools/kprawthumbthread.cpp:112: undefined reference to `KDcrawIface::KDcraw::loadRawPreview(QImage&, QString const&)'
collect2: error: ld returned 1 exit status
make[2]: *** [lib/libkipiplugins.so.3.0.0] Error 1
make[1]: *** [common/libkipiplugins/CMakeFiles/kipiplugins.dir/all] Error 2
make: *** [all] Error 2

I would expect that either the older version is rejected during the cmake phase and that kipi-plugins are built without libkdcraw support, or that kipi-plugins use KDcrawIface::KDcraw::loadDcrawPreview(...) when built against the older libkdcraw version.
Comment 1 caulier.gilles 2012-12-17 04:59:29 UTC
It's a linking problem, not a compilation failure. Sound like you mix old and recent versions on your computer at the same time. 

Clean up your cmake cache, reconfigure and try again.

Gilles Caulier
Comment 2 Johannes Zarl-Zierl 2012-12-17 20:38:34 UTC
You are right, the build-tree was improperly switched from manually installed libkdcraw to the system-installed one.

But even with a fresh build-tree, the issue hits me (during compilation, this time):

mkdir foo && cd foo && cmake .. && make
[  1%] Building CXX object common/libkipiplugins/CMakeFiles/kipiplugins.dir/tools/kprawthumbthread.o
/home/zing/tmp/digikam-sc/extra/kipi-plugins/common/libkipiplugins/tools/kprawthumbthread.cpp: In member function ‘virtual void KIPIPlugins::KPRawThumbThread::run()’:
/home/zing/tmp/digikam-sc/extra/kipi-plugins/common/libkipiplugins/tools/kprawthumbthread.cpp:112:24: error: ‘loadRawPreview’ is not a member of ‘KDcrawIface::KDcraw’
make[2]: *** [common/libkipiplugins/CMakeFiles/kipiplugins.dir/tools/kprawthumbthread.o] Error 1
make[1]: *** [common/libkipiplugins/CMakeFiles/kipiplugins.dir/all] Error 2
make: *** [all] Error 2
Comment 3 Johannes Zarl-Zierl 2012-12-17 21:04:48 UTC
Created attachment 75892 [details]
[PATCH] Refuse to build when libkdcraw version is too old.

I looked at the output of cmake again and noticed that there is a version check for libkdcraw, but it has no effect on the compilation.

I guess that KDCRAW_FOUND should be set to false, if no version info is found.
Comment 4 caulier.gilles 2012-12-18 08:15:19 UTC
Git commit 4902a124f0aae018a89adbb89e1e75872b43581c by Gilles Caulier.
Committed on 18/12/2012 at 09:14.
Pushed by cgilles into branch 'master'.

apply patch #75892 from Johannes Zarl

M  +8    -1    CMakeLists.txt

Comment 5 caulier.gilles 2012-12-18 08:16:43 UTC
Git commit bd02b4969e00b0daa937712c8f14ab52b70320e4 by Gilles Caulier.
Committed on 18/12/2012 at 09:15.
Pushed by cgilles into branch 'master'.

apply patch #75892 from Johannes Zarl
FIXED-IN: 3.0.0

M  +7    -0    CMakeLists.txt