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
- Merge pull request #824 from libexpat/issue-821-improve-make-clean-for-configure-without-docbook Autotools: Re-work handling of xmlwf.1 (fixes #821) — committed to libexpat/libexpat by hartwork 4 months ago
- Changes: Add missing #821 #824 to 2.6.1 change log — committed to libexpat/libexpat by hartwork 4 months ago
- Merge pull request #837 from libexpat/extend-2-6-1-change-log Add missing #821 #824 to 2.6.1 change log — committed to libexpat/libexpat by hartwork 4 months ago
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?
It seems that a
make clean, removes the file then the detection gets confused (there is no compiled man filexmlwf.1now) and at the same timeDOCBOOK_TO_MANis 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 cleanand then hits this issue trying to rebuild again from source. Not sure how to fix this.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.