OpenVPN / ovpn-dco

OpenVPN Data Channel Offload in the linux kernel
101 stars 23 forks source link

Build failing on AlmaLinux 8.7 #33

Closed opoplawski closed 1 year ago

opoplawski commented 1 year ago
make -C /lib/modules/4.18.0-425.19.2.el8_7.x86_64/build M=/export/home/orion/redhat/kmod-ovpn-dco/ovpn-dco-0.2.20230323 PWD=/export/home/orion/redhat/kmod-ovpn-dco/ovpn-dco-0.2.20230323 REVISION= CONFIG_OVPN_DCO_V2=m INSTALL_MOD_DIR=updates/   modules
...
  CC [M]  /export/home/orion/redhat/kmod-ovpn-dco/ovpn-dco-0.2.20230323/drivers/net/ovpn-dco/netlink.o
In file included from /export/home/orion/redhat/kmod-ovpn-dco/ovpn-dco-0.2.20230323/drivers/net/ovpn-dco/netlink.c:25:
./include/net/genetlink.h:77:16: error: duplicate member ‘n_ops’
  unsigned int  n_ops;
                ^~~~~
In file included from ./include/linux/time.h:5,
                 from ./include/linux/skbuff.h:19,
                 from ./include/linux/ip.h:20,
                 from /export/home/orion/redhat/kmod-ovpn-dco/ovpn-dco-0.2.20230323/drivers/net/ovpn-dco/main.h:13,
                 from /export/home/orion/redhat/kmod-ovpn-dco/ovpn-dco-0.2.20230323/drivers/net/ovpn-dco/netlink.c:9:
/export/home/orion/redhat/kmod-ovpn-dco/ovpn-dco-0.2.20230323/linux-compat.h:70:19: error: duplicate member ‘ops’
 #define small_ops ops
                   ^~~
./include/linux/rh_kabi.h:424:3: note: in definition of macro ‘_RH_KABI_REPLACE’
   _new;       \
   ^~~~
./include/linux/rh_kabi.h:472:29: note: in expansion of macro ‘_RH_KABI_USE’
 #define RH_KABI_USE(n, ...) _RH_KABI_USE(__PASTE(_RH_KABI_USE, COUNT_ARGS(__VA_ARGS__))(n, __VA_ARGS__));
                             ^~~~~~~~~~~~
././include/linux/compiler_types.h:52:23: note: in expansion of macro ‘_RH_KABI_USE1’
 #define ___PASTE(a,b) a##b
                       ^
./include/net/genetlink.h:82:2: note: in expansion of macro ‘RH_KABI_USE’
  RH_KABI_USE(1, const struct genl_small_ops *small_ops)
  ^~~~~~~~~~~
./include/net/genetlink.h:82:46: note: in expansion of macro ‘small_ops’
  RH_KABI_USE(1, const struct genl_small_ops *small_ops)
                                              ^~~~~~~~~
In file included from /export/home/orion/redhat/kmod-ovpn-dco/ovpn-dco-0.2.20230323/drivers/net/ovpn-dco/netlink.c:25:
./include/net/genetlink.h:178:8: error: redefinition of ‘struct genl_ops’
 struct genl_ops {
        ^~~~~~~~
In file included from <command-line>:
/export/home/orion/redhat/kmod-ovpn-dco/ovpn-dco-0.2.20230323/linux-compat.h:69:24: note: originally defined here
 #define genl_small_ops genl_ops
                        ^~~~~~~~
./include/net/genetlink.h:154:8: note: in expansion of macro ‘genl_small_ops’
 struct genl_small_ops {
        ^~~~~~~~~~~~~~
/export/home/orion/redhat/kmod-ovpn-dco/ovpn-dco-0.2.20230323/drivers/net/ovpn-dco/netlink.c:848:14: error: initialization of ‘int (*)(const struct genl_ops *, struct sk_buff *, struct genl_info *)’ from incompatible pointer type ‘int (*)(const struct genl_ops *, struct sk_buff *, struct genl_info *)’ [-Werror=incompatible-pointer-types]
  .pre_doit = ovpn_pre_doit,
              ^~~~~~~~~~~~~
/export/home/orion/redhat/kmod-ovpn-dco/ovpn-dco-0.2.20230323/drivers/net/ovpn-dco/netlink.c:848:14: note: (near initialization for ‘ovpn_netlink_family.pre_doit’)
/export/home/orion/redhat/kmod-ovpn-dco/ovpn-dco-0.2.20230323/drivers/net/ovpn-dco/netlink.c:849:15: error: initialization of ‘void (*)(const struct genl_ops *, struct sk_buff *, struct genl_info *)’ from incompatible pointer type ‘void (*)(const struct genl_ops *, struct sk_buff *, struct genl_info *)’ [-Werror=incompatible-pointer-types]
  .post_doit = ovpn_post_doit,
               ^~~~~~~~~~~~~~
/export/home/orion/redhat/kmod-ovpn-dco/ovpn-dco-0.2.20230323/drivers/net/ovpn-dco/netlink.c:849:15: note: (near initialization for ‘ovpn_netlink_family.post_doit’)
/export/home/orion/redhat/kmod-ovpn-dco/ovpn-dco-0.2.20230323/drivers/net/ovpn-dco/netlink.c:851:15: error: initialization of ‘const struct genl_ops *’ from incompatible pointer type ‘const struct genl_ops *’ [-Werror=incompatible-pointer-types]
  .small_ops = ovpn_netlink_ops,
               ^~~~~~~~~~~~~~~~
/export/home/orion/redhat/kmod-ovpn-dco/ovpn-dco-0.2.20230323/drivers/net/ovpn-dco/netlink.c:851:15: note: (near initialization for ‘ovpn_netlink_family.ops’)
cc1: some warnings being treated as errors
ordex commented 1 year ago

This is probably the same issue as with RHEL: this distro claims to be running a kernel having different APIs compared to to the same vanilla version. A specific distro check must be added. Any way to recognize this distro like we do for RHEL?

opoplawski commented 1 year ago

It is being recognized as EL8 and -DEL8 is being passed. But that's pointed me to the fix. PR coming shortly.

opoplawski commented 1 year ago

Actually, looks like it was already fixed on master with a5e6fdbf0f85060b5fb4cdde1b332516c8e40033. I should have tried that first.