On Mon, Sep 13, 2021 at 01:36:57 +0000, Or Ozeri wrote:
> Hi,
>
>
> I'm trying to compile libvirt on ubuntu machine.
> I installed meson 0.59.1 using pip.
> Then installed a few more packages that were required by meson build:
> sudo apt-get install libxml2-utils xsltproc libpciaccess-dev ninja-build
>
>
>
> Finally, I followed the simple instructions over here:
https://libvirt.org/compiling.html
>
> xz -dc libvirt-7.7.0.tar.xz | tar xvf -
> cd libvirt-7.7.0
> meson build
> ninja -C build
>
> The last command fails with:
>
> FAILED: src/libvirt-admin.so.0.7007.0
> cc -o src/libvirt-admin.so.0.7007.0 src/libvirt_probes.o
src/libvirt-admin.so.0.7007.0.p/meson-generated_.._admin_admin_protocol.c.o
src/libvirt-admin.so.0.7007.0.p/admin_libvirt-admin.c.o
src/libvirt-admin.so.0.7007.0.p/datatypes.c.o -Wl,--as-needed -Wl,--no-undefined -shared
-fPIC -Wl,--start-group -Wl,-soname,libvirt-admin.so.0
'-Wl,-rpath,$ORIGIN/:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
-Wl,-rpath-link,/home/oro/ozeri/libvirt-7.7.0/build/src src/libvirt.so.0.7007.0
-Wl,--version-script=/home/oro/ozeri/libvirt-7.7.0/build/src/admin/libvirt_admin.syms
-Wl,-z,nodelete /usr/lib/x86_64-linux-gnu/libcap-ng.so
/usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/libdevmapper.so
/usr/lib/x86_64-linux-gnu/libgnutls.so -Wl,-z,relro -Wl,-z,now
-Wl,--no-copy-dt-needed-entries /usr/lib/x86_64-linux-gnu/libglib-2.0.so
/usr/lib/x86_64-linux-gnu/libgobject-2.0.so /usr/lib/x86_64-linux-gnu/libgio-2.0.so
/usr/lib/x86_64-linux-gnu/libxml2.so /usr/lib/x86_64-linux-gnu/libyajl.so -Wl,--end-grou
p
> /usr/bin/ld: src/libvirt-admin.so.0.7007.0.p/admin_libvirt-admin.c.o: in function
`callFull':
> /home/oro/ozeri/libvirt-7.7.0/build/../src/admin/admin_remote.c:99: undefined
reference to `virNetClientProgramCall'
> /usr/bin/ld: src/libvirt-admin.so.0.7007.0.p/admin_libvirt-admin.c.o: in function
`remoteAdminConnectClose':
> /home/oro/ozeri/libvirt-7.7.0/build/../src/admin/admin_remote.c:197: undefined
reference to `virNetClientSetCloseCallback'
You've seem to have run into the same issue that is reported as:
https://gitlab.com/libvirt/libvirt/-/issues/196
If I read the issue correctly the following should fix it for you:
meson build -Ddriver_remote=enabled
Not sure if it helps. We now have auto-detection for the remote driver
and it is enabled automatically only if there is XDR library. Your
suggestion would make the `meson build -Ddriver_remote=enabled` fail
with different error and would not solve the issue.
You need to install `libtirpc-dev` to have driver_remote compiled or you
can disable the driver. But I guess that's not what you want as without
driver_remote you will not have libvirtd.
Pavel