[xml/sgml] Buildd failure for docbook2x

Rafael Laboissiere Rafael Laboissiere <rafael@debian.org>
Thu, 29 Apr 2004 12:23:53 +0200


[Cc to the upstream docbook2x mailing list]

* Rafael Laboissiere <rafael@debian.org> [2004-04-28 17:10]:

> The failure above happens also on hppa, sparc, and powerpc.  I investigated
> a little deeper on sparc and found that the problem occurs when the method
> parse() of the XML::Parser::PerlSAX module is called.  The db2x_texixml
> script simply fails without any error message and when I comment the call to
> XML::Parser::PerlSAX->parse(), the "broken pipe" message above disappears
> and the package builds (of course, this changes makes the the resulting
> package useless, but this is only for test purposes).
> 
> Are there issues regarding libxml-perl, libxml-parser-perl of libexpat1 on
> those architectures?

I finally found the source of the problem.  It is a bug in the upstream
sources of docbook2x.  Here is the patch:

============================================================================
--- docbook2x-0.8.2.orig/utf8trans/hash.c
+++ docbook2x-0.8.2/utf8trans/hash.c
@@ -22,12 +22,14 @@
 }
 
 
+/* mallocc MUST return a value.  Fixed by Rafael Laboissiere on 2004-04-29 */
 void *mallocc(size_t size) {
        void *p = malloc(size);
        if(!p) {
                fprintf(stderr, "malloc(): out of memory\n");
                abort();
        }
+       return p;
 }
 
 struct hashtable 
============================================================================
 
The docbook2x package builds correctly on sparc now (at least when I
manually built it on vore.debian.org).

I will soon upload the fixed new version to unstable.  Hopefully, it will be
correctly buildd this time and will enter testing soon.

-- 
Rafael