On 9/16/25 4:33 PM, Brendan Doyle via discuss wrote:
> Hi,

Hi, Brendan.  Thanks for the report!

> 
> For this release:
> 
> The most recent release from the current series:
> 
> https://www.openvswitch.org/releases/openvswitch-3.6.0.tar.gz
> 
> I'm getting the following compile errors:
> 
> 
> lib/netlink.c: In function 'min_attr_len':
> lib/netlink.c:832:38: error: invalid application of 'sizeof' to incomplete 
> type 'struct rtvia'
>      case NL_A_RTA_VIA: return sizeof(struct rtvia) + sizeof(struct in_addr);
>                                       ^
> lib/netlink.c: In function 'max_attr_len':
> lib/netlink.c:854:38: error: invalid application of 'sizeof' to incomplete 
> type 'struct rtvia'
>      case NL_A_RTA_VIA: return sizeof(struct rtvia) + sizeof(struct in6_addr);
>                                       ^
> make[1]: *** [lib/netlink.lo] Error 1
> make[1]: *** Waiting for unfinished jobs....
> make[1]: Leaving directory `/root/ovs

You seem to have some fairly old kernel headers installed.  See below.

> 
> Getting a bunch of warnings to:
> In file included from lib/netlink-protocol.h:34:0,
>                  from lib/netlink.h:39,
>                  from lib/netlink.c:18:
> lib/util.h:164:1: warning: 'returns_nonnull' attribute directive ignored 
> [-Wattributes]
>  OVS_RETURNS_NONNULL void *xmalloc(size_t) MALLOC_LIKE;
>  ^
> lib/util.h:165:1: warning: 'returns_nonnull' attribute directive ignored 
> [-Wattributes]
>  OVS_RETURNS_NONNULL void *xcalloc(size_t, size_t) MALLOC_LIKE;
>  ^
> lib/util.h:166:1: warning: 'returns_nonnull' attribute directive ignored 
> [-Wattributes]
>  OVS_RETURNS_NONNULL void *xzalloc(size_t) MALLOC_LIKE;

The 'returns_nonnull' attribute was introduced in gcc 4.9 about 12 years ago, 
IIUC.
Not sure if it's worth fixing, you may turn these warnings off with 
-Wno-attributes.

We'll look into proper compiler version checks though.

> 
> And more.
> 
> My build procedure, is:
> 
> ./boot.sh
> CFLAGS="-O0 -g" ./configure --prefix=/usr --localstatedir=/var 
> --sysconfdir=/etc
> make -j5 V=0 install <--- Here is where I get the errors
> make install
> 
> 
> I'm building on:
> [root@sca15-rain05 ovs]# cat /etc/redhat-release
> Red Hat Enterprise Linux Server release 7.9 (Maipo)
> [root@sca15-rain05 ovs]# cat /etc/oracle-release
> Oracle Linux Server release 7.9
> [root@sca15-rain05 ovs]# uname -a
> Linux sca15-rain05 5.4.17-2136.311.6.1.el7uek.x86_64 #2 SMP Thu Sep 22 
> 19:51:14 PDT 2022 x86_64 x86_64 x86_64 GNU/Linux
> [root@sca15-rain05 ovs]#
> [root@sca15-rain05 ovs]#  yum list installed kernel-uek
> Loaded plugins: ulninfo
> Repodata is over 2 weeks old. Install yum-cron? Or run: yum makecache fast
> Installed Packages
> kernel-uek.x86_64             5.4.17-2136.311.6.1.el7uek              
> @ol7_UEKR6

The 5.4 kernel should come with the proper definition of 'struct rtvia'.
Could you install a matching kernel headers package?

At the same time, I agree that we should improve the check in OVS and avoid
failures when rtnetlink header exists in the system, but doesn't have this
structure defined.

> I've attached the full build log.

In the log you also have errors pointing to missing OpenSSL functions.
You'll need to upgrade your version of OpenSSL to at least 1.1.1, as
older versions are no longer supported since OVS 3.5.  Alternatively
you may disable SSL/TLS support with --disable-ssl configuration knob.

Best regards, Ilya Maximets.
_______________________________________________
discuss mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-discuss

Reply via email to