Bug 357050

Summary: kdoctools fails to compile: failed to load external entity "Q:///kdoctools/docs/checkXML5/dtd/kdedbx45.dtd"
Product: [Frameworks and Libraries] frameworks-kdoctools Reporter: Gleb Popov <6yearold>
Component: generalAssignee: Documentation Editorial Team <kde-doc-english>
Status: RESOLVED NOT A BUG    
Severity: normal CC: kde-windows, kdelibs-bugs, luigi.toscano
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Microsoft Windows   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Gleb Popov 2015-12-22 15:11:08 UTC
When building on Windows using emerge i get:

....
Loaded URL=" R:///share/xml/docbook/xsl-stylesheets-1.78.1/manpages/table.xsl " ID="  "
Loaded URL=" R:///share/xml/docbook/xsl-stylesheets-1.78.1/manpages/pi.xsl " ID="  "
Loaded URL=" Q:/kdoctools/docs/checkXML5/man-checkXML5.1.docbook " ID="  "
nbpaths:  0
Q:/kdoctools/docs/checkXML5/man-checkXML5.1.docbook:4: warning: failed to load external entity "Q:///kdoctools/docs/checkXML5/dtd/kdedbx45.dtd"
]>
  ^
Q:/kdoctools/docs/checkXML5/man-checkXML5.1.docbook:6: parser error : Entity 'language' not defined
<refentry lang="&language;">
                          ^
Q:/kdoctools/docs/checkXML5/man-checkXML5.1.docbook:22: parser error : Entity 'XML' not defined
<refpurpose>An &XML; lint tool for &kde; DocBook &XML; documents.</refpurpose>
                    ^
Q:/kdoctools/docs/checkXML5/man-checkXML5.1.docbook:22: parser error : Entity 'kde' not defined
<refpurpose>An &XML; lint tool for &kde; DocBook &XML; documents.</refpurpose>
                                        ^
...

Error: Unable to parse "Q:/kdoctools/docs/checkXML5/man-checkXML5.1.docbook"
NMAKE : fatal error U1077: 'R:\build\frameworks\kdoctools\work\msvc2015-Debug-master\bin\meinproc5.exe' : return code '0
x1'
Stop.



Reproducible: Always

Steps to Reproduce:
emerge -i kdoctools
Comment 1 Gleb Popov 2015-12-22 15:12:43 UTC
From my own observations:

In xslt.cpp

static xmlChar *paths[MAX_PATHS + 1];
static int nbpaths = 0;

aren't seem to be filled. Could it be the cause?
Comment 2 Luigi Toscano 2015-12-22 15:27:31 UTC
CC-ing kde-windows, as they explicitely patched kdoctools to make sure that the path is properly discovered.

I'm not an emerge expert - did you configured something specific to use R and Q drives?
Comment 3 Gleb Popov 2015-12-22 16:50:26 UTC
If you are talking about https://quickgit.kde.org/?p=kdoctools.git&a=commit&h=38265304276e6305f72a7e1a68aa1b4193657820 then it is not relevant, from what i can tell.

Regarding drive names, it's just an emerge option to shorten paths. R: is pointing to KDEROOT (where all stuff is installed) and Q: is KDEROOT/download/git (CMAKE_SOURCE_DIR, basically).
Comment 4 Luigi Toscano 2015-12-22 17:35:48 UTC
No, I was talking about the (even older) codepaths in the CMakeLists.txt, like:
https://quickgit.kde.org/?p=kdoctools.git&a=blob&h=136fbfb9aff25f30f10c7eea7b32c65f5a2e6ad8&hb=16375e15367eb8c496f88db3bfc8acb17883f920&f=src%2FCMakeLists.txt#l97
Comment 5 Gleb Popov 2015-12-22 17:44:34 UTC
This code is related to installation step, but i'm getting errors on building stage.
Comment 6 Gleb Popov 2015-12-29 09:09:20 UTC
The problem was with my setup (or MSVC specifics). I had Qt compiled in Debug mode and libxml2 compiled in RelWithDebInfo mode. Because of this, env variables set with qputenv() was not visible to libxml2. This was causing kde's catalog.xml to not load.

Rebuilding libxml2 fixed this, sorry for the noise.