
Seems it didn't appear on the mailing list, resent it. Hi folks, I'm trying to build libvirt using meson with the latest upstream libvirt, but the compilation fails: (followed on https://libvirt.org/compiling.html, not sure if any dependencies are missed. I checked, src/util/libvirt_util.a.p does not exist.) FAILED: src/util/libvirt_util.a.p/glibcompat.c.o .... In file included from ../src/util/glibcompat.c:19: ./config.h:1026:10: fatal error: config-post.h: No such file or directory FAILED: src/util/libvirt_util.a.p/virfirmware.c.o In file included from ../src/util/virarch.c:22: ./config.h:1026:10: fatal error: config-post.h: No such file or directory FAILED: src/util/libvirt_util.a.p/viraudit.c.o In file included from ../src/util/viraudit.c:22: ./config.h:1026:10: fatal error: config-post.h: No such file or directory Any help is appreciated. Thanks, Wei

On a Thursday in 2020, Wei Wang wrote:
Seems it didn't appear on the mailing list, resent it.
Hi folks,
I'm trying to build libvirt using meson with the latest upstream libvirt, but the compilation fails: (followed on https://libvirt.org/compiling.html, not sure if any dependencies are missed. I checked, src/util/libvirt_util.a.p does not exist.)
FAILED: src/util/libvirt_util.a.p/glibcompat.c.o .... In file included from ../src/util/glibcompat.c:19: ./config.h:1026:10: fatal error: config-post.h: No such file or directory FAILED: src/util/libvirt_util.a.p/virfirmware.c.o In file included from ../src/util/virarch.c:22: ./config.h:1026:10: fatal error: config-post.h: No such file or directory FAILED: src/util/libvirt_util.a.p/viraudit.c.o In file included from ../src/util/viraudit.c:22: ./config.h:1026:10: fatal error: config-post.h: No such file or directory
config-post.h was moved to config.h when we converted to Meson. There are probably some leftovers from a previous build in your build directory. Can you try it with an empty build directory? Jano
Any help is appreciated.
Thanks, Wei

On Thu, Sep 24, 2020 at 2:58 PM Ján Tomko <jtomko@redhat.com> wrote:
On a Thursday in 2020, Wei Wang wrote:
Seems it didn't appear on the mailing list, resent it.
Hi folks,
I'm trying to build libvirt using meson with the latest upstream libvirt, but the compilation fails: (followed on https://libvirt.org/compiling.html, not sure if any dependencies are missed. I checked, src/util/libvirt_util.a.p does not exist.)
FAILED: src/util/libvirt_util.a.p/glibcompat.c.o .... In file included from ../src/util/glibcompat.c:19: ./config.h:1026:10: fatal error: config-post.h: No such file or directory FAILED: src/util/libvirt_util.a.p/virfirmware.c.o In file included from ../src/util/virarch.c:22: ./config.h:1026:10: fatal error: config-post.h: No such file or directory FAILED: src/util/libvirt_util.a.p/viraudit.c.o In file included from ../src/util/viraudit.c:22: ./config.h:1026:10: fatal error: config-post.h: No such file or directory
config-post.h was moved to config.h when we converted to Meson.
There are probably some leftovers from a previous build in your build directory. Can you try it with an empty build directory?
Thanks, just done cloning a new one from the official repo, but meson build reports an error: src/util/meson.build:138:0: ERROR: Program '/opt/projects/libvirt/src/keycodemapdb/tools/keymap-gen' not found Is there anything I should do before "meson build"? Thanks, Wei

On Fri, Sep 25, 2020 at 10:03 AM Wei Wang <weiwangcloud2020@gmail.com> wrote:
On Thu, Sep 24, 2020 at 2:58 PM Ján Tomko <jtomko@redhat.com> wrote:
On a Thursday in 2020, Wei Wang wrote:
Seems it didn't appear on the mailing list, resent it.
Hi folks,
I'm trying to build libvirt using meson with the latest upstream libvirt, but the compilation fails: (followed on https://libvirt.org/compiling.html, not sure if any dependencies are missed. I checked, src/util/libvirt_util.a.p does not exist.)
FAILED: src/util/libvirt_util.a.p/glibcompat.c.o .... In file included from ../src/util/glibcompat.c:19: ./config.h:1026:10: fatal error: config-post.h: No such file or directory FAILED: src/util/libvirt_util.a.p/virfirmware.c.o In file included from ../src/util/virarch.c:22: ./config.h:1026:10: fatal error: config-post.h: No such file or directory FAILED: src/util/libvirt_util.a.p/viraudit.c.o In file included from ../src/util/viraudit.c:22: ./config.h:1026:10: fatal error: config-post.h: No such file or directory
config-post.h was moved to config.h when we converted to Meson.
There are probably some leftovers from a previous build in your build directory. Can you try it with an empty build directory?
Thanks, just done cloning a new one from the official repo, but meson build reports an error: src/util/meson.build:138:0: ERROR: Program '/opt/projects/libvirt/src/keycodemapdb/tools/keymap-gen' not found
Is there anything I should do before "meson build"?
OK, solved this one with network proxy (seems that meson needs to download it). ninja -C build fails with ninja: Entering directory `build' [6/908] Compiling C object src/util/libvirt_util.a.p/virfile.c.o FAILED: src/util/libvirt_util.a.p/virfile.c.o cc -Isrc/util/libvirt_util.a.p -Isrc/util -I../src/util -Iinclude -I../include -Isrc -I../src -I. -I.. -I/usr/include/p11-kit-1 -I/usr/include/libnl3 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/gio-unix-2.0 -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/libxml2 -I/usr/include/yajl -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -std=gnu99 -O2 -g -Werror -fno-common -W -Wabsolute-value -Waddress -Waddress-of-packed-member -Waggressive-loop-optimizations -Wall -Wattribute-warning -Wattributes -Wbool-compare -Wbool-operation -Wbuiltin-declaration-mismatch -Wbuiltin-macro-redefined -Wcannot-profile -Wcast-align -Wcast-align=strict -Wcast-function-type -Wchar-subscripts -Wclobbered -Wcomment -Wcomments -Wcoverage-mismatch -Wcpp -Wdangling-else -Wdate-time -Wdeclaration-after-statement -Wdeprecated-declarations -Wdesignated-init -Wdiscarded-array-qualifiers -Wdiscarded-qualifiers -Wdiv-by-zero -Wduplicated-cond -Wduplicate-decl-specifier -Wempty-body -Wendif-labels -Wexpansion-to-defined -Wextra -Wformat-contains-nul -Wformat-extra-args -Wformat-nonliteral -Wformat-security -Wformat-y2k -Wformat-zero-length -Wframe-address -Wfree-nonheap-object -Whsa -Wif-not-aligned -Wignored-attributes -Wignored-qualifiers -Wimplicit -Wimplicit-function-declaration -Wimplicit-int -Wincompatible-pointer-types -Winit-self -Winline -Wint-conversion -Wint-in-bool-context -Wint-to-pointer-cast -Winvalid-memory-model -Winvalid-pch -Wlogical-not-parentheses -Wlogical-op -Wmain -Wmaybe-uninitialized -Wmemset-elt-size -Wmemset-transposed-args -Wmisleading-indentation -Wmissing-attributes -Wmissing-braces -Wmissing-declarations -Wmissing-field-initializers -Wmissing-include-dirs -Wmissing-parameter-type -Wmissing-profile -Wmissing-prototypes -Wmultichar -Wmultistatement-macros -Wnarrowing -Wnested-externs -Wnonnull -Wnonnull-compare -Wnull-dereference -Wodr -Wold-style-declaration -Wold-style-definition -Wopenmp-simd -Woverflow -Woverride-init -Wpacked-bitfield-compat -Wpacked-not-aligned -Wparentheses -Wpointer-arith -Wpointer-compare -Wpointer-sign -Wpointer-to-int-cast -Wpragmas -Wpsabi -Wrestrict -Wreturn-local-addr -Wreturn-type -Wscalar-storage-order -Wsequence-point -Wshadow -Wshift-count-negative -Wshift-count-overflow -Wshift-negative-value -Wsizeof-array-argument -Wsizeof-pointer-div -Wsizeof-pointer-memaccess -Wstrict-aliasing -Wstrict-prototypes -Wstringop-truncation -Wsuggest-attribute=cold -Wsuggest-attribute=const -Wsuggest-attribute=format -Wsuggest-attribute=noreturn -Wsuggest-attribute=pure -Wsuggest-final-methods -Wsuggest-final-types -Wswitch -Wswitch-bool -Wswitch-unreachable -Wsync-nand -Wtautological-compare -Wtrampolines -Wtrigraphs -Wtype-limits -Wuninitialized -Wunknown-pragmas -Wunused -Wunused-but-set-parameter -Wunused-but-set-variable -Wunused-function -Wunused-label -Wunused-local-typedefs -Wunused-parameter -Wunused-result -Wunused-value -Wunused-variable -Wvarargs -Wvariadic-macros -Wvector-operation-performance -Wvla -Wvolatile-register-var -Wwrite-strings -Walloc-size-larger-than=9223372036854775807 -Warray-bounds=2 -Wattribute-alias=2 -Wformat-overflow=2 -Wformat-truncation=2 -Wimplicit-fallthrough=5 -Wnormalized=nfc -Wshift-overflow=2 -Wstringop-overflow=2 -Wunused-const-variable=2 -Wno-sign-compare -Wno-cast-function-type -Wjump-misses-init -Wswitch-enum -Wno-format-nonliteral -Wno-format-truncation -Wframe-larger-than=4096 -fexceptions -fasynchronous-unwind-tables -fipa-pure-const -Wno-suggest-attribute=pure -Wno-suggest-attribute=const -fstack-protector-strong -Wdouble-promotion -fPIC -pthread -DIN_LIBVIRT '-Dabs_top_builddir="/opt/projects/libvirt/build"' '-Dabs_top_srcdir="/opt/projects/libvirt"' -MD -MQ src/util/libvirt_util.a.p/virfile.c.o -MF src/util/libvirt_util.a.p/virfile.c.o.d -o src/util/libvirt_util.a.p/virfile.c.o -c ../src/util/virfile.c In file included from ../src/util/virfile.c:42: /usr/include/libutil.h:43:10: fatal error: sys/_types.h: No such file or directory 43 | #include <sys/_types.h> | ^~~~~~~~~~~~~~ compilation terminated. [51/908] Compiling C object src/qemu/libvirt_driver_qemu_impl.a.p/qemu_driver.c.o ninja: build stopped: subcommand failed I have /usr/include/sys/types.h, but no "_types.h" Thanks, Wei

On Fri, 2020-09-25 at 10:33 +0800, Wei Wang wrote:
In file included from ../src/util/virfile.c:42: /usr/include/libutil.h:43:10: fatal error: sys/_types.h: No such file or directory 43 | #include <sys/_types.h> | ^~~~~~~~~~~~~~ compilation terminated. [51/908] Compiling C object src/qemu/libvirt_driver_qemu_impl.a.p/qemu_driver.c.o ninja: build stopped: subcommand failed
I have /usr/include/sys/types.h, but no "_types.h"
Are you building on FreeBSD? Because that's where we expect <libutil.h> to be included. If you're not on FreeBSD, can you check which package /usr/include/libutil.h belongs to? -- Andrea Bolognani / Red Hat / Virtualization

On Fri, Sep 25, 2020 at 3:56 PM Andrea Bolognani <abologna@redhat.com> wrote:
In file included from ../src/util/virfile.c:42: /usr/include/libutil.h:43:10: fatal error: sys/_types.h: No such file or
On Fri, 2020-09-25 at 10:33 +0800, Wei Wang wrote: directory
43 | #include <sys/_types.h> | ^~~~~~~~~~~~~~ compilation terminated. [51/908] Compiling C object src/qemu/libvirt_driver_qemu_impl.a.p/qemu_driver.c.o ninja: build stopped: subcommand failed
I have /usr/include/sys/types.h, but no "_types.h"
Are you building on FreeBSD? Because that's where we expect <libutil.h> to be included. If you're not on FreeBSD, can you check which package /usr/include/libutil.h belongs to?
No, I'm building on Linux. It belongs to libutil-freebsd-dev, not sure why that's needed in my build. Thanks, Wei

On Fri, 2020-09-25 at 16:21 +0800, Wei Wang wrote:
On Fri, Sep 25, 2020 at 3:56 PM Andrea Bolognani <abologna@redhat.com> wrote:
On Fri, 2020-09-25 at 10:33 +0800, Wei Wang wrote:
In file included from ../src/util/virfile.c:42: /usr/include/libutil.h:43:10: fatal error: sys/_types.h: No such file or directory 43 | #include <sys/_types.h> | ^~~~~~~~~~~~~~ compilation terminated. [51/908] Compiling C object src/qemu/libvirt_driver_qemu_impl.a.p/qemu_driver.c.o ninja: build stopped: subcommand failed
I have /usr/include/sys/types.h, but no "_types.h"
Are you building on FreeBSD? Because that's where we expect <libutil.h> to be included. If you're not on FreeBSD, can you check which package /usr/include/libutil.h belongs to?
No, I'm building on Linux. It belongs to libutil-freebsd-dev, not sure why that's needed in my build.
Can you retry after uninstalling that package? It looks like it messes up our header detection, and I sort of doubt we care enough about this scenario to change our build system to cope with it. -- Andrea Bolognani / Red Hat / Virtualization

On Fri, Sep 25, 2020 at 4:40 PM Andrea Bolognani <abologna@redhat.com> wrote:
On Fri, 2020-09-25 at 16:21 +0800, Wei Wang wrote:
On Fri, Sep 25, 2020 at 3:56 PM Andrea Bolognani <abologna@redhat.com> wrote:
On Fri, 2020-09-25 at 10:33 +0800, Wei Wang wrote:
In file included from ../src/util/virfile.c:42: /usr/include/libutil.h:43:10: fatal error: sys/_types.h: No such file or directory 43 | #include <sys/_types.h> | ^~~~~~~~~~~~~~ compilation terminated. [51/908] Compiling C object src/qemu/libvirt_driver_qemu_impl.a.p/qemu_driver.c.o ninja: build stopped: subcommand failed
I have /usr/include/sys/types.h, but no "_types.h"
Are you building on FreeBSD? Because that's where we expect <libutil.h> to be included. If you're not on FreeBSD, can you check which package /usr/include/libutil.h belongs to?
No, I'm building on Linux. It belongs to libutil-freebsd-dev, not sure why that's needed in my build.
Can you retry after uninstalling that package? It looks like it messes up our header detection, and I sort of doubt we care enough about this scenario to change our build system to cope with it.
Yes, I tried, but it fails with ../src/util/virfile.c:42:11: fatal error: libutil.h: No such file or directory Thanks, Wei

On Fri, Sep 25, 2020 at 04:44:24PM +0800, Wei Wang wrote:
On Fri, Sep 25, 2020 at 4:40 PM Andrea Bolognani <abologna@redhat.com> wrote:
On Fri, 2020-09-25 at 16:21 +0800, Wei Wang wrote:
On Fri, Sep 25, 2020 at 3:56 PM Andrea Bolognani <abologna@redhat.com> wrote:
On Fri, 2020-09-25 at 10:33 +0800, Wei Wang wrote:
In file included from ../src/util/virfile.c:42: /usr/include/libutil.h:43:10: fatal error: sys/_types.h: No such file or directory 43 | #include <sys/_types.h> | ^~~~~~~~~~~~~~ compilation terminated. [51/908] Compiling C object src/qemu/libvirt_driver_qemu_impl.a.p/qemu_driver.c.o ninja: build stopped: subcommand failed
I have /usr/include/sys/types.h, but no "_types.h"
Are you building on FreeBSD? Because that's where we expect <libutil.h> to be included. If you're not on FreeBSD, can you check which package /usr/include/libutil.h belongs to?
No, I'm building on Linux. It belongs to libutil-freebsd-dev, not sure why that's needed in my build.
Can you retry after uninstalling that package? It looks like it messes up our header detection, and I sort of doubt we care enough about this scenario to change our build system to cope with it.
Yes, I tried, but it fails with ../src/util/virfile.c:42:11: fatal error: libutil.h: No such file or directory
You'd have to delete the build dir and re-run meson so that it auto-detects again. Regards, Daniel -- |: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|

On Fri, Sep 25, 2020 at 4:54 PM Daniel P. Berrangé <berrange@redhat.com> wrote:
Yes, I tried, but it fails with ../src/util/virfile.c:42:11: fatal error: libutil.h: No such file or directory
You'd have to delete the build dir and re-run meson so that it auto-detects again.
OK, that issue seems gone, but ninja reports lots of new errors: ninja: Entering directory `build' [947/1250] Generating virsh.html.in with a meson_exe.py custom command FAILED: docs/manpages/virsh.html.in /usr/bin/meson --internal exe --capture docs/manpages/virsh.html.in -- /usr/local/bin/rst2html5 --stylesheet= --strict docs/manpages/virsh.rst docs/manpages/virsh.rst:41: (ERROR/3) Error in "code-block" directive: 1 argument(s) required, 0 supplied. .. code-block:: virsh [OPTION]... <command> <domain> [ARG]... Exiting due to level-3 (ERROR) system message. [952/1250] Generating virt-admin.html.in with a meson_exe.py custom command FAILED: docs/manpages/virt-admin.html.in /usr/bin/meson --internal exe --capture docs/manpages/virt-admin.html.in -- /usr/local/bin/rst2html5 --stylesheet= --strict docs/manpages/virt-admin.rst docs/manpages/virt-admin.rst:31: (ERROR/3) Error in "code-block" directive: 1 argument(s) required, 0 supplied. .. code-block:: virt-admin [OPTION]... <command> [ARG]... Exiting due to level-3 (ERROR) system message. [960/1250] Generating libvirtd.html.in with a meson_exe.py custom command FAILED: docs/manpages/libvirtd.html.in /usr/bin/meson --internal exe --capture docs/manpages/libvirtd.html.in -- /usr/local/bin/rst2html5 --stylesheet= --strict docs/manpages/libvirtd.rst docs/manpages/libvirtd.rst:202: (ERROR/3) Error in "code-block" directive: 1 argument(s) required, 0 supplied. .. code-block:: # libvirtd --version libvirtd (libvirt) 0.8.2 Exiting due to level-3 (ERROR) system message. [961/1250] Generating virt-login-shell.html.in with a meson_exe.py custom command FAILED: docs/manpages/virt-login-shell.html.in /usr/bin/meson --internal exe --capture docs/manpages/ virt-login-shell.html.in -- /usr/local/bin/rst2html5 --stylesheet= --strict docs/manpages/virt-login-shell.rst docs/manpages/virt-login-shell.rst:32: (ERROR/3) Error in "code-block" directive: 1 argument(s) required, 0 supplied. .. code-block:: virt-login-shell Exiting due to level-3 (ERROR) system message. [965/1250] Generating virtlockd.html.in with a meson_exe.py custom command FAILED: docs/manpages/virtlockd.html.in /usr/bin/meson --internal exe --capture docs/manpages/virtlockd.html.in -- /usr/local/bin/rst2html5 --stylesheet= --strict docs/manpages/virtlockd.rst docs/manpages/virtlockd.rst:123: (ERROR/3) Error in "code-block" directive: 1 argument(s) required, 0 supplied. .. code-block:: # virtlockd --version virtlockd (libvirt) 1.1.1 Exiting due to level-3 (ERROR) system message. [966/1250] Generating virtlogd.html.in with a meson_exe.py custom command FAILED: docs/manpages/virtlogd.html.in /usr/bin/meson --internal exe --capture docs/manpages/virtlogd.html.in -- /usr/local/bin/rst2html5 --stylesheet= --strict docs/manpages/virtlogd.rst docs/manpages/virtlogd.rst:124: (ERROR/3) Error in "code-block" directive: 1 argument(s) required, 0 supplied. .. code-block:: # virtlogd --version virtlogd (libvirt) 1.1.1 Exiting due to level-3 (ERROR) system message. [967/1250] Generating virkeycode-atset2.html.in with a meson_exe.py custom command FAILED: docs/manpages/virkeycode-atset2.html.in /usr/bin/meson --internal exe --capture docs/manpages/ virkeycode-atset2.html.in -- /usr/local/bin/rst2html5 --stylesheet= --strict docs/manpages/virkeycode-atset2.rst TypeError: append() argument must be xml.etree.ElementTree.Element, not str Exiting due to error. Use "--traceback" to diagnose. Please report errors to <docutils-users@lists.sf.net>. Include "--traceback" output, Docutils version (0.16 [release]), Python version (3.8.2), your OS type & version, and the command line used. [969/1250] Generating virkeycode-atset1.html.in with a meson_exe.py custom command FAILED: docs/manpages/virkeycode-atset1.html.in /usr/bin/meson --internal exe --capture docs/manpages/ virkeycode-atset1.html.in -- /usr/local/bin/rst2html5 --stylesheet= --strict docs/manpages/virkeycode-atset1.rst TypeError: append() argument must be xml.etree.ElementTree.Element, not str Exiting due to error. Use "--traceback" to diagnose. Please report errors to <docutils-users@lists.sf.net>. Include "--traceback" output, Docutils version (0.16 [release]), Python version (3.8.2), your OS type & version, and the command line used. [971/1250] Generating virkeycode-atset3.html.in with a meson_exe.py custom command FAILED: docs/manpages/virkeycode-atset3.html.in /usr/bin/meson --internal exe --capture docs/manpages/ virkeycode-atset3.html.in -- /usr/local/bin/rst2html5 --stylesheet= --strict docs/manpages/virkeycode-atset3.rst TypeError: append() argument must be xml.etree.ElementTree.Element, not str Exiting due to error. Use "--traceback" to diagnose. Please report errors to <docutils-users@lists.sf.net>. Include "--traceback" output, Docutils version (0.16 [release]), Python version (3.8.2), your OS type & version, and the command line used. [972/1250] Generating virkeycode-osx.html.in with a meson_exe.py custom command FAILED: docs/manpages/virkeycode-osx.html.in /usr/bin/meson --internal exe --capture docs/manpages/virkeycode-osx.html.in -- /usr/local/bin/rst2html5 --stylesheet= --strict docs/manpages/virkeycode-osx.rst TypeError: append() argument must be xml.etree.ElementTree.Element, not str Exiting due to error. Use "--traceback" to diagnose. Please report errors to <docutils-users@lists.sf.net>. Include "--traceback" output, Docutils version (0.16 [release]), Python version (3.8.2), your OS type & version, and the command line used. [974/1250] Generating virkeycode-qnum.html.in with a meson_exe.py custom command FAILED: docs/manpages/virkeycode-qnum.html.in /usr/bin/meson --internal exe --capture docs/manpages/ virkeycode-qnum.html.in -- /usr/local/bin/rst2html5 --stylesheet= --strict docs/manpages/virkeycode-qnum.rst TypeError: append() argument must be xml.etree.ElementTree.Element, not str Exiting due to error. Use "--traceback" to diagnose. Please report errors to <docutils-users@lists.sf.net>. Include "--traceback" output, Docutils version (0.16 [release]), Python version (3.8.2), your OS type & version, and the command line used. [975/1250] Generating virkeycode-usb.html.in with a meson_exe.py custom command FAILED: docs/manpages/virkeycode-usb.html.in /usr/bin/meson --internal exe --capture docs/manpages/virkeycode-usb.html.in -- /usr/local/bin/rst2html5 --stylesheet= --strict docs/manpages/virkeycode-usb.rst TypeError: append() argument must be xml.etree.ElementTree.Element, not str Exiting due to error. Use "--traceback" to diagnose. Please report errors to <docutils-users@lists.sf.net>. Include "--traceback" output, Docutils version (0.16 [release]), Python version (3.8.2), your OS type & version, and the command line used. [976/1250] Generating virkeycode-linux.html.in with a meson_exe.py custom command FAILED: docs/manpages/virkeycode-linux.html.in /usr/bin/meson --internal exe --capture docs/manpages/ virkeycode-linux.html.in -- /usr/local/bin/rst2html5 --stylesheet= --strict docs/manpages/virkeycode-linux.rst TypeError: append() argument must be xml.etree.ElementTree.Element, not str Exiting due to error. Use "--traceback" to diagnose. Please report errors to <docutils-users@lists.sf.net>. Include "--traceback" output, Docutils version (0.16 [release]), Python version (3.8.2), your OS type & version, and the command line used. [977/1250] Generating virkeycode-win32.html.in with a meson_exe.py custom command FAILED: docs/manpages/virkeycode-win32.html.in /usr/bin/meson --internal exe --capture docs/manpages/ virkeycode-win32.html.in -- /usr/local/bin/rst2html5 --stylesheet= --strict docs/manpages/virkeycode-win32.rst TypeError: append() argument must be xml.etree.ElementTree.Element, not str Exiting due to error. Use "--traceback" to diagnose. Please report errors to <docutils-users@lists.sf.net>. Include "--traceback" output, Docutils version (0.16 [release]), Python version (3.8.2), your OS type & version, and the command line used. [991/1250] Compiling C object tests/qemuxml2xmltest.p/qemuxml2xmltest.c.o ../tests/qemuxml2xmltest.c: In function ‘mymain’: ../tests/qemuxml2xmltest.c:131:1: note: variable tracking size limit exceeded with ‘-fvar-tracking-assignments’, retrying without 131 | mymain(void) | ^~~~~~ [992/1250] Compiling C object tests/cputest.p/cputest.c.o ninja: build stopped: subcommand failed. Thanks, Wei

On Fri, Sep 25, 2020 at 05:03:24PM +0800, Wei Wang wrote:
On Fri, Sep 25, 2020 at 4:54 PM Daniel P. Berrangé <berrange@redhat.com> wrote:
Yes, I tried, but it fails with ../src/util/virfile.c:42:11: fatal error: libutil.h: No such file or directory
You'd have to delete the build dir and re-run meson so that it auto-detects again.
OK, that issue seems gone, but ninja reports lots of new errors:
ninja: Entering directory `build' [947/1250] Generating virsh.html.in with a meson_exe.py custom command FAILED: docs/manpages/virsh.html.in /usr/bin/meson --internal exe --capture docs/manpages/virsh.html.in -- /usr/local/bin/rst2html5 --stylesheet= --strict docs/manpages/virsh.rst docs/manpages/virsh.rst:41: (ERROR/3) Error in "code-block" directive: 1 argument(s) required, 0 supplied.
.. code-block::
virsh [OPTION]... <command> <domain> [ARG]...
This is a sign of having a bad version of "rst2html5" installed. We expect to be using rst2html5 that comes with python docutils package. There is a completely different rst2html5 that people might get from "pip" if you did "pip install rst2html5". This version is broken and unusable and so needs to be removed. Regards, Daniel -- |: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|

On Fri, 2020-09-25 at 10:16 +0100, Daniel P. Berrangé wrote:
On Fri, Sep 25, 2020 at 05:03:24PM +0800, Wei Wang wrote:
/usr/local/bin/rst2html5 --stylesheet= --strict docs/manpages/virsh.rst docs/manpages/virsh.rst:41: (ERROR/3) Error in "code-block" directive: 1 argument(s) required, 0 supplied.
.. code-block::
virsh [OPTION]... <command> <domain> [ARG]...
This is a sign of having a bad version of "rst2html5" installed.
We expect to be using rst2html5 that comes with python docutils package.
Yeah, the python3-docutils Debian package will contain a working rst2html5 binary.
There is a completely different rst2html5 that people might get from "pip" if you did "pip install rst2html5". This version is broken and unusable and so needs to be removed.
Can we do something to get that package off PyPi? It's not the first time the overlap has caused trouble for our users, and it certainly won't be the last... -- Andrea Bolognani / Red Hat / Virtualization

On Fri, Sep 25, 2020 at 11:23:57AM +0200, Andrea Bolognani wrote:
On Fri, 2020-09-25 at 10:16 +0100, Daniel P. Berrangé wrote:
On Fri, Sep 25, 2020 at 05:03:24PM +0800, Wei Wang wrote:
/usr/local/bin/rst2html5 --stylesheet= --strict docs/manpages/virsh.rst docs/manpages/virsh.rst:41: (ERROR/3) Error in "code-block" directive: 1 argument(s) required, 0 supplied.
.. code-block::
virsh [OPTION]... <command> <domain> [ARG]...
This is a sign of having a bad version of "rst2html5" installed.
We expect to be using rst2html5 that comes with python docutils package.
Yeah, the python3-docutils Debian package will contain a working rst2html5 binary.
There is a completely different rst2html5 that people might get from "pip" if you did "pip install rst2html5". This version is broken and unusable and so needs to be removed.
Can we do something to get that package off PyPi? It's not the first time the overlap has caused trouble for our users, and it certainly won't be the last...
Well it is not really our place to demand its removal. It isn't violating any rules of PyPi and AFAICT, it existed before docutils provided the same binary name. The only good course of action is probably to submit a patch to actually make it work. Regards, Daniel -- |: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|

On a Friday in 2020, Daniel P. Berrangé wrote:
On Fri, Sep 25, 2020 at 11:23:57AM +0200, Andrea Bolognani wrote:
On Fri, 2020-09-25 at 10:16 +0100, Daniel P. Berrangé wrote:
On Fri, Sep 25, 2020 at 05:03:24PM +0800, Wei Wang wrote:
/usr/local/bin/rst2html5 --stylesheet= --strict docs/manpages/virsh.rst docs/manpages/virsh.rst:41: (ERROR/3) Error in "code-block" directive: 1 argument(s) required, 0 supplied.
.. code-block::
virsh [OPTION]... <command> <domain> [ARG]...
This is a sign of having a bad version of "rst2html5" installed.
We expect to be using rst2html5 that comes with python docutils package.
Yeah, the python3-docutils Debian package will contain a working rst2html5 binary.
There is a completely different rst2html5 that people might get from "pip" if you did "pip install rst2html5". This version is broken and unusable and so needs to be removed.
Can we do something to get that package off PyPi? It's not the first time the overlap has caused trouble for our users, and it certainly won't be the last...
Well it is not really our place to demand its removal. It isn't violating any rules of PyPi and AFAICT, it existed before docutils provided the same binary name.
The only good course of action is probably to submit a patch to actually make it work.
I'll see whether we can somehow detect the correct version earlier. Jano

On Fri, 2020-09-25 at 10:26 +0100, Daniel P. Berrangé wrote:
On Fri, Sep 25, 2020 at 11:23:57AM +0200, Andrea Bolognani wrote:
On Fri, 2020-09-25 at 10:16 +0100, Daniel P. Berrangé wrote:
There is a completely different rst2html5 that people might get from "pip" if you did "pip install rst2html5". This version is broken and unusable and so needs to be removed.
Can we do something to get that package off PyPi? It's not the first time the overlap has caused trouble for our users, and it certainly won't be the last...
Well it is not really our place to demand its removal. It isn't violating any rules of PyPi and AFAICT, it existed before docutils provided the same binary name.
I never said we should "demand" anything, but the current situation is clearly confusing to users. While it might have made sense to have rst2html5 as a separate package back when docutils didn't support HTML5 output directly, now a very unfortunate name clash has been created and I think we should make at least an attempt at solving it instead of working around it.
The only good course of action is probably to submit a patch to actually make it work.
I would consider that undesirable, as the two tools are then bound to get out of sync again further down the line. Making it a wrapper for docutils' rst2html5 might work. -- Andrea Bolognani / Red Hat / Virtualization

On Fri, Sep 25, 2020 at 5:24 PM Andrea Bolognani <abologna@redhat.com> wrote:
On Fri, 2020-09-25 at 10:16 +0100, Daniel P. Berrangé wrote:
On Fri, Sep 25, 2020 at 05:03:24PM +0800, Wei Wang wrote:
/usr/local/bin/rst2html5 --stylesheet= --strict docs/manpages/virsh.rst docs/manpages/virsh.rst:41: (ERROR/3) Error in "code-block" directive: 1 argument(s) required, 0 supplied.
.. code-block::
virsh [OPTION]... <command> <domain> [ARG]...
This is a sign of having a bad version of "rst2html5" installed.
We expect to be using rst2html5 that comes with python docutils package.
Yeah, the python3-docutils Debian package will contain a working rst2html5 binary.
That's strange, my rst2html5 comes from docutils: python3-docutils: /usr/share/docutils/scripts/python3/rst2html5 and /usr/local/bin/rst2html5 --version rst2html5 (Docutils 0.16 [release], Python 3.8.2, on linux) Thanks, Wei

On Fri, Sep 25, 2020 at 05:31:09PM +0800, Wei Wang wrote:
On Fri, Sep 25, 2020 at 5:24 PM Andrea Bolognani <abologna@redhat.com> wrote:
On Fri, 2020-09-25 at 10:16 +0100, Daniel P. Berrangé wrote:
On Fri, Sep 25, 2020 at 05:03:24PM +0800, Wei Wang wrote:
/usr/local/bin/rst2html5 --stylesheet= --strict docs/manpages/virsh.rst docs/manpages/virsh.rst:41: (ERROR/3) Error in "code-block" directive: 1 argument(s) required, 0 supplied.
.. code-block::
virsh [OPTION]... <command> <domain> [ARG]...
This is a sign of having a bad version of "rst2html5" installed.
We expect to be using rst2html5 that comes with python docutils package.
Yeah, the python3-docutils Debian package will contain a working rst2html5 binary.
That's strange, my rst2html5 comes from docutils: python3-docutils: /usr/share/docutils/scripts/python3/rst2html5
and /usr/local/bin/rst2html5 --version rst2html5 (Docutils 0.16 [release], Python 3.8.2, on linux)
I wouldn't expect this to have been in /usr/local/bin - that is usually a sign of a local adminstrator install, via "pip" or some other means. The distro provided version would be in /usr/bin Regards, Daniel -- |: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|

On Fri, Sep 25, 2020 at 5:35 PM Daniel P. Berrangé <berrange@redhat.com> wrote:
On Fri, Sep 25, 2020 at 5:24 PM Andrea Bolognani <abologna@redhat.com> wrote:
On Fri, 2020-09-25 at 10:16 +0100, Daniel P. Berrangé wrote:
On Fri, Sep 25, 2020 at 05:03:24PM +0800, Wei Wang wrote:
/usr/local/bin/rst2html5 --stylesheet= --strict docs/manpages/virsh.rst docs/manpages/virsh.rst:41: (ERROR/3) Error in "code-block"
On Fri, Sep 25, 2020 at 05:31:09PM +0800, Wei Wang wrote: directive:
1 argument(s) required, 0 supplied.
.. code-block::
virsh [OPTION]... <command> <domain> [ARG]...
This is a sign of having a bad version of "rst2html5" installed.
We expect to be using rst2html5 that comes with python docutils package.
Yeah, the python3-docutils Debian package will contain a working rst2html5 binary.
That's strange, my rst2html5 comes from docutils: python3-docutils: /usr/share/docutils/scripts/python3/rst2html5
and /usr/local/bin/rst2html5 --version rst2html5 (Docutils 0.16 [release], Python 3.8.2, on linux)
I wouldn't expect this to have been in /usr/local/bin - that is usually a sign of a local adminstrator install, via "pip" or some other means. The distro provided version would be in /usr/bin
I reinstalled it via "apt-get install python3-docutils", still the same error. Here is my check whereis rst2html5 rst2html5: /usr/bin/rst2html5 /usr/local/bin/rst2html5.py /usr/local/bin/rst2html5 /usr/share/man/man1/rst2html5.1.gz /usr/bin/rst2html5 is a link to /usr/share/docutils/scripts/python3/rst2html5 Thanks, Wei

On Fri, 2020-09-25 at 17:46 +0800, Wei Wang wrote:
On Fri, Sep 25, 2020 at 5:35 PM Daniel P. Berrangé <berrange@redhat.com> wrote:
On Fri, Sep 25, 2020 at 05:31:09PM +0800, Wei Wang wrote:
That's strange, my rst2html5 comes from docutils: python3-docutils: /usr/share/docutils/scripts/python3/rst2html5
and /usr/local/bin/rst2html5 --version rst2html5 (Docutils 0.16 [release], Python 3.8.2, on linux)
I wouldn't expect this to have been in /usr/local/bin - that is usually a sign of a local adminstrator install, via "pip" or some other means. The distro provided version would be in /usr/bin
I reinstalled it via "apt-get install python3-docutils", still the same error.
Here is my check whereis rst2html5 rst2html5: /usr/bin/rst2html5 /usr/local/bin/rst2html5.py /usr/local/bin/rst2html5 /usr/share/man/man1/rst2html5.1.gz
/usr/bin/rst2html5 is a link to /usr/share/docutils/scripts/python3/rst2html5
You seem to have both /usr/bin/rst2html5 from the python3-docutils Debian package *and* /usr/local/bin/rst2html5 from the rst2html5 PyPi package installed on your system, and Meson is apparently picking up the latter rather than the former. Please uninstall the PyPi version with "pip uninstall rst2html5" (or something like that) and try again. Make sure you wipe out the build directory to force Meson to look for binaries again. -- Andrea Bolognani / Red Hat / Virtualization

On Fri, Sep 25, 2020 at 6:20 PM Andrea Bolognani <abologna@redhat.com> wrote:
On Fri, 2020-09-25 at 17:46 +0800, Wei Wang wrote:
On Fri, Sep 25, 2020 at 5:35 PM Daniel P. Berrangé <berrange@redhat.com> wrote:
On Fri, Sep 25, 2020 at 05:31:09PM +0800, Wei Wang wrote:
That's strange, my rst2html5 comes from docutils: python3-docutils: /usr/share/docutils/scripts/python3/rst2html5
and /usr/local/bin/rst2html5 --version rst2html5 (Docutils 0.16 [release], Python 3.8.2, on linux)
I wouldn't expect this to have been in /usr/local/bin - that is usually a sign of a local adminstrator install, via "pip" or some other means. The distro provided version would be in /usr/bin
I reinstalled it via "apt-get install python3-docutils", still the same error.
Here is my check whereis rst2html5 rst2html5: /usr/bin/rst2html5 /usr/local/bin/rst2html5.py /usr/local/bin/rst2html5 /usr/share/man/man1/rst2html5.1.gz
/usr/bin/rst2html5 is a link to /usr/share/docutils/scripts/python3/rst2html5
You seem to have both /usr/bin/rst2html5 from the python3-docutils Debian package *and* /usr/local/bin/rst2html5 from the rst2html5 PyPi package installed on your system, and Meson is apparently picking up the latter rather than the former.
Please uninstall the PyPi version with "pip uninstall rst2html5" (or something like that) and try again. Make sure you wipe out the build directory to force Meson to look for binaries again.
pip3 uninstall rst2html5 reports: WARNING: Skipping rst2html5 as it is not installed. But after directly "rm /usr/local/bin/rst2html5", Just get a warning: ../tests/qemuxml2xmltest.c: In function ‘mymain’: ../tests/qemuxml2xmltest.c:131:1: note: variable tracking size limit exceeded with ‘-fvar-tracking-assignments’, retrying without 131 | mymain(void) | ^~~~~~ [1250/1250] Linking target tests/cputest It works now. Thanks, everyone! Wei

On Fri, Sep 25, 2020 at 10:40:34AM +0200, Andrea Bolognani wrote:
On Fri, 2020-09-25 at 16:21 +0800, Wei Wang wrote:
On Fri, Sep 25, 2020 at 3:56 PM Andrea Bolognani <abologna@redhat.com> wrote:
On Fri, 2020-09-25 at 10:33 +0800, Wei Wang wrote:
In file included from ../src/util/virfile.c:42: /usr/include/libutil.h:43:10: fatal error: sys/_types.h: No such file or directory 43 | #include <sys/_types.h> | ^~~~~~~~~~~~~~ compilation terminated. [51/908] Compiling C object src/qemu/libvirt_driver_qemu_impl.a.p/qemu_driver.c.o ninja: build stopped: subcommand failed
I have /usr/include/sys/types.h, but no "_types.h"
Are you building on FreeBSD? Because that's where we expect <libutil.h> to be included. If you're not on FreeBSD, can you check which package /usr/include/libutil.h belongs to?
No, I'm building on Linux. It belongs to libutil-freebsd-dev, not sure why that's needed in my build.
Can you retry after uninstalling that package? It looks like it messes up our header detection, and I sort of doubt we care enough about this scenario to change our build system to cope with it.
Yes, we do need to fix our build system. The user can have valid reasons for having such a package installed, and we shouldn't require them to remove it. Regards, Daniel -- |: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
participants (4)
-
Andrea Bolognani
-
Daniel P. Berrangé
-
Ján Tomko
-
Wei Wang