Issues with building libvirt v6.7.0 on RHEL8.3

Hello all, I hope this is being posted in the right mailing list. I am trying to build libvirt v6.7.0 on RHEL8.3 x86_64 server in order to later apply patches for VDPA support posted recently by Jonathon Jongsma <jjongsma@redhat.com>. I am following the instrutions in https://libvirt.org/contribute.html and running from the root directory: meson build --prefix=/usr I fail on the following error: meson.build:921:2: ERROR: Program 'rpcgen portable-rpcgen' not found I can't find any reference how to overcome this obstacle. Thanks for any help, Eli

On Mon, Sep 14, 2020 at 01:11:01PM +0300, Eli Cohen wrote:
Hello all,
I hope this is being posted in the right mailing list.
I am trying to build libvirt v6.7.0 on RHEL8.3 x86_64 server in order to later apply patches for VDPA support posted recently by Jonathon Jongsma <jjongsma@redhat.com>.
I am following the instrutions in https://libvirt.org/contribute.html and running from the root directory:
meson build --prefix=/usr
I fail on the following error: meson.build:921:2: ERROR: Program 'rpcgen portable-rpcgen' not found
I can't find any reference how to overcome this obstacle.
The rpcgen program is provided by the rpcgen RPM. eg $ dnf install rpcgen Or more generally you can get almost everything libvirt needs by doing $ dnf builddep libvirt 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 Mon, Sep 14, 2020 at 11:38:06AM +0100, Daniel P. Berrangé wrote: Thanks for your reply, it is very helpful.
On Mon, Sep 14, 2020 at 01:11:01PM +0300, Eli Cohen wrote:
Hello all,
I hope this is being posted in the right mailing list.
I am trying to build libvirt v6.7.0 on RHEL8.3 x86_64 server in order to later apply patches for VDPA support posted recently by Jonathon Jongsma <jjongsma@redhat.com>.
I am following the instrutions in https://libvirt.org/contribute.html
Link above is wrong, I really meant https://libvirt.org/compiling.html
and running from the root directory:
meson build --prefix=/usr
I fail on the following error: meson.build:921:2: ERROR: Program 'rpcgen portable-rpcgen' not found
I can't find any reference how to overcome this obstacle.
The rpcgen program is provided by the rpcgen RPM. eg
$ dnf install rpcgen
Or more generally you can get almost everything libvirt needs by doing
$ dnf builddep libvirt
This does not work in my RHEL 8.3 machine but it does work on FC32. After this I can successfuly run meson build --prefix=/usr Now after running ninja -C build I am getting some errors. Here's just the first two. $ ninja -C build ninja: Entering directory `build' [1124/1210] 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. [1140/1210] 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.
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 Mon, Sep 14, 2020 at 02:08:55PM +0300, Eli Cohen wrote:
On Mon, Sep 14, 2020 at 11:38:06AM +0100, Daniel P. Berrangé wrote:
Thanks for your reply, it is very helpful.
On Mon, Sep 14, 2020 at 01:11:01PM +0300, Eli Cohen wrote:
Hello all,
I hope this is being posted in the right mailing list.
I am trying to build libvirt v6.7.0 on RHEL8.3 x86_64 server in order to later apply patches for VDPA support posted recently by Jonathon Jongsma <jjongsma@redhat.com>.
I am following the instrutions in https://libvirt.org/contribute.html
Link above is wrong, I really meant https://libvirt.org/compiling.html
and running from the root directory:
meson build --prefix=/usr
I fail on the following error: meson.build:921:2: ERROR: Program 'rpcgen portable-rpcgen' not found
I can't find any reference how to overcome this obstacle.
The rpcgen program is provided by the rpcgen RPM. eg
$ dnf install rpcgen
Or more generally you can get almost everything libvirt needs by doing
$ dnf builddep libvirt
This does not work in my RHEL 8.3 machine but it does work on FC32. After this I can successfuly run meson build --prefix=/usr
Now after running ninja -C build
I am getting some errors. Here's just the first two.
$ ninja -C build ninja: Entering directory `build' [1124/1210] 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
We'd expect to see that in /usr/bin/rst2html5 - it looks lke you've installed a non-standard docutils build / version and that appears to be breaking docs generation.
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. [1140/1210] 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.
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 Mon, Sep 14, 2020 at 12:14:40PM +0100, Daniel P. Berrangé wrote:
$ ninja -C build ninja: Entering directory `build' [1124/1210] 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
We'd expect to see that in /usr/bin/rst2html5 - it looks lke you've installed a non-standard docutils build / version and that appears to be breaking docs generation.
Looks to me like the build scripts look for rst2html5 in /usr/local/bin/. In anycase I did not put any package in /usr/local. In any case, I see different versions of rst2html5 in both /usr/bin and /usr/local/bin.

On Mon, Sep 14, 2020 at 02:44:16PM +0300, Eli Cohen wrote:
On Mon, Sep 14, 2020 at 12:14:40PM +0100, Daniel P. Berrangé wrote:
$ ninja -C build ninja: Entering directory `build' [1124/1210] 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
We'd expect to see that in /usr/bin/rst2html5 - it looks lke you've installed a non-standard docutils build / version and that appears to be breaking docs generation.
Looks to me like the build scripts look for rst2html5 in /usr/local/bin/. In anycase I did not put any package in /usr/local. In any case, I see different versions of rst2html5 in both /usr/bin and /usr/local/bin.
It's not the build script that looks under /usr/local/bin, it's the PATH variable which likely lists /usr/local/bin before /usr/bin. So, the only explanation I have for you as for how rst2html5 appeared under /usr/local/bin is that you or someone else installed it with pip as root. And the new docutils 0.16 looks like broke libvirt, so please stick with 0.15. Erik

On Mon, Sep 14, 2020 at 02:49:20PM +0200, Erik Skultety wrote:
On Mon, Sep 14, 2020 at 02:44:16PM +0300, Eli Cohen wrote:
On Mon, Sep 14, 2020 at 12:14:40PM +0100, Daniel P. Berrangé wrote:
$ ninja -C build ninja: Entering directory `build' [1124/1210] 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
We'd expect to see that in /usr/bin/rst2html5 - it looks lke you've installed a non-standard docutils build / version and that appears to be breaking docs generation.
Looks to me like the build scripts look for rst2html5 in /usr/local/bin/. In anycase I did not put any package in /usr/local. In any case, I see different versions of rst2html5 in both /usr/bin and /usr/local/bin.
It's not the build script that looks under /usr/local/bin, it's the PATH variable which likely lists /usr/local/bin before /usr/bin. So, the only explanation I have for you as for how rst2html5 appeared under /usr/local/bin is that you or someone else installed it with pip as root. And the new docutils 0.16 looks like broke libvirt, so please stick with 0.15.
It isn't docutils version that matters actually. It turns out there are 2 completely separate impls of rst2html5. One that is bundled with docutils on pip, which is the one libvirt works with. The other is in a rst2html5 package on pip. Basically need to remove the standalone rst2html5 pacakge that was installed from pip, or remove /usr/local/bin from $PATH so that it finds the from one docutils 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 Mon, Sep 14, 2020 at 02:49:20PM +0200, Erik Skultety wrote:
On Mon, Sep 14, 2020 at 02:44:16PM +0300, Eli Cohen wrote:
On Mon, Sep 14, 2020 at 12:14:40PM +0100, Daniel P. Berrangé wrote:
$ ninja -C build ninja: Entering directory `build' [1124/1210] 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
We'd expect to see that in /usr/bin/rst2html5 - it looks lke you've installed a non-standard docutils build / version and that appears to be breaking docs generation.
Looks to me like the build scripts look for rst2html5 in /usr/local/bin/. In anycase I did not put any package in /usr/local. In any case, I see different versions of rst2html5 in both /usr/bin and /usr/local/bin.
It's not the build script that looks under /usr/local/bin, it's the PATH variable which likely lists /usr/local/bin before /usr/bin. So, the only explanation I have for you as for how rst2html5 appeared under /usr/local/bin is that you or someone else installed it with pip as root. And the new docutils 0.16 looks like broke libvirt, so please stick with 0.15.
I am on 0.15 I tried all the recommendations given but I have htting issues all the time. If anyone has it working over any Linux distribution, I am will to try that. I have a server ready for these experiments. I just need to have the latest libvirt running on my system.

On Mon, Sep 14, 2020 at 04:24:20PM +0300, Eli Cohen wrote:
On Mon, Sep 14, 2020 at 02:49:20PM +0200, Erik Skultety wrote:
On Mon, Sep 14, 2020 at 02:44:16PM +0300, Eli Cohen wrote:
On Mon, Sep 14, 2020 at 12:14:40PM +0100, Daniel P. Berrangé wrote:
$ ninja -C build ninja: Entering directory `build' [1124/1210] 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
We'd expect to see that in /usr/bin/rst2html5 - it looks lke you've installed a non-standard docutils build / version and that appears to be breaking docs generation.
Looks to me like the build scripts look for rst2html5 in /usr/local/bin/. In anycase I did not put any package in /usr/local. In any case, I see different versions of rst2html5 in both /usr/bin and /usr/local/bin.
It's not the build script that looks under /usr/local/bin, it's the PATH variable which likely lists /usr/local/bin before /usr/bin. So, the only explanation I have for you as for how rst2html5 appeared under /usr/local/bin is that you or someone else installed it with pip as root. And the new docutils 0.16 looks like broke libvirt, so please stick with 0.15.
I am on 0.15
I tried all the recommendations given but I have htting issues all the time.
If anyone has it working over any Linux distribution, I am will to try that. I have a server ready for these experiments. I just need to have the latest libvirt running on my system.
Well, if you look at our CI pipelines [1], you'll see that apart from Rawhide, everything is green, so clearly the builds work. What other issues do you see? Look at the Dockerfiles for the distros we have, install the packages you see in the list and try re-running meson. Erik [1] https://gitlab.com/libvirt/libvirt/-/pipelines/189610405

On Mon, Sep 14, 2020 at 03:30:15PM +0200, Erik Skultety wrote:
On Mon, Sep 14, 2020 at 04:24:20PM +0300, Eli Cohen wrote:
On Mon, Sep 14, 2020 at 02:49:20PM +0200, Erik Skultety wrote:
On Mon, Sep 14, 2020 at 02:44:16PM +0300, Eli Cohen wrote:
On Mon, Sep 14, 2020 at 12:14:40PM +0100, Daniel P. Berrangé wrote:
$ ninja -C build ninja: Entering directory `build' [1124/1210] 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
We'd expect to see that in /usr/bin/rst2html5 - it looks lke you've installed a non-standard docutils build / version and that appears to be breaking docs generation.
Looks to me like the build scripts look for rst2html5 in /usr/local/bin/. In anycase I did not put any package in /usr/local. In any case, I see different versions of rst2html5 in both /usr/bin and /usr/local/bin.
It's not the build script that looks under /usr/local/bin, it's the PATH variable which likely lists /usr/local/bin before /usr/bin. So, the only explanation I have for you as for how rst2html5 appeared under /usr/local/bin is that you or someone else installed it with pip as root. And the new docutils 0.16 looks like broke libvirt, so please stick with 0.15.
I am on 0.15
I tried all the recommendations given but I have htting issues all the time.
If anyone has it working over any Linux distribution, I am will to try that. I have a server ready for these experiments. I just need to have the latest libvirt running on my system.
Well, if you look at our CI pipelines [1], you'll see that apart from Rawhide, everything is green, so clearly the builds work. What other issues do you see? Look at the Dockerfiles for the distros we have, install the packages you see in the list and try re-running meson.
That won't be enough - the bad rst5html5 install in /usr/local/ needs to be eliminated, either by deleting it, or removing it from $PATH. 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 Mon, Sep 14, 2020 at 02:34:51PM +0100, Daniel P. Berrangé wrote:
On Mon, Sep 14, 2020 at 03:30:15PM +0200, Erik Skultety wrote:
On Mon, Sep 14, 2020 at 04:24:20PM +0300, Eli Cohen wrote:
On Mon, Sep 14, 2020 at 02:49:20PM +0200, Erik Skultety wrote:
On Mon, Sep 14, 2020 at 02:44:16PM +0300, Eli Cohen wrote:
On Mon, Sep 14, 2020 at 12:14:40PM +0100, Daniel P. Berrangé wrote:
> > $ ninja -C build > ninja: Entering directory `build' > [1124/1210] 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
We'd expect to see that in /usr/bin/rst2html5 - it looks lke you've installed a non-standard docutils build / version and that appears to be breaking docs generation.
Looks to me like the build scripts look for rst2html5 in /usr/local/bin/. In anycase I did not put any package in /usr/local. In any case, I see different versions of rst2html5 in both /usr/bin and /usr/local/bin.
It's not the build script that looks under /usr/local/bin, it's the PATH variable which likely lists /usr/local/bin before /usr/bin. So, the only explanation I have for you as for how rst2html5 appeared under /usr/local/bin is that you or someone else installed it with pip as root. And the new docutils 0.16 looks like broke libvirt, so please stick with 0.15.
I am on 0.15
I tried all the recommendations given but I have htting issues all the time.
If anyone has it working over any Linux distribution, I am will to try that. I have a server ready for these experiments. I just need to have the latest libvirt running on my system.
Well, if you look at our CI pipelines [1], you'll see that apart from Rawhide, everything is green, so clearly the builds work. What other issues do you see? Look at the Dockerfiles for the distros we have, install the packages you see in the list and try re-running meson.
That won't be enough - the bad rst5html5 install in /usr/local/ needs to be eliminated, either by deleting it, or removing it from $PATH.
I already tried but it causes ninja to fail because it insists on getting rst2html5 from user local. See below: $ ninja -C build ninja: Entering directory `build' ninja: error: '/usr/local/bin/rst2html5', needed by 'docs/advanced-tests.html.p/advanced-tests.html.in', missing and no known rule to make it $ which rst2html5 /usr/bin/rst2html5
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 Mon, Sep 14, 2020 at 04:41:59PM +0300, Eli Cohen wrote:
On Mon, Sep 14, 2020 at 02:34:51PM +0100, Daniel P. Berrangé wrote:
On Mon, Sep 14, 2020 at 03:30:15PM +0200, Erik Skultety wrote:
On Mon, Sep 14, 2020 at 04:24:20PM +0300, Eli Cohen wrote:
On Mon, Sep 14, 2020 at 02:49:20PM +0200, Erik Skultety wrote:
On Mon, Sep 14, 2020 at 02:44:16PM +0300, Eli Cohen wrote:
On Mon, Sep 14, 2020 at 12:14:40PM +0100, Daniel P. Berrangé wrote: > > > > $ ninja -C build > > ninja: Entering directory `build' > > [1124/1210] 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 > > We'd expect to see that in /usr/bin/rst2html5 - it looks lke you've > installed a non-standard docutils build / version and that appears to > be breaking docs generation. > >
Looks to me like the build scripts look for rst2html5 in /usr/local/bin/. In anycase I did not put any package in /usr/local. In any case, I see different versions of rst2html5 in both /usr/bin and /usr/local/bin.
It's not the build script that looks under /usr/local/bin, it's the PATH variable which likely lists /usr/local/bin before /usr/bin. So, the only explanation I have for you as for how rst2html5 appeared under /usr/local/bin is that you or someone else installed it with pip as root. And the new docutils 0.16 looks like broke libvirt, so please stick with 0.15.
I am on 0.15
I tried all the recommendations given but I have htting issues all the time.
If anyone has it working over any Linux distribution, I am will to try that. I have a server ready for these experiments. I just need to have the latest libvirt running on my system.
Well, if you look at our CI pipelines [1], you'll see that apart from Rawhide, everything is green, so clearly the builds work. What other issues do you see? Look at the Dockerfiles for the distros we have, install the packages you see in the list and try re-running meson.
That won't be enough - the bad rst5html5 install in /usr/local/ needs to be eliminated, either by deleting it, or removing it from $PATH.
I already tried but it causes ninja to fail because it insists on getting rst2html5 from user local. See below:
$ ninja -C build ninja: Entering directory `build' ninja: error: '/usr/local/bin/rst2html5', needed by 'docs/advanced-tests.html.p/advanced-tests.html.in', missing and no known rule to make it
You need to reconfigure meson again...$ meson --reconfigure build otherwise ninja will use the static paths determined by the first meson run. Erik

On Mon, Sep 14, 2020 at 03:48:31PM +0200, Erik Skultety wrote:
On Mon, Sep 14, 2020 at 04:41:59PM +0300, Eli Cohen wrote:
On Mon, Sep 14, 2020 at 02:34:51PM +0100, Daniel P. Berrangé wrote:
On Mon, Sep 14, 2020 at 03:30:15PM +0200, Erik Skultety wrote:
On Mon, Sep 14, 2020 at 04:24:20PM +0300, Eli Cohen wrote:
On Mon, Sep 14, 2020 at 02:49:20PM +0200, Erik Skultety wrote:
On Mon, Sep 14, 2020 at 02:44:16PM +0300, Eli Cohen wrote: > On Mon, Sep 14, 2020 at 12:14:40PM +0100, Daniel P. Berrangé wrote: > > > > > > $ ninja -C build > > > ninja: Entering directory `build' > > > [1124/1210] 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 > > > > We'd expect to see that in /usr/bin/rst2html5 - it looks lke you've > > installed a non-standard docutils build / version and that appears to > > be breaking docs generation. > > > > > > Looks to me like the build scripts look for rst2html5 in > /usr/local/bin/. In anycase I did not put any package in /usr/local. In > any case, I see different versions of rst2html5 in both /usr/bin and > /usr/local/bin.
It's not the build script that looks under /usr/local/bin, it's the PATH variable which likely lists /usr/local/bin before /usr/bin. So, the only explanation I have for you as for how rst2html5 appeared under /usr/local/bin is that you or someone else installed it with pip as root. And the new docutils 0.16 looks like broke libvirt, so please stick with 0.15.
I am on 0.15
I tried all the recommendations given but I have htting issues all the time.
If anyone has it working over any Linux distribution, I am will to try that. I have a server ready for these experiments. I just need to have the latest libvirt running on my system.
Well, if you look at our CI pipelines [1], you'll see that apart from Rawhide, everything is green, so clearly the builds work. What other issues do you see? Look at the Dockerfiles for the distros we have, install the packages you see in the list and try re-running meson.
That won't be enough - the bad rst5html5 install in /usr/local/ needs to be eliminated, either by deleting it, or removing it from $PATH.
I already tried but it causes ninja to fail because it insists on getting rst2html5 from user local. See below:
$ ninja -C build ninja: Entering directory `build' ninja: error: '/usr/local/bin/rst2html5', needed by 'docs/advanced-tests.html.p/advanced-tests.html.in', missing and no known rule to make it
You need to reconfigure meson again...$ meson --reconfigure build otherwise ninja will use the static paths determined by the first meson run.
That does it. Thanks a lot all you who helped.
Erik
participants (3)
-
Daniel P. Berrangé
-
Eli Cohen
-
Erik Skultety