On Wed, Apr 02, 2025 at 06:56:17 +0000, Duan, Zhenzhong wrote:
Hi,
When -Dlibnl=disabled, build failed as below:
../src/util/virnetdevbridge.c: In function 'virNetDevBridgeSetupVlans':
../src/util/virnetdevbridge.c:326:9: error: implicit declaration of function
'virNetlinkBridgeVlanFilterSet'; did you mean
'virNetDevBridgeGetVlanFiltering'? [-Werror=implicit-function-declaration]
326 | if (virNetlinkBridgeVlanFilterSet(ifname, RTM_DELLINK, 0, 1, &error) <
0) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| virNetDevBridgeGetVlanFiltering
../src/util/virnetdevbridge.c:326:9: error: nested extern declaration of
'virNetlinkBridgeVlanFilterSet' [-Werror=nested-externs]
../src/util/virnetdevbridge.c:326:47: error: 'RTM_DELLINK' undeclared (first use
in this function)
326 | if (virNetlinkBridgeVlanFilterSet(ifname, RTM_DELLINK, 0, 1, &error) <
0) {
| ^~~~~~~~~~~
../src/util/virnetdevbridge.c:326:47: note: each undeclared identifier is reported only
once for each function it appears in
../src/util/virnetdevbridge.c:346:55: error: 'RTM_SETLINK' undeclared (first use
in this function)
346 | if (virNetlinkBridgeVlanFilterSet(ifname, RTM_SETLINK, flags,
| ^~~~~~~~~~~
cc1: all warnings being treated as errors
See:
https://lists.libvirt.org/archives/list/devel@lists.libvirt.org/message/6...
https://lists.libvirt.org/archives/list/devel@lists.libvirt.org/message/Z...
https://lists.libvirt.org/archives/list/devel@lists.libvirt.org/message/P...
In short; unless you are building the libvirt client only you want
libnl installed.