Bug 348061

Summary: Build of frameworks/kdoctools fails
Product: [Unmaintained] kde-windows Reporter: Asuka Langley <AsukaLangleyfag>
Component: buildsystemAssignee: KDE-Windows <kde-windows>
Status: RESOLVED FIXED    
Severity: grave CC: kfunk, zrax0111
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Microsoft Windows   
OS: Microsoft Windows   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: Allow colon in Windows path URIs

Description Asuka Langley 2015-05-21 14:47:19 UTC
I used emerge frameworks command after successful building Qt 5.4.3 and met this error while building frameworks/kdoctools

Reproducible: Always

Steps to Reproduce:
1. use master branch of emerge tool
2. try to emerge frameworks
3. when it's building frameworks/kdoctools you will meet error

Actual Results:  
file:///R:/build/frameworks/kdoctools/work/mingw-w64-RelWithDebInfo-master/src/customization/dtd/kdedbx45.dtd:102: warning: failed to load external entity "file:///R:/build/frameworks/kdoctools/work/mingw-w64-RelWithDebInfo-master/src/customization/dtd/r%3A/share/xml/docbook/schema/dtd/4.5/docbookx.dtd"
%DocBookDTD;
            ^
Entity: line 1:
 %DocBookDTD;
             ^
file:///R:/build/frameworks/kdoctools/work/mingw-w64-RelWithDebInfo-master/src/customization/dtd/modifications.elements:42: validity error : PEReference: %div.title.content; not found
<!ELEMENT book %ho; ((%div.title.content;)?, bookinfo,
                                         ^
file:///R:/build/frameworks/kdoctools/work/mingw-w64-RelWithDebInfo-master/src/customization/dtd/modifications.elements:42: parser error : ContentDecl : Name or '(' expected
<!ELEMENT book %ho; ((%div.title.content;)?, bookinfo,
                                         ^
file:///R:/build/frameworks/kdoctools/work/mingw-w64-RelWithDebInfo-master/src/customization/dtd/modifications.elements:42: parser error : expected '>'
<!ELEMENT book %ho; ((%div.title.content;)?, bookinfo,
                                           ^
file:///R:/build/frameworks/kdoctools/work/mingw-w64-RelWithDebInfo-master/src/customization/dtd/modifications.elements:42: parser error : Content error in the external subset
<!ELEMENT book %ho; ((%div.title.content;)?, bookinfo,
                                           ^
man-checkXML5.1.docbook:6: parser error : Entity 'language' not defined
<refentry lang="&language;">
                          ^
man-checkXML5.1.docbook:8: parser error : Entity 'kde' not defined
<title>&kde; User's Manual</title>
            ^
man-checkXML5.1.docbook:20: parser error : Entity 'XML' not defined
<refpurpose>An &XML; lint tool for &kde; DocBook &XML; documents.</refpurpose>
                    ^
man-checkXML5.1.docbook:20: parser error : Entity 'kde' not defined
<refpurpose>An &XML; lint tool for &kde; DocBook &XML; documents.</refpurpose>
                                        ^
man-checkXML5.1.docbook:20: parser error : Entity 'XML' not defined
<refpurpose>An &XML; lint tool for &kde; DocBook &XML; documents.</refpurpose>
                                                      ^
man-checkXML5.1.docbook:32: parser error : Entity 'kde' not defined
<para><command>checkXML5</command> is a tool to check for syntax errors in &kde;
                                                                               ^
man-checkXML5.1.docbook:33: parser error : Entity 'XML' not defined
DocBook &XML; files.  It can also be used for other DocBook based
             ^
man-checkXML5.1.docbook:34: parser error : Entity 'XML' not defined
&XML; files, but you should use the less specific xmllint(1) tool if
     ^
man-checkXML5.1.docbook:35: parser error : Entity 'kde' not defined
you are not writing or otherwise working on &kde;
                                                 ^
Error: `xmllint --noout` outputted text
jom: R:\build\frameworks\kdoctools\work\mingw-w64-RelWithDebInfo-master\docs\checkXML5\CMakeFiles\docs-checkXML5-checkXML5-1.dir\build.make [docs\checkXML5\checkXML5.1] Error 1
jom: R:\build\frameworks\kdoctools\work\mingw-w64-RelWithDebInfo-master\CMakeFiles\Makefile2 [docs\checkXML5\CMakeFiles\docs-checkXML5-checkXML5-1.dir\all] Error 2
jom: R:\build\frameworks\kdoctools\work\mingw-w64-RelWithDebInfo-master\Makefile [all] Error 2
emerge warning: while running make cmd: jom
emerge error: fatal error: package frameworks/kdoctools all failed

Expected Results:  
Built frameworks/kdoctools and continue of building Qt

KDECOMPILER = mingw-w64
Architecture = x64
OS - Windows 10 Technical Preview Build 10074 x64
Comment 1 Asuka Langley 2015-05-27 17:32:39 UTC
Found an actual error: file:///C:/KDE/build/frameworks/kdoctools/work/mingw-w64-RelWithDebInfo-master/src/customization/dtd/kdedbx45.dtd:102: warning: failed to load external entity "file:///C:/KDE/build/frameworks/kdoctools/work/mingw-w64-RelWithDebInfo-master/src/customization/dtd/C%3A/KDE/share/xml/docbook/schema/dtd/4.5/docbookx.dtd"
Not sure if error of makefile or error of cmake. Btw, error with shortways is file:///R:/build/frameworks/kdoctools/work/mingw-w64-RelWithDebInfo-master/src/customization/dtd/kdedbx45.dtd:102: warning: failed to load external entity "file:///R:/build/frameworks/kdoctools/work/mingw-w64-RelWithDebInfo-master/src/customization/dtd/r%3A/share/xml/docbook/schema/dtd/4.5/docbookx.dtd"
Comment 2 Asuka Langley 2015-05-27 18:22:22 UTC
>[ 41%] Generating checkXML5.1
Qt: Untested Windows version 10.0 detected!
file:///C:/KDE/build/frameworks/kdoctools/work/mingw-w64-RelWithDebInfo-master/src/customization/dtd/kdedbx45.dtd:102: warning: failed to load external entity "file:///C:/KDE/build/frameworks/kdoctools/work/mingw-w64-RelWithDebInfo-master/src/customization/dtd/C%3A/KDE/share/xml/docbook/schema/dtd/4.5/docbookx.dtd"
with mingw32-make
Comment 3 Michael 2015-06-26 21:02:42 UTC
Created attachment 93354 [details]
Allow colon in Windows path URIs
Comment 4 Michael 2015-06-26 21:02:51 UTC
I was able to work around this by adding a ':' to the list of escape chars in the kdoctools_encode_uri CMake function.  It is probably not the ideal solution, since ':' should only be unescaped after the drive letter (and only on Windows), but it let me successfully build and install kdoctools.
Comment 5 Asuka Langley 2015-08-06 04:46:14 UTC
Michael-san, how to integrate this with script?
Comment 6 Asuka Langley 2015-08-06 05:11:39 UTC
(In reply to Michael from comment #4)
> I was able to work around this by adding a ':' to the list of escape chars
> in the kdoctools_encode_uri CMake function.  It is probably not the ideal
> solution, since ':' should only be unescaped after the drive letter (and
> only on Windows), but it let me successfully build and install kdoctools.
Tried  to use it with kdoctools.py and got:
r:\emerge\portage\frameworks\tier2\kdoctools\dirtyhack.patch:10: trailing whitespace.
    execute_process(COMMAND perl -MURI::Escape -e "print uri_escape_utf8(\"${escaped_uri}\", \"^A-Za-z0-9\\-\\._~:\\/\");"
fatal: corrupt patch at line 13
Comment 7 Kevin Funk 2015-08-06 06:07:41 UTC
@Asuke: Patch against kdoctools master: https://git.reviewboard.kde.org/r/124542/

I still need to submit it, I'll work on it.
Comment 8 Kevin Funk 2015-08-10 06:13:13 UTC
Git commit 38265304276e6305f72a7e1a68aa1b4193657820 by Kevin Funk.
Committed on 06/08/2015 at 06:36.
Pushed by kfunk into branch 'master'.

uriencode.cmake: Also escape colon (for Windows)
REVIEW: 124542

M  +1    -1    cmake/uriencode.cmake

http://commits.kde.org/kdoctools/38265304276e6305f72a7e1a68aa1b4193657820