>>> Source configured. >>> Compiling source in /gentoo/prefix64/var/tmp/portage/app-misc/pax-utils-1.3.5/work/pax-utils-1.3.5 ... meson compile -C /gentoo/prefix64/var/tmp/portage/app-misc/pax-utils-1.3.5/work/pax-utils-1.3.5-build --jobs 2 --load-average 0 --verbose ninja: Entering directory `/gentoo/prefix64/var/tmp/portage/app-misc/pax-utils-1.3.5/work/pax-utils-1.3.5-build' [1/17] /gentoo/prefix64/usr/bin/xmlto man -x ../pax-utils-1.3.5/man/custom.xsl --skip-validation man/pax-utils.docbook -o /gentoo/prefix64/var/tmp/portage/app-m isc/pax-utils-1.3.5/work/pax-utils-1.3.5-build/man FAILED: man/dumpelf.1 man/pspax.1 man/scanelf.1 man/scanmacho.1 /gentoo/prefix64/usr/bin/xmlto man -x ../pax-utils-1.3.5/man/custom.xsl --skip-validation man/pax-utils.docbook -o /gentoo/prefix64/var/tmp/portage/app-misc/pax-utils-1.3.5/work/pax-utils-1.3.5-build/man usage: xmlto [OPTION]... FORMAT XML OPTIONs are: -v verbose output (-vv for very verbose) -x stylesheet use the specified stylesheet instead of choosing one -m fragment use the XSL fragment to customize the stylesheet -o directory put output in the specified directory instead of the current working directory -p postprocopts pass option to postprocessor --extensions turn on stylesheet extensions for this tool chain --noautosize do not autodetect paper size via locales or paperconf --noclean temp files are not deleted automatically (good for diagnostics) --noextensions do not use passivetex/fop extensions --profile use profiling stylesheet --searchpath colon-separated list of fallback directories --skip-validation do not attempt to validate the input before processing --stringparam paramname=paramvalue pass a named parameter to the stylesheet from the command line --with-fop use fop for formatting (if fop available) --with-dblatex use dblatex for formatting (if dblatex available) Available FORMATs depend on the type of the XML file (which is determined automatically). For documents of type "xhtml1": awt dvi fo mif pcl pdf ps svg txt For documents of type "fo": awt dvi mif pcl pdf ps svg txt For documents of type "docbook": awt dvi epub fo html html-nochunks htmlhelp javahelp man mif pcl pdf ps svg txt xhtml xhtml-nochunks [2/17] /gentoo/prefix64/usr/lib/python-exec/python3.10/meson --internal vcstagger ../pax-utils-1.3.5/version.h.in pax_utils_version.h 1.3.5 /gentoo/prefix64/var/tmp/portage/app-misc/pax-utils-1.3.5/work/pax-utils-1.3.5 @VCS_TAG@ '(.*)' ' ' ninja: build stopped: subcommand failed. * ERROR: app-misc/pax-utils-1.3.5::gentoo_prefix failed (compile phase): * compile failed The problem is the xmlto call doesn't adhere to the specified format of 'xmlto' <options> <type> <file>. Re-ordering this in the ninja.build file makes compilation pass.
meson is new to me, I think something like this would do it: --- man/meson.build 2022-09-07 21:24:41.552445997 +0000 +++ man/meson.build 2022-09-07 21:25:20.285090828 +0000 @@ -25,8 +25,8 @@ custom_target('docbook_to_man', command : [ - xmlto, 'man', '-x', files('custom.xsl'), '--skip-validation', book, - '-o', meson.current_build_dir() + xmlto, '-x', files('custom.xsl'), '--skip-validation', + '-o', meson.current_build_dir(), 'man', book ], input : [ 'pax-utils.docbook.in', 'custom.xsl', 'fragment/reftail',
xmlto is a shell script that calls 'getopt' for option parsing. The version of getopt shipped with util-linux allows non-option parameters to come before option parameters. I guess getopt on Solaris does not allow this. Anyway, that meson change looks fine to me.
Yes, this change is fine. I'm surprised this didn't manifest earlier, since IIRC I just transcribed the command from makefile directly into meson as-is
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/proj/pax-utils.git/commit/?id=2d981305b117b669c60bede076557c2d765cf198 commit 2d981305b117b669c60bede076557c2d765cf198 Author: Mike Gilbert <floppym@gentoo.org> AuthorDate: 2022-09-08 00:13:00 +0000 Commit: Mike Gilbert <floppym@gentoo.org> CommitDate: 2022-09-08 00:17:00 +0000 man: reorder xmlto arguments Bug: https://bugs.gentoo.org/869110 Thanks-to: Fabian Groffen <grobian@gentoo.org> Signed-off-by: Mike Gilbert <floppym@gentoo.org> man/meson.build | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7328940e2833ec9478d81745c609423b4c251b28 commit 7328940e2833ec9478d81745c609423b4c251b28 Author: Mike Gilbert <floppym@gentoo.org> AuthorDate: 2022-09-08 00:20:45 +0000 Commit: Mike Gilbert <floppym@gentoo.org> CommitDate: 2022-09-08 00:22:39 +0000 app-misc/pax-utils: apply patch to reorder xmlto arguments Closes: https://bugs.gentoo.org/869110 Signed-off-by: Mike Gilbert <floppym@gentoo.org> ...x-utils-1.3.5-man-reorder-xmlto-arguments.patch | 30 ++++++++++++++++++++++ app-misc/pax-utils/pax-utils-1.3.5.ebuild | 4 +++ 2 files changed, 34 insertions(+)
FYI: xmlto configure detects getopt-long, I didn't realise it is a shell-script. getopt-long comes from app-misc/getopt. Apparently that version doesn't allow mixing arguments with options, despite it advertising it does. I guess this really is a bug in app-misc/getopt then. Thanks for applying the workaround, it works perfectly now!