Bug 269511 - cmake install files include wrong path for libmediawiki/version.h
Summary: cmake install files include wrong path for libmediawiki/version.h
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Portability-Cmake (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-27 04:52 UTC by Thomas Caswell
Modified: 2022-01-31 16:33 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 2.0.0


Attachments
tweaks CMakeLists.txt (2.23 KB, patch)
2011-03-28 01:23 UTC, Thomas Caswell
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Caswell 2011-03-27 04:52:44 UTC
Version:           2.0.0 (using KDE 4.5.1) 
OS:                Linux

when building from the git repos the file

$BULID_DIR/extra/libmediawiki/libmediawiki/cmake_install.cmake

has an error in where to find version.h on line 90 in the files list it has:
"$SRC_DIR/extra/libmediawiki/libmediawiki/version.h"
It should have:
"$BUILD_DIR/extra/libmediawiki/libmediawiki/version.h"

changing this by hand allows digikam to install

My understanding is this is a generated file, but I do not know cmake well enough to figure out where it is being generated.

Reproducible: Always

Steps to Reproduce:
check out a clean copy from git, build and install

Actual Results:  
reports an error during install that version.h does not exist

Expected Results:  
successfully install
Comment 1 caulier.gilles 2011-03-27 10:23:12 UTC
Git commit 985dcf72dc3545d647124139140f4465a28d8552 by Gilles Caulier.
Committed on 27/03/2011 at 10:25.
Pushed by cgilles into branch 'master'.

use bin dir to install hearder files
BUGS: 269511

M  +22   -22   libmediawiki/CMakeLists.txt     

http://commits.kde.org/libmediawiki/985dcf72dc3545d647124139140f4465a28d8552
Comment 2 Thomas Caswell 2011-03-28 01:23:15 UTC
Created attachment 58385 [details]
tweaks CMakeLists.txt
Comment 3 Thomas Caswell 2011-03-28 01:24:13 UTC
This change breaks the rest of the header files as they are not copied to the build directory.
Comment 4 caulier.gilles 2011-03-28 19:45:22 UTC
Thomas,

There is no reason to apply this patch. version.h is has managed as all other header files... I compiled and installed the library under linux/Mocos, and windows without any problem...

Gilles Caulier
Comment 5 Thomas Caswell 2011-03-30 23:24:18 UTC
On Mon, 2011-03-28 at 19:45 +0200, Gilles Caulier wrote:
> https://bugs.kde.org/show_bug.cgi?id=269511
> 
> 
> Gilles Caulier <caulier.gilles@gmail.com> changed:
> 
>            What    |Removed                     |Added
> ----------------------------------------------------------------------------
>                  CC|                            |caulier.gilles@gmail.com
> 
> 
> 
> 
> --- Comment #4 from Gilles Caulier <caulier gilles gmail com>  2011-03-28 19:45:22 ---
> Thomas,
> 
> There is no reason to apply this patch. version.h is has managed as all other
> header files... I compiled and installed the library under linux/Mocos, and
> windows without any problem...
> 
> Gilles Caulier
> 

When I built it (updated ubuntu 10.10) the other header files were not
copied to the build directory.  If you got it to compile and install, I
assume the problem in on my end.  Unfortunately the hdd in the computer
I was building this on died so it will be a bit before I can try to sort
out what was going on.

Tom Caswell
Comment 6 Philip Johnsson 2011-03-31 13:44:16 UTC
I get the same problems with libmediawiki building Digikam 2.0 beta4 using cmake, make and make install without any package building tools on Kubuntu 10.10. The only header that gets installed to my building dir (digikam-2.0.0-beta4/builddir/extra/libmediawiki/libmediawiki/) is version.h so make install breaks with missing headers. All other headers are missing there.

-- Set runtime path of "/opt/digikam2/usr/lib/libmediawiki.so.1.0.0" to "/opt/digikam2/usr/lib"
CMake Error at extra/libmediawiki/libmediawiki/cmake_install.cmake:76 (FILE):
  file INSTALL cannot find
  "/media/sdd2/backup/download/source/done/digikam/digikam2/digikam-2.0.0-beta4/builddir/extra/libmediawiki/libmediawiki/image.h".
Call Stack (most recent call first):
  extra/libmediawiki/cmake_install.cmake:51 (INCLUDE)
  extra/cmake_install.cmake:43 (INCLUDE)
  cmake_install.cmake:37 (INCLUDE)

My guess is that anyone building and installing digikam directly from digikam source code root and not using any staging directory for building does not get this problem but if you use a special builddir like I do or package building tools like pbuilder on debian you would also would get this problem.

Could this problem effect other parts of the build and install process or just in this case?
Comment 7 caulier.gilles 2011-03-31 14:48:42 UTC
Philip,

If libkdcraw, libkexiv2 and libkipi installation is fine, i will try to use the same way with libmediawiki (which is a little bit different)

To test, i recommend to checkout code from git master, using this super repository :

https://projects.kde.org/projects/extragear/graphics/digikam/digikam-software-compilation

Gilles Caulier
Comment 8 caulier.gilles 2011-03-31 14:57:45 UTC
Git commit e3991d324061c6caa043193dad47a7df3ff58007 by Gilles Caulier.
Committed on 31/03/2011 at 15:00.
Pushed by cgilles into branch 'master'.

do not use a container to host header files list
CCBUGS: 269511

M  +25   -26   libmediawiki/CMakeLists.txt     

http://commits.kde.org/libmediawiki/e3991d324061c6caa043193dad47a7df3ff58007
Comment 9 caulier.gilles 2011-03-31 14:58:06 UTC
[root@localhost libmediawiki]# pwd
/mnt/data/Devel/GIT/2.x/extra/libmediawiki
[root@localhost libmediawiki]# make install
[  0%] Built target mediawiki_automoc
[100%] Built target mediawiki
[100%] Built target editSample_automoc
[100%] Built target editSample
[100%] Built target uploadSample_automoc
[100%] Built target uploadSample
Install the project...
-- Install configuration: "debugfull"                                                                                         
-- Up-to-date: /usr/lib/pkgconfig/libmediawiki.pc
-- Up-to-date: /usr/share/apps/cmake/modules/FindMediawiki.cmake
-- Up-to-date: /usr/lib/libmediawiki.so.1.0.0
-- Up-to-date: /usr/lib/libmediawiki.so.1
-- Up-to-date: /usr/lib/libmediawiki.so
-- Up-to-date: /usr/include/libmediawiki/image.h
-- Up-to-date: /usr/include/libmediawiki/imageinfo.h
-- Up-to-date: /usr/include/libmediawiki/mediawiki.h
-- Up-to-date: /usr/include/libmediawiki/login.h
-- Up-to-date: /usr/include/libmediawiki/logout.h
-- Up-to-date: /usr/include/libmediawiki/queryimageinfo.h
-- Up-to-date: /usr/include/libmediawiki/queryimages.h
-- Up-to-date: /usr/include/libmediawiki/querysiteinfogeneral.h
-- Up-to-date: /usr/include/libmediawiki/generalinfo.h
-- Up-to-date: /usr/include/libmediawiki/querysiteinfousergroups.h
-- Up-to-date: /usr/include/libmediawiki/queryrevision.h
-- Up-to-date: /usr/include/libmediawiki/queryinfo.h
-- Up-to-date: /usr/include/libmediawiki/edit.h
-- Up-to-date: /usr/include/libmediawiki/job.h
-- Up-to-date: /usr/include/libmediawiki/usergroup.h
-- Up-to-date: /usr/include/libmediawiki/revision.h
-- Up-to-date: /usr/include/libmediawiki/page.h
-- Up-to-date: /usr/include/libmediawiki/parse.h
-- Up-to-date: /usr/include/libmediawiki/protection.h
-- Up-to-date: /usr/include/libmediawiki/upload.h
-- Up-to-date: /usr/include/libmediawiki/mediawiki_export.h
-- Up-to-date: /usr/include/libmediawiki/version.h
Comment 10 Andreas K. Huettel 2011-03-31 15:02:09 UTC
Gilles, 
I have not checked yet if your fix works, but here is how to test it:
The difference is whether the cmake build is "in source" or "out of source". 

In the release beta4, the above error came up only when doing an "out of source" build (which is the Gentoo default). Switching to "in source build" worked around the problem.
Comment 11 Philip Johnsson 2011-03-31 15:06:51 UTC
libkdcraw, libkexiv2 and libkipi installation is fine so it's just libmediawiki that have this problem with installation of headers.