--nextPart13025502.NHntQ2qIML Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Monday 17 December 2007, Alexander Neundorf wrote: > On Monday 17 December 2007, Andreas Pakulat wrote: > > On 17.12.07 21:12:28, Alexander Neundorf wrote: > > > currently kdelibs doesn't build if the source dir contains > > > spaces: man-checkXML.1.docbook:4: warning: failed to load > > > external entity "dtd/kdex.dtd" > > > > > > strace says the following: > > > stat64("/home/alex/src/kde4-svn/KDE", 0xbfcf68ec) =3D -1 ENOENT (No > > > such file or directory) > > > stat64("dir/kdelibs/kdoctools/customization/catalog", 0xbfcf68ec) > > > =3D -1 ENOENT (No such file or directory) > > > > > > This is obviously wrong and should be: > > > stat64("/home/alex/src/kde4-svn/KDE\ > > > dir/kdelibs/kdoctools/customization/catalog", ... ) > > > > > > So, is libxml actually able to deal with paths which contains > > > spaces ? Or are we just forgetting somewhere to escape some paths > > > ? > > > > > > (libxml docs seem to say that separators are the colon and > > > spaces, which doesn't sound good...) > > > > That would be really bad, however calling xmllint with a file that > > lies in a dir with spaces works fine. So hopefully its just some > > CMake-part that doesn't quote properly. > > My mail was too short. > Here are the results from running it manually: > kdelibs-cmake-HEAD/doc/kbuildsycoca4$ ../../bin/meinproc4 > --stylesheet /home/alex/src/kde4-svn/KDE\ > dir/kdelibs/kdoctools/docbook/xsl/manpages/docbook.xsl --check > --srcdir=3D/home/alex/src/kde4-svn/KDE\ dir/kdelibs/kdoctools/ > /home/alex/src/kde4-svn/KDE\ > dir/kdelibs/doc/kbuildsycoca4/man-kbuildsycoca4.8.docbook > meinproc4(27435) KLocalePrivate::initFormat: > KLocalePrivate::KLocalePrivate -- srcdir=3D > -/home/alex/src/kde4-svn/KDE dir/kdelibs/kdoctools- > man-kbuildsycoca4.8.docbook:4: warning: failed to load external > entity "dtd/kdex.dtd" > ]> > ^ > man-kbuildsycoca4.8.docbook:6: validity error : Validation failed: no > DTD found ! > > > > This is the command as it is executed when building. As you can see > the spaces are escaped with backslashes. > Now I replaced them with double quotes: > > kdelibs-cmake-HEAD/doc/kbuildsycoca4$ ../../bin/meinproc4 > --stylesheet "/home/alex/src/kde4-svn/KDE > dir/kdelibs/kdoctools/docbook/xsl/manpages/docbook.xsl" --check > --srcdir=3D"/home/alex/src/kde4-svn/KDE dir/kdelibs/kdoctools/" > "/home/alex/src/kde4-svn/KDE > dir/kdelibs/doc/kbuildsycoca4/man-kbuildsycoca4.8.docbook" > meinproc4(27458) KLocalePrivate::initFormat: > KLocalePrivate::KLocalePrivate -- srcdir=3D > -/home/alex/src/kde4-svn/KDE dir/kdelibs/kdoctools- > man-kbuildsycoca4.8.docbook:4: warning: failed to load external > entity "dtd/kdex.dtd" > ]> > ^ > man-kbuildsycoca4.8.docbook:6: validity error : Validation failed: no > DTD found ! > > ^ > man-kbuildsycoca4.8.docbook:9: parser error : Entity 'kde' not > defined &kde; User's Manual > > > The strace output was in my first mail. > > Actually it is already one month ago when I found that, and I sent an > email to kdelibs-bugs then, so the details are not completely fresh. > But I think somewhere in libxml the arguments are parsed and escaping > space isn't supported. Can somebody confirm this ? The following code-snippet in meinproc.cpp looks highly suspicious to=20 me: =3D=3D=3D=3D=3D QString catalogs; catalogs +=3D=20 KStandardDirs::locate( "dtd", "customization/catalog" ); catalogs +=3D ' '; catalogs +=3D=20 KStandardDirs::locate( "dtd", "docbook/xml-dtd-4.1.2/docbook.cat" ); setenv( "SGML_CATALOG_FILES", QFile::encodeName(=20 catalogs ).constData(), 1); =3D=3D=3D=3D=3D I haven't verified, but it seems the spaces in the return value of=20 KStandardDirs::locate() are not escaped and thus an incorrect value is=20 put into SGML_CATALOG_FILES. So the bug is obviously in meinproc.cpp=20 and not in libxml. Maybe catalogs +=3D KShell::quoteArg(=20 KStandardDirs::locate( "dtd", "customization/catalog" ) ); catalogs +=3D ' '; catalogs +=3D KShell::quoteArg(=20 KStandardDirs::locate( "dtd", "docbook/xml-dtd-4.1.2/docbook.cat" ) ); fixes the problem, but that's just a wild guess. Regards, Ingo --nextPart13025502.NHntQ2qIML Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.4-svn0 (GNU/Linux) iD8DBQBHZve+GnR+RTDgudgRAvwOAJoD5ODjzjwkKnNmfspsB5fn2Xl9rgCgxNKF Ditszvy92dAEqSiHEd7OEeo= =oYZB -----END PGP SIGNATURE----- --nextPart13025502.NHntQ2qIML--