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/[email protected]/message/6VYXYMDJG5FIPWHRVUSMP575FH536QLU/
https://lists.libvirt.org/archives/list/[email protected]/message/ZJKJFHRSIJUER462G33G3L7Y6I2GKEEM/
https://lists.libvirt.org/archives/list/[email protected]/message/P7DV7LJJJHAWNFMVABSD3A6FAM5YFHPG/
In short; unless you are building the libvirt client only you want
libnl installed.