libexpat: [2.6.0] `./configure --without-docbook && make clean all` fails with `xmlwf.xml: command not found`

Related: https://github.com/libexpat/libexpat/issues/253

This happens when running the tests if make check is ran.

After a bisect, this is the offending change: https://github.com/libexpat/libexpat/commit/7384c88f9aa7dd49f22ae08f2a65c57b5dda2f9e

Reverting the change fixes the error. It seems to me the lack of a pre-renderered xmlwf.1 file sets WITH_DOCBOOK to true even if --without-docbook is specified (or if the detection doesn’t find a valid docwhatever executable that option is looking for).

Reasoning: This recent change breaks tests when docbook is not present, as the generated docs/Makefile tries to expand DOCBOOK_TO_MAN (which ends up empty) and tries to execute the xml directly when generating the manpage.

Error output:

[   50s] make[2]: Leaving directory '/home/abuild/rpmbuild/BUILD/expat-2.6.0/xmlwf'
[   50s] Making all in doc
[   50s] make[2]: Entering directory '/home/abuild/rpmbuild/BUILD/expat-2.6.0/doc'
[   50s] rm -f xmlwf.1
[   50s] xmlwf.xml
[   50s] /usr/bin/bash: line 1: xmlwf.xml: command not found
[   50s] make[2]: *** [Makefile:606: xmlwf.1] Error 127
[   50s] make[2]: Leaving directory '/home/abuild/rpmbuild/BUILD/expat-2.6.0/doc'
[   50s] make[1]: *** [Makefile:650: all-recursive] Error 1
[   50s] make: *** [Makefile:509: all] Error 2

About this issue

  • Original URL
  • State: closed
  • Created 5 months ago
  • Reactions: 1
  • Comments: 18 (9 by maintainers)

Commits related to this issue

Most upvoted comments

@kraptor I just pushed a first draft pull request #824 on the topic. Please feel invited to play with it.

I’ll patch openSUSE one with it and let you know on Monday. Thanks!

@kraptor I just pushed a first draft pull request #824 on the topic. Please feel invited to play with it.

Ok, what I noticed:

Does this work for you?

cd "$(mktemp -d)" && wget https://github.com/libexpat/libexpat/releases/download/R_2_6_0/expat-2.6.0.tar.xz && tar xf expat-2.6.0.tar.xz && cd expat-2.6.0 && ./configure --without-docbook && make clean && make

It seems that a make clean, removes the file then the detection gets confused (there is no compiled man file xmlwf.1 now) and at the same time DOCBOOK_TO_MAN is empty, so the build fails. I think this is a corner case of the side-effect of RPM expanded macros being ‘executed’ regardless if they are commented out or protected by %if (so that corner case also made me realize there are a few other non-related issues to fix on our side).

In any case, is not unrealistic that someone runs a make clean and then hits this issue trying to rebuild again from source. Not sure how to fix this.

One a side note, I had a quick look and a few things caught my eye as not right with 2.6.0 in SUSE:

* `rm -f examples/*.dsp` can be dropped, files are long gone

* `chmod 0644 examples/elements.c` and related comment can can be dropped, long fixed upstream

* file `doc/ok.min.css`needs to be copied since 2.4.0 to make `doc/reference.html` look right

* example file `examples/element_declarations.c` from >=2.6.0 is not copied, so it will be missing

Thanks for the review!! This spec file has been long inherited by several people, I can clean all that and fix some other things I noticed not related to the current topic.

EDIT: grammar.

Uhm, I noticed something fishy… let me investigate and I’ll come back to you asap.