Re: jhalfs failure

"Bruce Dubbs" ([email protected] via alfs-discuss Mailing List) <[email protected]>
Newsgroups gmane.linux.lfs.automated
Message-ID <[email protected]>
On 6/13/24 14:23, Bruce Dubbs ([email protected] via alfs-discuss Mailing 
List) wrote:
> I've started getting a failure in jhalfs.  I suspect the problem is actually with 
> libxml2-2.13.0.
> 
> I get: "Error: you need the Docbook XSL stylesheets for running jhalfs" even though I 
> have it installed.
> 
> When starting, jhalfs does some package checks in common/libs/func_check_version.sh:
> 
>    if echo $XML_FILE | xmllint -nonet -noout -postvalid - 2>/dev/null ; then
>      check_version "4.5" "4.5" "DocBook XML DTD"
>    else
>      echo "Error: you need the Docbook XML DTD for running jhalfs"
>      exit 1
>    fi
> 
>    if echo $XML_FILE | xsltproc -nonet -noout - 2>/dev/null ; then
>      check_version "current" "current" "DocBook XSL stylesheets"
>    else
>      echo "Error: you need the Docbook XSL stylesheets for running jhalfs"
>      exit 1
>    fi
> 
> The XML_FILE contains:
> 
>    XML_FILE="<?xml version='1.0' encoding='ISO-8859-1'?>
> <?xml-stylesheet type='text/xsl' 
> href='http://docbook.sourceforge.net/release/xsl/current/xhtml/docbook.xsl'?>
> <!DOCTYPE article PUBLIC '-//OASIS//DTD DocBook XML V4.5//EN'
>    'http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd'>
> <article>
>    <title>Test file</title>
>    <sect1>
>      <title>Some title</title>
>      <para>Some text</para>
>    </sect1>
> </article>"
> 
> If I create that as a file, xmltest, I get
> 
> $ cat xmltest|xsltproc -nonet -noout -
> I/O error : failed to load "-": No such file or directory
> warning: failed to load external entity "-"
> cannot parse -
> 
> Commenting out the second 'else' clause above allows jhalfs to work, but it's a hack.

It seems that the only thing needed is:

diff --git a/common/libs/func_check_version.sh b/common/libs/func_check_version.sh
index a4a8526..d1236c9 100644
--- a/common/libs/func_check_version.sh
+++ b/common/libs/func_check_version.sh
@@ -253,7 +253,7 @@ inline_doc
      exit 1
    fi

-  if echo $XML_FILE | xsltproc -nonet -noout - 2>/dev/null ; then
+  if echo $XML_FILE | xsltproc -nonet -noout 2>/dev/null ; then
      check_version "current" "current" "DocBook XSL stylesheets"
    else
      echo "Error: you need the Docbook XSL stylesheets for running jhalfs"

But it may depend on the version of libxml.  I have:

$ xsltproc --version
Using libxml 21300, libxslt 10139 and libexslt 821
xsltproc was compiled against libxml 21207, libxslt 10139 and libexslt 821
libxslt 10139 was compiled against libxml 21207
libexslt 821 was compiled against libxml 21207

   -- Bruce

-- 
http://lists.linuxfromscratch.org/sympa/info/alfs-discuss
Unsubscribe: See the above information page
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.