Re: Help on Meson build Error

2020-09-25 Thread Wei Wang
On Fri, Sep 25, 2020 at 6:20 PM Andrea Bolognani 
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é 
> 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


Re: Help on Meson build Error

2020-09-25 Thread Wei Wang
On Fri, Sep 25, 2020 at 5:35 PM Daniel P. Berrangé 
wrote:

> On Fri, Sep 25, 2020 at 05:31:09PM +0800, Wei Wang wrote:
> > On Fri, Sep 25, 2020 at 5:24 PM 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]...   [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


Re: Help on Meson build Error

2020-09-25 Thread Wei Wang
On Fri, Sep 25, 2020 at 5:24 PM 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]...   [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


Re: Help on Meson build Error

2020-09-25 Thread Wei Wang
On Fri, Sep 25, 2020 at 4:54 PM Daniel P. Berrangé 
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]...   [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]...  [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 .
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 .
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 .
Include "--traceback" output, Docutils version (0.16 

Re: Help on Meson build Error

2020-09-25 Thread Wei Wang
On Fri, Sep 25, 2020 at 4:40 PM 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 
> 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 
> > > >   |  ^~
> > > > 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
> > >  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


Re: Help on Meson build Error

2020-09-25 Thread Wei Wang
On Fri, Sep 25, 2020 at 3:56 PM Andrea Bolognani 
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 
> >   |  ^~
> > 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
>  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


Re: Help on Meson build Error

2020-09-24 Thread Wei Wang
On Fri, Sep 25, 2020 at 10:03 AM Wei Wang 
wrote:

> On Thu, Sep 24, 2020 at 2:58 PM Ján Tomko  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-loca

Re: Help on Meson build Error

2020-09-24 Thread Wei Wang
On Thu, Sep 24, 2020 at 2:58 PM Ján Tomko  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


Help on meson build

2020-09-24 Thread Wei Wang
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)

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


Help on Meson build Error

2020-09-24 Thread Wei Wang
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