Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 869110 - app-misc/pax-utils-1.3.5: fails to compile due to invalid call to xmlto
Summary: app-misc/pax-utils-1.3.5: fails to compile due to invalid call to xmlto
Status: RESOLVED FIXED
Alias: None
Product: Gentoo/Alt
Classification: Unclassified
Component: Prefix Support (show other bugs)
Hardware: All Solaris
: Normal normal (vote)
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-09-07 19:21 UTC by Fabian Groffen
Modified: 2022-09-08 06:07 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Fabian Groffen gentoo-dev 2022-09-07 19:21:38 UTC
>>> 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.
Comment 1 Fabian Groffen gentoo-dev 2022-09-07 19:27:28 UTC
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',
Comment 2 Mike Gilbert gentoo-dev 2022-09-07 19:44:14 UTC
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.
Comment 3 Arsen Arsenović gentoo-dev 2022-09-07 19:47:32 UTC
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
Comment 4 Larry the Git Cow gentoo-dev 2022-09-08 00:17:19 UTC
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(-)
Comment 5 Larry the Git Cow gentoo-dev 2022-09-08 00:23:18 UTC
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(+)
Comment 6 Fabian Groffen gentoo-dev 2022-09-08 06:07:18 UTC
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!