Bug 268668 - digiKam does not compile (missing header file, OS X)
Summary: digiKam does not compile (missing header file, OS X)
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Portability-Compilation (show other bugs)
Version: 2.0.0
Platform: MacPorts macOS
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-16 18:14 UTC by Jan Gosmann
Modified: 2022-01-02 08:04 UTC (History)
3 users (show)

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


Attachments
Complete log. (63.98 KB, text/plain)
2011-03-16 18:14 UTC, Jan Gosmann
Details
digiKam 2.0 runing on macbook (389.26 KB, image/png)
2011-03-16 22:13 UTC, caulier.gilles
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Gosmann 2011-03-16 18:14:21 UTC
Created attachment 58099 [details]
Complete log.

Version:           unspecified (using KDE 4.6.1) 
OS:                OS X

I tried to compile from the git repository following the instructions at http://www.digikam.org/drupal/download/GIT

However the build failed with the following error:
/Volumes/Home/blubb/Desktop/digikam/extra/libkmap/demo/demo-main.cpp:35:29: error: libkmap/version.h: No such file or directory
/Volumes/Home/blubb/Desktop/digikam/extra/libkmap/demo/demo-main.cpp: In function ‘int main(int, char**)’:
/Volumes/Home/blubb/Desktop/digikam/extra/libkmap/demo/demo-main.cpp:47: error: ‘kmap_version’ was not declared in this scope

I am using Mac OS X 10.6.6 with KDE installed via MacPorts.

Reproducible: Didn't try
Comment 1 caulier.gilles 2011-03-16 18:23:00 UTC
You are not alone to report this problem.

Sound like version.h.cmake have not be processed by cmake. 

It certainly a missing dependency somewhere...

Can you clean up all and re-run cmake script and post trace here to investigate ?

Gilles Caulier
Comment 2 caulier.gilles 2011-03-16 18:27:39 UTC
Oups, i don't see your trace as attachement.

What is this error :

CMake Warning (dev) at /opt/local/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:86 (INCLUDE):
  File /opt/local/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake
  includes /opt/local/share/apps/cmake/modules/CMakeParseArguments.cmake
  (found via CMAKE_MODULE_PATH) which shadows
  /opt/local/share/cmake-2.8/Modules/CMakeParseArguments.cmake.  This may
  cause errors later on .

  Policy CMP0017 is not set: Prefer files from the CMake module directory
  when including from there.  Run "cmake --help-policy CMP0017" for policy
  details.  Use the cmake_policy command to set the policy and suppress this
  warning.
Call Stack (most recent call first):
  /opt/local/share/cmake-2.8/Modules/FindThreads.cmake:156 (INCLUDE)
  /opt/local/share/apps/cmake/modules/Qt4ConfigDependentSettings.cmake:32 (FIND_PACKAGE)
  /opt/local/share/apps/cmake/modules/FindQt4.cmake:1237 (INCLUDE)
  extra/libkmap/CMakeLists.txt:32 (FIND_PACKAGE)
This warning is for project developers.  Use -Wno-dev to suppress it.

Gilles Caulier
Comment 3 Gert Kello 2011-03-16 18:54:07 UTC
For me it seems that version.h.cmake is processed:

find digikam/build/ -iname version.h
digikam/build/core/digikam/utils/version.h
digikam/build/extra/libkdcraw/libkdcraw/version.h
digikam/build/extra/libkmap/libkmap/version.h
digikam/build/extra/libksane/libksane/version.h
digikam/build/extra/libkexiv2/libkexiv2/version.h
digikam/build/extra/libkface/libkface/version.h
digikam/build/extra/libkipi/libkipi/version.h

Perhaps some include path wrong?
Comment 4 Jan Gosmann 2011-03-16 19:26:01 UTC
I suppose build/extra/libkmap does not get added to the include path.

I do not really now cmake. Is there a way to see the actual compiler invocation to check my assumption?
Comment 5 Jan Gosmann 2011-03-16 19:26:45 UTC
*now = know
Comment 6 Marcel Wiesweg 2011-03-16 20:13:53 UTC
Git commit ad2d797f29b917f06c10c4fa1a90a986f27d9a04 by Marcel Wiesweg.
Committed on 16/03/2011 at 20:13.
Pushed by mwiesweg into branch 'master'.

cmake processed files are to be found in the binary dir.

CCBUG: 268668

M  +1    -1    demo/CMakeLists.txt     

http://commits.kde.org/libkmap/ad2d797f29b917f06c10c4fa1a90a986f27d9a04
Comment 7 caulier.gilles 2011-03-16 20:37:04 UTC
Jan,

Marcel has commited a fix in git. Please update your local source code and try again...

Gilles Caulier
Comment 8 caulier.gilles 2011-03-16 21:17:26 UTC
Jan,

I started to compile 2.x on my macbook. Do you have seen that libgpod port is strange :

-- ----------------------------------------------------------------------------------
-- Starting CMake configuration for: kipi-plugins
-- Check Kexiv2 library in local sub-folder...
-- Found Kexiv2 library in local sub-folder: /Users/agnes/Devel/2.x/extra/libkexiv2
-- Check for Kdcraw library in local sub-folder...
-- Found Kdcraw library in local sub-folder: /Users/agnes/Devel/2.x/extra/libkdcraw
-- Check Kipi library in local sub-folder...
-- Found Kipi library in local sub-folder: /Users/agnes/Devel/2.x/extra/libkipi
-- Found JPEG: /opt/local/lib/libjpeg.dylib 
-- Found ZLIB: /opt/local/include (found version "1.2.5")
-- Found PNG: /opt/local/lib/libpng.dylib 
-- Found TIFF: /opt/local/lib/libtiff.dylib 
-- libkdcraw: Found version 2.0.0 (required: 1.1.0)
-- Found EXPAT: /opt/local/lib/libexpat.dylib 
-- Found LibXml2: /opt/local/lib/libxml2.dylib 
-- Found LibXslt: /opt/local/lib/libxslt.dylib
-- checking for module 'libgpod-1.0'
--   package 'libgpod-1.0' not found
-- checking for module 'gdk-pixbuf-2.0'
--   found gdk-pixbuf-2.0, version 2.22.1
-- Found Gdk: /opt/local/include/gdk-pixbuf-2.0 
-- Found GLIB2: /opt/local/lib/libglib-2.0.dylib 
-- checking for module 'gobject-2.0'
--   found gobject-2.0, version 2.26.1
-- Found GObject libraries: /opt/local/lib/libgobject-2.0.dylib;/opt/local/lib/libgmodule-2.0.dylib;/opt/local/lib/libgthread-2.0.dylib;/opt/local/lib/libglib-2.0.dylib
-- Found GObject includes : /opt/local/include/glib-2.0/gobject
-- Found KdepimLibs: /opt/local/lib/cmake/KdepimLibs/KdepimLibsConfig.cmake 
-- Found QCA2: /opt/local/lib/libqca.dylib 
-- Found libksane: /opt/local/lib/libksane.dylib
-- checking for module 'QJson>=0.5'
--   found QJson, version 0.7.1
-- Found QJSON: qjson;QtCore;z;m 
-- Check Kmap library in local sub-folder...
-- Found Kmap library in local sub-folder: /Users/agnes/Devel/2.x/extra/libkmap
-- CMake version: cmake version 2.8.3

-- CMake version (cleaned): cmake version 2.8.3

-- CMake version is too old: cannot detected OpenMP. Some plugins may have a weaker performance without OpenMP.
-- 
-- ----------------------------------------------------------------------------------
--  kipi-plugins 2.0.0-beta4 dependencies results   <http://www.kipi-plugins.org>
-- 
--  libjpeg library found.................... YES
--  libtiff library found.................... YES
--  libpng library found..................... YES
--  libkipi library found.................... YES
--  libkexiv2 library found.................. YES
--  libkdcraw library found.................. YES
--  libxml2 library found.................... YES (optional)
--  libxslt library found.................... YES (optional)
--  libexpat library found................... YES (optional)
--  native threads support library found..... YES (optional)
--  libopengl library found.................. YES (optional)
--  Qt4 OpenGL module found.................. YES
--  libopencv library found.................. YES (optional)
--  QJson library found...................... YES (optional)
--  libgpod library found.................... NO  (optional)
--  Gdk library found........................ YES (optional)
--  libkdepim library found.................. YES (optional)
--  qca2 library found....................... YES (optional)
--  libkmap library found.................... YES (optional)
--  OpenMP library found..................... NO  (optional)
--  libksane library found................... YES (optional)
-- 
--  kipi-plugins will be compiled............ YES
--  Shwup will be compiled................... YES (optional)
--  YandexFotki will be compiled............. YES (optional)
--  HtmlExport will be compiled.............. YES (optional)
--  AdvancedSlideshow will be compiled....... YES (optional)
--  ImageViewer will be compiled............. YES (optional)
--  AcquireImages will be compiled........... YES (optional)
--  DNGConverter will be compiled............ YES (optional)
--  RemoveRedEyes will be compiled........... YES (optional)
--  Debian Screenshots will be compiled...... YES (optional)
--  IpodExport will be compiled.............. NO  (optional - Look README file for more details about dependencies)
--  Calendar will be compiled................ YES (optional)
--  GPSSync will be compiled................. YES (optional)
-- ----------------------------------------------------------------------------------

libgpod is not detected. It's installed into python component, not as all other C shared library. It's complex to handle. Why ? 

Gilles Caulier
Comment 9 caulier.gilles 2011-03-16 21:19:25 UTC
Scanning dependencies of target kmap_automoc
Generating kmap_common.moc
Generating backend_altitude.moc
Generating dragdrophandler.moc
Generating abstractmarkertiler.moc
Generating backend_altitude_geonames.moc
Generating backend_map_marble.moc
Generating placeholderwidget.moc
Generating tilegrouper.moc
Generating backend_map.moc
Generating modelhelper.moc
Generating html_widget.moc
Generating kmap_widget.moc
Generating itemmarkertiler.moc
Generating backend_map_googlemaps.moc
[  8%] Built target kmap_automoc
Scanning dependencies of target kmap
[  8%] Building CXX object extra/libkmap/libkmap/CMakeFiles/kmap.dir/kmap_automoc.cpp.o
[  8%] Building CXX object extra/libkmap/libkmap/CMakeFiles/kmap.dir/abstractmarkertiler.cpp.o
[  8%] Building CXX object extra/libkmap/libkmap/CMakeFiles/kmap.dir/backend_altitude.cpp.o
[  8%] Building CXX object extra/libkmap/libkmap/CMakeFiles/kmap.dir/backend_altitude_geonames.cpp.o
[  8%] Building CXX object extra/libkmap/libkmap/CMakeFiles/kmap.dir/backend_map.cpp.o
[  8%] Building CXX object extra/libkmap/libkmap/CMakeFiles/kmap.dir/dragdrophandler.cpp.o
[  8%] Building CXX object extra/libkmap/libkmap/CMakeFiles/kmap.dir/html_widget.cpp.o
[  8%] Building CXX object extra/libkmap/libkmap/CMakeFiles/kmap.dir/itemmarkertiler.cpp.o
[  8%] Building CXX object extra/libkmap/libkmap/CMakeFiles/kmap.dir/kmap_widget.cpp.o
[  8%] Building CXX object extra/libkmap/libkmap/CMakeFiles/kmap.dir/kmap_common.cpp.o
[  8%] Building CXX object extra/libkmap/libkmap/CMakeFiles/kmap.dir/modelhelper.cpp.o
[  8%] Building CXX object extra/libkmap/libkmap/CMakeFiles/kmap.dir/placeholderwidget.cpp.o
[  8%] Building CXX object extra/libkmap/libkmap/CMakeFiles/kmap.dir/tilegrouper.cpp.o
[  8%] Building CXX object extra/libkmap/libkmap/CMakeFiles/kmap.dir/tileindex.cpp.o
[  8%] Building CXX object extra/libkmap/libkmap/CMakeFiles/kmap.dir/backend_map_marble.cpp.o
[  9%] Building CXX object extra/libkmap/libkmap/CMakeFiles/kmap.dir/backend_map_marble_layer.cpp.o
[  9%] Building CXX object extra/libkmap/libkmap/CMakeFiles/kmap.dir/backend_map_googlemaps.cpp.o
Linking CXX shared library ../../../lib/libkmap.dylib
[  9%] Built target kmap
Scanning dependencies of target libkmap_calibrator_automoc
Generating calibrator.moc
[  9%] Built target libkmap_calibrator_automoc
Scanning dependencies of target libkmap_calibrator
[  9%] Building CXX object extra/libkmap/calibrator/CMakeFiles/libkmap_calibrator.dir/libkmap_calibrator_automoc.cpp.o
[  9%] Building CXX object extra/libkmap/calibrator/CMakeFiles/libkmap_calibrator.dir/calibrator.cpp.o
Linking CXX executable libkmap_calibrator.app/Contents/MacOS/libkmap_calibrator
[  9%] Built target libkmap_calibrator
Scanning dependencies of target libkmap_demo_automoc
Generating mainwindow.moc
Generating mytreewidget.moc
Generating dragdrophandler.moc
[  9%] Built target libkmap_demo_automoc
Scanning dependencies of target libkmap_demo
[  9%] Building CXX object extra/libkmap/demo/CMakeFiles/libkmap_demo.dir/libkmap_demo_automoc.cpp.o
[  9%] Building CXX object extra/libkmap/demo/CMakeFiles/libkmap_demo.dir/demo-main.cpp.o
[  9%] Building CXX object extra/libkmap/demo/CMakeFiles/libkmap_demo.dir/mainwindow.cpp.o
[  9%] Building CXX object extra/libkmap/demo/CMakeFiles/libkmap_demo.dir/myimageitem.cpp.o
[  9%] Building CXX object extra/libkmap/demo/CMakeFiles/libkmap_demo.dir/mytreewidget.cpp.o
[  9%] Building CXX object extra/libkmap/demo/CMakeFiles/libkmap_demo.dir/dragdrophandler.cpp.o
Linking CXX executable libkmap_demo.app/Contents/MacOS/libkmap_demo
[  9%] Built target libkmap_demo

... libkmap compile fine now...

I will wait until all source code compile fine before to close this file...

Gilles caulier
Comment 10 caulier.gilles 2011-03-16 21:24:30 UTC
Jan,

ligpod with python. Really Why ???

new-host-4:~ agnes$ sudo port info libgpod
libgpod @0.8.0, Revision 3 (multimedia)
Variants:             python26, [+]python27, universal

Description:          libgpod is a library to access the contents of an iPod. This library is based on code used in the gtkpod project. Starting with V0.96.CVS gtkpod depends on
                      this library.
Homepage:             http://www.gtkpod.org/libgpod/

Build Dependencies:   pkgconfig
Library Dependencies: p5-xml-parser, libplist, gdk-pixbuf2, taglib, libusb, py27-gobject, py27-mutagen
Platforms:            darwin
License:              unknown
Maintainers:          rmstonecipher@macports.org, openmaintainer@macports.org

Gilles Caulier
Comment 11 Jan Gosmann 2011-03-16 21:28:16 UTC
Already tried it and the first problem is now solved. However, the build fails now a bit later:

[ 29%] Building CXX object extra/kipi-plugins/advancedslideshow/CMakeFiles/kipiplugin_advancedslideshow.dir/commoncontainer.cpp.o
In file included from /Volumes/Home/blubb/Desktop/digikam/extra/kipi-plugins/advancedslideshow/commoncontainer.cpp:25:
/Volumes/Home/blubb/Desktop/digikam/extra/kipi-plugins/advancedslideshow/commoncontainer.h:39:31: error: Phonon/VolumeSlider: No such file or directory
In file included from /Volumes/Home/blubb/Desktop/digikam/extra/kipi-plugins/advancedslideshow/commoncontainer.cpp:25:
/Volumes/Home/blubb/Desktop/digikam/extra/kipi-plugins/advancedslideshow/commoncontainer.h:128: error: ‘Phonon’ has not been declared
/Volumes/Home/blubb/Desktop/digikam/extra/kipi-plugins/advancedslideshow/commoncontainer.h:128: error: expected `{' before ‘VolumeSlider’
/Volumes/Home/blubb/Desktop/digikam/extra/kipi-plugins/advancedslideshow/commoncontainer.h:128: error: function definition does not declare parameters
/Volumes/Home/blubb/Desktop/digikam/extra/kipi-plugins/advancedslideshow/commoncontainer.cpp:94: error: invalid use of incomplete type ‘class KIPIAdvancedSlideshowPlugin::VolumeSlider’
/Volumes/Home/blubb/Desktop/digikam/extra/kipi-plugins/advancedslideshow/commoncontainer.h:128: error: forward declaration of ‘class KIPIAdvancedSlideshowPlugin::VolumeSlider’
make[2]: *** [extra/kipi-plugins/advancedslideshow/CMakeFiles/kipiplugin_advancedslideshow.dir/commoncontainer.cpp.o] Error 1
make[1]: *** [extra/kipi-plugins/advancedslideshow/CMakeFiles/kipiplugin_advancedslideshow.dir/all] Error 2
make: *** [all] Error 2

This is a problem with case-sensitivity. The file Phonon/VolumeSlider is included, but in my system the Phonon include directory starts with a lower case letter (phonon/...).
I am not sure which notation is correct. This might also be a bug of the MacPort. (Moreover I suppose that it compiles fine with Linux and that should also be case-sensitive.)

Concerning libgpod: That lib was detected correctly for me. My installed version is libgpod @0.8.0_4+python26 (active) (via MacPorts) and the following files can be found in /opt/local/lib where I expect them to be:
libgpod.4.dylib  libgpod.a        libgpod.dylib    libgpod.la
Comment 12 Jan Gosmann 2011-03-16 21:35:43 UTC
From what I can see from the libgpod portfile it will be installed with Python bindings per default. But you are able to deactivate that and remove therefore dependencies to Python by choosing the right variant. (I am not sure about the syntax, but it is probably one of the following commands: "sudo port install libgpod -python27", "sudo port install libgpod +no_python27" or "sudo port isntall libgpod +nopython27".)

However, I do not believe that this will solve the problem in discovering libgpod. But you might want to check your installation. "sudo port installed libgpod" and "sudo port contents libgpod" might be helpful to do so.
Comment 13 caulier.gilles 2011-03-16 22:02:32 UTC
Jan, 

all compile fine on my macbook...

Gilles Caulier
Comment 14 caulier.gilles 2011-03-16 22:13:25 UTC
Created attachment 58105 [details]
digiKam 2.0 runing on macbook

Jan,

digiKam 2.0 start but kioslave do not work. No album content, no tags, no Database handling...

Note : 1.9.0 work fine with the same computer...

Gilles Caulier
Comment 15 Jan Gosmann 2011-03-16 22:31:43 UTC
As workaround I created an uppercase symlink pointing to my lowercase phonon include directory. That way I all compiled fine.
I also checked the Qt and KDE Phonon documentations and in both Phonon is written uppercase in the includes. Therefore the problem probably lies in the MacPort. (The portfile does a lot of stuff which I not really understand with a quick look.)

I suggest to wait until the next stable release of Digikam. If I then encounter the same problem I will to something about this (at least filing a ticket, but maybe fixing it myself as the phonon port has no official maintainer). But I hope the problem will then not occur, because there might be some settings made by the KDE4-portgroup which fix this in the background.
Moreover, this should not affect many users, because OS X uses case-insensitive file systems per default. That is probably the reason why you hadn't any more problems. (I decided to use case-sensitive partitions for all development to prevent myself from such type errors which are annoying when porting to case-sensitive operating systems, i.e. Linux.)

Concerning kioslave:
kdelibs 4.6.0 and Digikam 1.9.0 -> no album content
kdelibs 4.6.1 and Digikam 1.9.1 -> album content, almost everything seems fine
kdelibs 4.6.1 and Digikam 2.0 -> also almost everything seems fine

Two minor problems I encountered:
* There are now album icons in the album folder view.
* If a photo has no geo location information the location view has some graphical errors.
Comment 16 caulier.gilles 2011-03-16 23:02:09 UTC
Jan,

About kioslave problem, please join us on file #224038

Gilles Caulier