Bug 303427

Summary: failed build against libgphoto2-2.5.0 [patch]
Product: [Applications] digikam Reporter: nucleo <nucleo>
Component: Import-Gphoto2Assignee: Digikam Developers <digikam-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: benv-kde.org, caulier.gilles, dodonvictor, johu, kevin.kofler, marcus, melko, rdieter, wazery
Priority: NOR    
Version: 2.7.0   
Target Milestone: ---   
Platform: unspecified   
OS: Linux   
Latest Commit: Version Fixed In: 2.9.0
Attachments: 0001-support-both-libgphoto2-2.5.0-and-2.4.0.patch
updated and tested libgphoto 2.5/2.4 patch

Description nucleo 2012-07-12 18:15:06 UTC
cd /builddir/build/BUILD/digikam-2.7.0/i686-redhat-linux-gnu/extra/libkface/test && /usr/bin/c++   -D_BSD_SOURCE -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -DQT_NO_STL -DQT_NO_CAST_TO_ASCII -D_REENTRANT -DKDE_DEPRECATED_WARNINGS -DKDE4_CMAKE_TOPLEVEL_DIR_LENGTH=21 -DQT_USE_FAST_CONCATENATION -DQT_USE_FAST_OPERATOR_PLUS -DKDE_DEFAULT_DEBUG_AREA=51005 -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4  -m32 -march=i686 -mtune=atom -fasynchronous-unwind-tables  -Wnon-virtual-dtor -Wno-long-long -ansi -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-2.7.0/i686-redhat-linux-gnu/extra/libkface/test -I/builddir/build/BUILD/digikam-2.7.0/extra/libkface/test -I/builddir/build/BUILD/digikam-2.7.0/extra/libkface -I/builddir/build/BUILD/digikam-2.7.0/i686-redhat-linux-gnu/extra/libkface -I/builddir/build/BUILD/digikam-2.7.0/i686-redhat-linux-gnu/extra/libkface/libface -I/builddir/build/BUILD/digikam-2.7.0/extra/libkface/test/../libkface -I/builddir/build/BUILD/digikam-2.7.0/extra/libkface/test/.. -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 -I/usr/include/opencv    -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -o CMakeFiles/detect.dir/detect.cpp.o -c /builddir/build/BUILD/digikam-2.7.0/extra/libkface/test/detect.cpp
make -f extra/libkface/test/CMakeFiles/libfaceGUI.dir/build.make extra/libkface/test/CMakeFiles/libfaceGUI.dir/depend
/builddir/build/BUILD/digikam-2.7.0/core/utilities/cameragui/devices/gpcamera.cpp: In member function 'virtual bool Digikam::GPCamera::uploadItem(const QString&, const QString&, const QString&, Digikam::CamItemInfo&)':
/builddir/build/BUILD/digikam-2.7.0/core/utilities/cameragui/devices/gpcamera.cpp:1335:61: error: cannot convert 'CameraFile* {aka _CameraFile*}' to 'const char*' for argument '3' to 'int gp_camera_folder_put_file(Camera*, const char*, const char*, CameraFileType, CameraFile*, GPContext*)'
make[2]: Entering directory `/builddir/build/BUILD/digikam-2.7.0/i686-redhat-linux-gnu'
/usr/bin/cmake -E cmake_progress_report /builddir/build/BUILD/digikam-2.7.0/i686-redhat-linux-gnu/CMakeFiles 
/builddir/build/BUILD/digikam-2.7.0/core/utilities/cameragui/devices/gpcamera.cpp: In static member function 'static void Digikam::GPCamera::getSupportedPorts(QStringList&)':
/builddir/build/BUILD/digikam-2.7.0/core/utilities/cameragui/devices/gpcamera.cpp:1654:31: error: request for member 'path' in 'info', which is of pointer type 'GPPortInfo {aka _GPPortInfo*}' (maybe you meant to use '->' ?)

See full log http://kojipkgs.fedoraproject.org//work/tasks/7155/4237155/build.log

Reproducible: Always
Comment 1 Rex Dieter 2012-07-12 18:16:47 UTC
confirmed
Comment 2 nucleo 2012-07-12 18:25:21 UTC
Note that KDE 4.8.97 used in thi build.
Comment 3 Wouter de Geus 2012-07-17 11:42:35 UTC
Just tried this on slackware64-current with KDE 4.8.4 (and libgphoto2-2.5.0) with the same result.
Since this new libgphoto2 version finally gets rid of the silly 1024 files per directory limit I'd say it's a very welcome upgrade.
Comment 4 Marcus Meissner 2012-07-24 15:20:40 UTC
Created attachment 72725 [details]
0001-support-both-libgphoto2-2.5.0-and-2.4.0.patch

please try this patch against "core" part of digikam.

it tries to handle both 2.4 and 2.5.
Comment 5 Marcus Meissner 2012-07-24 15:21:36 UTC
(untested yet... will do this in some minutes)
Comment 6 nucleo 2012-07-25 00:05:40 UTC
Patch from Comment 4 fixes build but not tested how digikam works.
http://kojipkgs.fedoraproject.org//packages/digikam/2.7.0/5.fc18/data/logs/i686/build.log
Comment 7 Marcus Meissner 2012-07-27 15:18:31 UTC
it builds, but there is some GPPortInfo lifetime handling off, i need to do some more fixes there
Comment 8 Marcus Meissner 2012-08-15 09:42:21 UTC
Created attachment 73176 [details]
updated and tested libgphoto 2.5/2.4 patch

this patch should work with both 2.4 and 2.5.
i had to rewrite findConnectedUSBCamera a bit ;)
Comment 9 Marcus Meissner 2012-08-15 12:02:50 UTC
(patch is against master ... if any other branch is required i can rebase it there too if necessary ;)
Comment 10 caulier.gilles 2012-08-15 14:48:57 UTC
Thanks Marcus.

git/master is for production. next 2.9.0 will be last stable release without any major changes. Your current patch will be applied into.

There is another 3.0.0 branch where similar patch must be applied, and where we working in-deep currently. Look here for details : 

http://community.kde.org/Digikam/GSoC2012#Repositories_Branching_and_Dates

If you can provide a patch for this branch, it will be great.

Best

Gilles Caulier
Comment 11 Marcus Meissner 2012-08-20 08:26:41 UTC
applies as-is to 3.0.0 branch, but I fail to compile the branch, error is this:

/home/marcus/projects/digikam-sc/core/digikam/utils/componentsinfo.h:81:71: error: ‘class KIPI::PluginLoader’ has no member named ‘kipiPluginsVersion’
Comment 12 Marcus Meissner 2012-08-20 08:27:43 UTC
taking that back, it needs utilities/importui/backend/gpcamera.cpp not seen ...
Comment 13 Victor Dodon 2012-08-20 08:38:22 UTC
(In reply to comment #11)
> applies as-is to 3.0.0 branch, but I fail to compile the branch, error is
> this:
> 
> /home/marcus/projects/digikam-sc/core/digikam/utils/componentsinfo.h:81:71:
> error: ‘class KIPI::PluginLoader’ has no member named ‘kipiPluginsVersion’
digiKam from development/3.0.0 branch requires libkipi 2.0.0 which you can get from development/2.0.0 branch from libkipi repo.

Victor.
Comment 14 caulier.gilles 2012-08-20 13:32:31 UTC
Islam,

I CC you about 3.0.0 branch where Marcus try to apply patch about Gphoto 2.5.0 support...

Gilles Caulier
Comment 15 Islam Wazery 2012-08-21 02:07:49 UTC
I applied it to development/3.0.0 signed with Marcus Meissner name.
Comment 16 caulier.gilles 2012-08-21 07:24:37 UTC
Git commit 1e3fe5480e5311d4d564da79c6eee7ecf7cac774 by Gilles Caulier.
Committed on 21/08/2012 at 09:23.
Pushed by cgilles into branch 'master'.

apply patch from Marcus Meissner to support libgphoto 2.5.0 API

M  +23   -11   CMakeLists.txt
M  +5    -1    NEWS
M  +3    -0    digikam/utils/config-digikam.h.cmake
M  +60   -62   utilities/cameragui/devices/gpcamera.cpp

http://commits.kde.org/digikam/1e3fe5480e5311d4d564da79c6eee7ecf7cac774
Comment 17 Marcus Meissner 2012-08-21 11:29:43 UTC
Islam ... one question, is "utiltiies/importui/backend/gpcamera.cpp" or utilities/cameragui/devices/gpcamera.cpp active? or both?

I see you merged it into importui/backend/gpcamera.cpp, which is probably the newer one?
Comment 18 caulier.gilles 2012-08-21 11:45:06 UTC
Marcus,

Islam, who work to revamp digiKam camera GUI for 3.0.0 through GoSC 2012 project, as just renamed cameragui dir to importui... gpcamera.cpp files from 2.x and 3.x are the same in fact...

Gilles Caulier