Bug 365135 - Digikam 5 fails to build with DIGIKAMSC_COMPILE_DOC=on
Summary: Digikam 5 fails to build with DIGIKAMSC_COMPILE_DOC=on
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Portability-Compilation (show other bugs)
Version: 5.1.0
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-07-06 06:10 UTC by Steven Robbins
Modified: 2017-08-19 20:59 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.2.0


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Steven Robbins 2016-07-06 06:10:57 UTC
The references in showfoto don't seem to work.  I've configured with build dir != source dir and "make" from within obj-x86_64-linux-gnu/doc-translated/digikam/showfoto/ca produces:

steve@riemann{ca}make
cd /home/steve/Packages/digikam/build-area/digikam-5.0.0/obj-x86_64-linux-gnu && /usr/bin/cmake -H/home/steve/Packages/digikam/build-area/digikam-5.0.0 -B/home/steve/Packages/digikam/build-area/digikam-5.0.0/obj-x86_64-linux-gnu --check-build-system CMakeFiles/Makefile.cmake 0
cd /home/steve/Packages/digikam/build-area/digikam-5.0.0/obj-x86_64-linux-gnu && /usr/bin/cmake -E cmake_progress_start /home/steve/Packages/digikam/build-area/digikam-5.0.0/obj-x86_64-linux-gnu/CMakeFiles /home/steve/Packages/digikam/build-area/digikam-5.0.0/obj-x86_64-linux-gnu/doc-translated/digikam/showfoto/ca/CMakeFiles/progress.marks
cd /home/steve/Packages/digikam/build-area/digikam-5.0.0/obj-x86_64-linux-gnu && make -f CMakeFiles/Makefile2 doc-translated/digikam/showfoto/ca/all
make[1]: Entering directory '/home/steve/Packages/digikam/build-area/digikam-5.0.0/obj-x86_64-linux-gnu'
make -f doc-translated/digikam/showfoto/ca/CMakeFiles/doc-translated-digikam-showfoto-ca-index-cache-bz2.dir/build.make doc-translated/digikam/showfoto/ca/CMakeFiles/doc-translated-digikam-showfoto-ca-index-cache-bz2.dir/depend
make[2]: Entering directory '/home/steve/Packages/digikam/build-area/digikam-5.0.0/obj-x86_64-linux-gnu'
cd /home/steve/Packages/digikam/build-area/digikam-5.0.0/obj-x86_64-linux-gnu && /usr/bin/cmake -E cmake_depends "Unix Makefiles" /home/steve/Packages/digikam/build-area/digikam-5.0.0 /home/steve/Packages/digikam/build-area/digikam-5.0.0/doc-translated/digikam/showfoto/ca /home/steve/Packages/digikam/build-area/digikam-5.0.0/obj-x86_64-linux-gnu /home/steve/Packages/digikam/build-area/digikam-5.0.0/obj-x86_64-linux-gnu/doc-translated/digikam/showfoto/ca /home/steve/Packages/digikam/build-area/digikam-5.0.0/obj-x86_64-linux-gnu/doc-translated/digikam/showfoto/ca/CMakeFiles/doc-translated-digikam-showfoto-ca-index-cache-bz2.dir/DependInfo.cmake --color=
make[2]: Leaving directory '/home/steve/Packages/digikam/build-area/digikam-5.0.0/obj-x86_64-linux-gnu'
make -f doc-translated/digikam/showfoto/ca/CMakeFiles/doc-translated-digikam-showfoto-ca-index-cache-bz2.dir/build.make doc-translated/digikam/showfoto/ca/CMakeFiles/doc-translated-digikam-showfoto-ca-index-cache-bz2.dir/build
make[2]: Entering directory '/home/steve/Packages/digikam/build-area/digikam-5.0.0/obj-x86_64-linux-gnu'
Generating index.cache.bz2
cd /home/steve/Packages/digikam/build-area/digikam-5.0.0/doc-translated/digikam/showfoto/ca && /usr/bin/meinproc5 --check --cache /home/steve/Packages/digikam/build-area/digikam-5.0.0/obj-x86_64-linux-gnu/doc-translated/digikam/showfoto/ca//index.cache.bz2 index.docbook
warning: failed to load external entity "../digikam/file-formats.docbook"
index.docbook:193: parser error : Failure to process entity doc-file-formats
&doc-file-formats; </chapter>
                  ^
index.docbook:193: parser error : Entity 'doc-file-formats' not defined
&doc-file-formats; </chapter>
                  ^
Error: `xmllint --noout` outputted text
doc-translated/digikam/showfoto/ca/CMakeFiles/doc-translated-digikam-showfoto-ca-index-cache-bz2.dir/build.make:64: recipe for target 'doc-translated/digikam/showfoto/ca/index.cache.bz2' failed
make[2]: *** [doc-translated/digikam/showfoto/ca/index.cache.bz2] Error 1
make[2]: Leaving directory '/home/steve/Packages/digikam/build-area/digikam-5.0.0/obj-x86_64-linux-gnu'
CMakeFiles/Makefile2:23668: recipe for target 'doc-translated/digikam/showfoto/ca/CMakeFiles/doc-translated-digikam-showfoto-ca-index-cache-bz2.dir/all' failed
make[1]: *** [doc-translated/digikam/showfoto/ca/CMakeFiles/doc-translated-digikam-showfoto-ca-index-cache-bz2.dir/all] Error 2
make[1]: Leaving directory '/home/steve/Packages/digikam/build-area/digikam-5.0.0/obj-x86_64-linux-gnu'
Makefile:141: recipe for target 'all' failed
make: *** [all] Error 2

The file ca/index.docbook defines the missing entity as follows:

  <!ENTITY doc-file-formats     SYSTEM "../digikam/file-formats.docbook">

This path doesn't exist.




Reproducible: Always
Comment 1 caulier.gilles 2016-07-06 06:51:31 UTC
The Canadian translations of showfoto docbook sound like broken.

Gilles Caulier
Comment 2 Steven Robbins 2016-07-06 13:55:08 UTC
I should have been more clear.  ALL translations of the showfoto docs fail in the manner shown; I just truncated the log at the first one.

(PS ca = Catalan, not Canadian)
Comment 3 Josep Ma. Ferrer 2016-07-06 16:44:51 UTC
Could you confirm that this error happens with all languages for showfoto docs? If then, this bug must not be assigned to ca (Catalan) language, but to showfoto docs.
Comment 4 Steven Robbins 2016-07-07 00:20:32 UTC
Yes, that is correct.  The error happens for all languages in the showfoto docs.  Digikam docs build OK.
Comment 5 Burkhard Lück 2016-07-07 05:55:08 UTC
ca builds fine in kde svn.

2 obvious reasons for this error:

1) language ca 
    docs/extragear-graphics/digikam/* missing in tarball

2) all languages
   folder layout in svn 
      [lang]/digikam/*
                /showfoto/*
  folder layout in tarball
      digikam/[lang]/*
      showfoto/[lang]/*
Comment 6 caulier.gilles 2016-07-10 12:45:00 UTC
Git commit 26d56cc7a165e7efce6d22278fbda7a959b4ede3 by Gilles Caulier.
Committed on 10/07/2016 at 12:44.
Pushed by cgilles into branch 'master'.

check if documentation directories are prsent before to try to compile doc plus translations
FIXED-IN: 5.1.0

M  +5    -3    CMakeLists.txt

http://commits.kde.org/scratch/mwiesweg/digikam-sc/26d56cc7a165e7efce6d22278fbda7a959b4ede3
Comment 7 Rex Dieter 2016-07-10 13:18:29 UTC
Even with this commit (against digikam-5.0.0 tarball sources), I'm still seeing failures,

All of similar form:

cd /var/tmp/kdecache-rdieter1/BUILDROOT/digikam-5.0.0/doc-translated/digikam/showfoto/it && /usr/bin/meinproc5 --check --cache /var/tmp/kdecache-rdieter1/BUILDROOT/digikam-5.0.0/x86_64-redhat-linux-gnu/doc-translated/digikam/showfoto/it//index.cache.bz2 index.docbook
warning: failed to load external entity "../digikam/file-formats.docbook"
index.docbook:221: parser error : Failure to process entity doc-file-formats
&doc-file-formats; </chapter>
                  ^
index.docbook:221: parser error : Entity 'doc-file-formats' not defined
&doc-file-formats; </chapter>
                  ^
Error: `xmllint --noout` outputted text
doc-translated/digikam/showfoto/it/CMakeFiles/doc-translated-digikam-showfoto-it-index-cache-bz2.dir/build.make:64: recipe for target 'doc-translated/digikam/showfoto/it/index.cache.bz2' failed
make[2]: *** [doc-translated/digikam/showfoto/it/index.cache.bz2] Error 1
Comment 8 Rex Dieter 2016-07-10 13:22:36 UTC
It's not 100% clear to me where/how entity 'doc-file-formats' is supposed to be set
Comment 9 Rex Dieter 2016-07-10 13:27:46 UTC
ok, I think I found the cause, this only happens if you build out of src tree, since showfoto tries to do:
warning: failed to load external entity "../digikam/file-formats.docbook"

which fails to exist in the out-of-src tree doc build dir.
Comment 10 caulier.gilles 2016-07-10 13:29:48 UTC
Note : Forget the docbook compilation. It's broken in translations. We tried to package it, but it cannot be compiled. Problem is located in translations. The English reference handbook compile fine else.

This is why we have dropped handbook from the tarball.

Gilles Caulier
Comment 11 caulier.gilles 2016-07-10 13:37:00 UTC
With my previous commit, if doc sub dir is not present and if DIGIKAMSC_COMPILE_DOC=ON, cmake report :

"At least, one documentation directory is missing. Compilation of documentation is disabled..."

And doc is not compiled as expected...
Comment 12 Rex Dieter 2016-07-10 13:45:40 UTC
OK, silly me, comment #5 nailed it, the folder layout is wrong.  tarball includes:
doc-translated/digikam/digikam/<lang>
doc-translated/digikam/showfoto/<lang>

and the cmake/buildsystem expects:
doc-translated/digikam/<lang>/digikam/
doc-translated/digikam/<lang>showfoto/

So just a matter of changing layout to match this expectation in the next release.
Comment 13 caulier.gilles 2016-07-10 13:48:32 UTC
You want mean that directories tree hierarchy in doc translated is wrong. It's generated by a ruby script at release time. I take a look

Gilles Caulier
Comment 14 Rex Dieter 2016-07-10 13:58:14 UTC
It's just that currently showfoto translations include references to ../digikam/ like:
warning: failed to load external entity "../digikam/file-formats.docbook"
so either the folder layout has to match that expectation (like the english docs do in the tarball), or some other better fix needs to happen.
Comment 15 caulier.gilles 2016-07-10 14:00:52 UTC
You has right, dir tree in doc-translated is not good.

Gilles Caulier
Comment 16 caulier.gilles 2016-07-10 14:47:57 UTC
Done :

[gilles@localhost 5.x]$ ./bootstrap.linux
Qt5     Install Path : /usr/lib64/qt5
KF5     Install Path : /usr
digiKam Install Path : /usr
-- ----------------------------------------------------------------------------------
-- Starting CMake configuration for: digikam-software-collection
-- Could NOT find Ruby (missing:  RUBY_INCLUDE_DIR RUBY_LIBRARY RUBY_CONFIG_INCLUDE_DIR) (found version "2.2.0")
-- Extract documentation translation files from KDE repositories. Please wait, it can take a while...
-- NOTE: (u) want mean uncomplete translations files, which will be removed from compilation.
digikam: af(u) ar(u) az(u) be(u) bg(u) bn(u) br(u) bs(u) ca(u) cs(u) csb(u) cy(u) da(u) de(u) el(u) en_GB(u) eo(u) es(u) et(u) eu(u) fa(u) fi(u) fo(u) fr(u) fy(u) ga(u) gl(u) ha(u) he(u) hi(u) hr(u) hsb(u) hu(u) id(u) is(u) it ja(u) ka(u) kk(u) km(u) ko(u) ku(u) lb(u) lo(u) lt(u) lv(u) mi(u) mk(u) mn(u) ms(u) mt(u) nb(u) nds(u) ne(u) nl nn(u) nso(u) oc(u) pa(u) pl(u) pt pt_BR ro(u) ru(u) rw(u) se(u) sk(u) sl(u) sq(u) sr(u) sr@Latn(u) ss(u) sv ta(u) te(u) tg(u) th(u) tr(u) tt(u) uk uz(u) uz@cyrillic(u) ven(u) vi(u) wa(u) xh(u) zh_CN(u) zh_HK(u) zh_TW(u) zu(u) 
showfoto: it nl pt pt_BR sv uk 
kipi-plugins: af(u) ar(u) az(u) be(u) bg(u) bn(u) br(u) bs(u) ca(u) cs(u) csb(u) cy(u) da(u) de(u) el(u) en_GB(u) eo(u) es(u) et(u) eu(u) fa(u) fi(u) fo(u) fr(u) fy(u) ga(u) gl(u) ha(u) he(u) hi(u) hr(u) hsb(u) hu(u) id(u) is(u) it(u) ja(u) ka(u) kk(u) km(u) ko(u) ku(u) lb(u) lo(u) lt(u) lv(u) mi(u) mk(u) mn(u) ms(u) mt(u) nb(u) nds(u) ne(u) nl(u) nn(u) nso(u) oc(u) pa(u) pl(u) pt(u) pt_BR(u) ro(u) ru(u) rw(u) se(u) sk(u) sl(u) sq(u) sr(u) sr@Latn(u) ss(u) sv(u) ta(u) te(u) tg(u) th(u) tr(u) tt(u) uk(u) uz(u) uz@cyrillic(u) ven(u) vi(u) wa(u) xh(u) zh_CN(u) zh_HK(u) zh_TW(u) zu(u) 
-- Documentation translation files extraction done.
-- ----------------------------------------------------------------------------------
-- Compilation configuration for: digikam-software-collection
-- digiKam core will be compiled.................. NO
-- Kipiplugins will be compiled................... NO
-- Local shared libkipi will be compiled.......... NO
-- Local shared libksane will be compiled......... NO
-- Local shared libmediawiki will be compiled..... NO
-- Local shared libkvkontakte will be compiled.... NO
-- Extract application translations files......... NO
-- Extract documentation translations files....... YES
-- Translations will be compiled.................. NO
-- Handbooks will be compiled..................... YES
-- Tests code will be compiled.................... YES
-- Found KF5: success (found version "5.23.0") found components:  DocTools 
-- Found KF5: success (found suitable version "5.23.0", minimum required is "5.1.0") found components:  DocTools 
-- Configuring done
-- Generating done
-- Build files have been written to: /home/gilles/Devel/5.x/build
Now run make in /home/gilles/Devel/5.x/build.

[gilles@localhost 5.x]$ 
[gilles@localhost doc]$ make 
Scanning dependencies of target doc-digikam-digikam-index-cache-bz2
[ 33%] Generating index.cache.bz2
[ 33%] Built target doc-digikam-digikam-index-cache-bz2
Scanning dependencies of target doc-digikam-showfoto-index-cache-bz2
[ 66%] Generating index.cache.bz2
[ 66%] Built target doc-digikam-showfoto-index-cache-bz2
Scanning dependencies of target doc-kipi-plugins-index-cache-bz2
[100%] Generating index.cache.bz2
[100%] Built target doc-kipi-plugins-index-cache-bz2

[gilles@localhost doc]$ 
[gilles@localhost doc-translated]$ make
Scanning dependencies of target doc-translated-digikam-it-showfoto-index-cache-bz2
[ 16%] Generating showfoto/index.cache.bz2
[ 16%] Built target doc-translated-digikam-it-showfoto-index-cache-bz2
Scanning dependencies of target doc-translated-digikam-nl-showfoto-index-cache-bz2
[ 33%] Generating showfoto/index.cache.bz2
[ 33%] Built target doc-translated-digikam-nl-showfoto-index-cache-bz2
Scanning dependencies of target doc-translated-digikam-pt-showfoto-index-cache-bz2
[ 50%] Generating showfoto/index.cache.bz2
[ 50%] Built target doc-translated-digikam-pt-showfoto-index-cache-bz2
Scanning dependencies of target doc-translated-digikam-pt-BR-showfoto-index-cache-bz2
[ 66%] Generating showfoto/index.cache.bz2
I/O warning : failed to load external entity "/usr/share/kf5/kdoctools/customization/xsl/pt-BR.xml"
No "pt_br" localization of "footer-doc-comment" exists; using "en".
No "pt_br" localization of "footer-doc-feedback" exists; using "en".
No "pt_br" localization of "footer-doc-teamname" exists; using "en".
No "pt_br" localization of "footer-doc-comment" exists; using "en".
No "pt_br" localization of "footer-doc-feedback" exists; using "en".
No "pt_br" localization of "footer-doc-teamname" exists; using "en".
No "pt_br" localization of "footer-doc-comment" exists; using "en".
No "pt_br" localization of "footer-doc-feedback" exists; using "en".
No "pt_br" localization of "footer-doc-teamname" exists; using "en".
No "pt_br" localization of "footer-doc-comment" exists; using "en".
No "pt_br" localization of "footer-doc-feedback" exists; using "en".
No "pt_br" localization of "footer-doc-teamname" exists; using "en".
No "pt_br" localization of "footer-doc-comment" exists; using "en".
No "pt_br" localization of "footer-doc-feedback" exists; using "en".
No "pt_br" localization of "footer-doc-teamname" exists; using "en".
No "pt_br" localization of "footer-doc-comment" exists; using "en".
No "pt_br" localization of "footer-doc-feedback" exists; using "en".
No "pt_br" localization of "footer-doc-teamname" exists; using "en".
No "pt_br" localization of "footer-doc-comment" exists; using "en".
No "pt_br" localization of "footer-doc-feedback" exists; using "en".
No "pt_br" localization of "footer-doc-teamname" exists; using "en".
No "pt_br" localization of "footer-doc-comment" exists; using "en".
No "pt_br" localization of "footer-doc-feedback" exists; using "en".
No "pt_br" localization of "footer-doc-teamname" exists; using "en".
No "pt_br" localization of "footer-doc-comment" exists; using "en".
No "pt_br" localization of "footer-doc-feedback" exists; using "en".
No "pt_br" localization of "footer-doc-teamname" exists; using "en".
[ 66%] Built target doc-translated-digikam-pt-BR-showfoto-index-cache-bz2
Scanning dependencies of target doc-translated-digikam-sv-showfoto-index-cache-bz2
[ 83%] Generating showfoto/index.cache.bz2
[ 83%] Built target doc-translated-digikam-sv-showfoto-index-cache-bz2
Scanning dependencies of target doc-translated-digikam-uk-showfoto-index-cache-bz2
[100%] Generating showfoto/index.cache.bz2
[100%] Built target doc-translated-digikam-uk-showfoto-index-cache-bz2

[gilles@localhost doc-translated]$
Comment 17 caulier.gilles 2016-07-10 14:51:31 UTC
Git commit 583562a182662fb91d3a52e5aec79fce90f9249d by Gilles Caulier.
Committed on 10/07/2016 at 14:48.
Pushed by cgilles into branch 'master'.

fix doc i18n extract to respect right dir tree to compile

M  +5    -5    bootstrap.linux
M  +40   -57   project/release/fetch_l10n_doc.rb

http://commits.kde.org/scratch/mwiesweg/digikam-sc/583562a182662fb91d3a52e5aec79fce90f9249d
Comment 18 Rex Dieter 2016-08-09 13:12:27 UTC
digikam-5.1.0 tarball appears to have gotten this wrong still, but in a different way than before.  Now the layout is correct, but CMakeLists.txt is incorrect, for example,

digikam-5.1.0/doc-translated/digikam/it/CMakeLists.txt contains:
KDOCTOOLS_CREATE_HANDBOOK( showfoto/index.docbook INSTALL_DESTINATION ${HTML_INSTALL_DIR}/it/ SUBDIR digikam )

Only the showfoto handbook is installed, and is installed to the wrong place.
Comment 19 caulier.gilles 2016-08-10 08:35:50 UTC
Git commit 32655482fb47e46a3521ec3a8b523a217529441f by Gilles Caulier.
Committed on 10/08/2016 at 08:34.
Pushed by cgilles into branch 'master'.

when CMakeLists.txt file is created for showfoto documentation i18n build, do not overwrite digikam doc rules, just append new showfoto rules
FIXED-IN: 5.2.0

M  +2    -2    project/release/fetch_l10n_doc.rb

http://commits.kde.org/scratch/mwiesweg/digikam-sc/32655482fb47e46a3521ec3a8b523a217529441f
Comment 20 Steven Robbins 2016-08-11 04:56:46 UTC
Looking for the patch to cherry-pick.  The link given doesn't lead anywhere.  How can I find the patch?
Comment 21 caulier.gilles 2016-08-11 06:28:40 UTC
[gilles@localhost release]$ git log -u -1 32655482fb47e46a3521ec3a8b523a217529441f
commit 32655482fb47e46a3521ec3a8b523a217529441f
Author: Gilles Caulier <caulier.gilles@gmail.com>
Date:   Wed Aug 10 10:34:18 2016 +0200

    when CMakeLists.txt file is created for showfoto documentation i18n build, do not overwrite digikam doc rules, just append new showfoto rules
    BUGS: 365135
    FIXED-IN: 5.2.0

diff --git a/project/release/fetch_l10n_doc.rb b/project/release/fetch_l10n_doc.rb
index 743b3f0..3ed8eac 100755
--- a/project/release/fetch_l10n_doc.rb
+++ b/project/release/fetch_l10n_doc.rb
@@ -168,8 +168,8 @@ i18nlangs.each_line do |lang|
             end
 
             if (complete == true)
-                makefile = File.open( "CMakeLists.txt", File::RDWR)
-                makefile << "KDOCTOOLS_CREATE_HANDBOOK( showfoto/index.docbook INSTALL_DESTINATION ${HTML_INSTALL_DIR}/#{lang}/ SUBDIR digikam )"
+                makefile = File.open( "CMakeLists.txt", "a")
+                makefile << "\nKDOCTOOLS_CREATE_HANDBOOK( showfoto/index.docbook INSTALL_DESTINATION ${HTML_INSTALL_DIR}/#{lang}/ SUBDIR digikam )"
                 makefile.close()
             end