[ovs-discuss] Error - build kernel module (openvswitch-2.0.0.tar.gz) on RHEL 7 Beta

Ashok Byahatti ashok.byahatti at embrane.com
Mon Dec 30 18:46:08 UTC 2013


I was trying to build the Open vSwitch kernel module(using openvswitch-2.0.0.tar.gz<http://openvswitch.org/releases/openvswitch-2.0.0.tar.gz>) on RHEL 7 Beta .
My kernel version is 3.10.0-54.0.1.el7.x86_64 .


rpmbuild -bb  -D "kversion 3.10.0-54.0.1.el7.x86_64" -D "kflavors default debug kdump"  rhel/openvswitch-kmod-rhel6.spec

I get the following error when the above command is executed -

In file included from /root/rpmbuild/BUILD/openvswitch-2.0.0/_default/datapath/linux/gre.c:34:0:
/root/rpmbuild/BUILD/openvswitch-2.0.0/_default/../datapath/linux/compat/include/net/gre.h:77:8: error: redefinition of 'struct gre_cisco_protocol'
struct gre_cisco_protocol {
        ^
In file included from /root/rpmbuild/BUILD/openvswitch-2.0.0/_default/../datapath/linux/compat/include/net/gre.h:8:0,
                 from /root/rpmbuild/BUILD/openvswitch-2.0.0/_default/datapath/linux/gre.c:34:
include/net/gre.h:26:8: note: originally defined here
struct gre_cisco_protocol {
        ^
In file included from /root/rpmbuild/BUILD/openvswitch-2.0.0/_default/datapath/linux/gre.c:34:0:
/root/rpmbuild/BUILD/openvswitch-2.0.0/_default/../datapath/linux/compat/include/net/gre.h:82:5: error: conflicting types for 'gre_cisco_register'
int gre_cisco_register(struct gre_cisco_protocol *proto);
     ^
In file included from /root/rpmbuild/BUILD/openvswitch-2.0.0/_default/../datapath/linux/compat/include/net/gre.h:8:0,
                 from /root/rpmbuild/BUILD/openvswitch-2.0.0/_default/datapath/linux/gre.c:34:
include/net/gre.h:33:5: note: previous declaration of 'gre_cisco_register' was here
int gre_cisco_register(struct gre_cisco_protocol *proto);
     ^
In file included from /root/rpmbuild/BUILD/openvswitch-2.0.0/_default/datapath/linux/gre.c:34:0:
/root/rpmbuild/BUILD/openvswitch-2.0.0/_default/../datapath/linux/compat/include/net/gre.h:83:5: error: conflicting types for 'gre_cisco_unregister'
int gre_cisco_unregister(struct gre_cisco_protocol *proto);
     ^
In file included from /root/rpmbuild/BUILD/openvswitch-2.0.0/_default/../datapath/linux/compat/include/net/gre.h:8:0,
                 from /root/rpmbuild/BUILD/openvswitch-2.0.0/_default/datapath/linux/gre.c:34:
include/net/gre.h:34:5: note: previous declaration of 'gre_cisco_unregister' was here
int gre_cisco_unregister(struct gre_cisco_protocol *proto);
     ^
In file included from /root/rpmbuild/BUILD/openvswitch-2.0.0/_default/datapath/linux/gre.c:34:0:
/root/rpmbuild/BUILD/openvswitch-2.0.0/_default/../datapath/linux/compat/include/net/gre.h:92:19: error: redefinition of 'ip_gre_calc_hlen'
static inline int ip_gre_calc_hlen(__be16 o_flags)
                   ^
In file included from /root/rpmbuild/BUILD/openvswitch-2.0.0/_default/../datapath/linux/compat/include/net/gre.h:8:0,
                 from /root/rpmbuild/BUILD/openvswitch-2.0.0/_default/datapath/linux/gre.c:34:
include/net/gre.h:43:19: note: previous definition of 'ip_gre_calc_hlen' was here
static inline int ip_gre_calc_hlen(__be16 o_flags)
                   ^
  CC [M]  /root/rpmbuild/BUILD/openvswitch-2.0.0/_default/datapath/linux/net_namespace.o
In file included from /root/rpmbuild/BUILD/openvswitch-2.0.0/_default/datapath/linux/gso.c:31:0:
/root/rpmbuild/BUILD/openvswitch-2.0.0/_default/../datapath/linux/compat/include/net/gre.h:77:8: error: redefinition of 'struct gre_cisco_protocol'
struct gre_cisco_protocol {
        ^
In file included from /root/rpmbuild/BUILD/openvswitch-2.0.0/_default/../datapath/linux/compat/include/net/gre.h:8:0,
                 from /root/rpmbuild/BUILD/openvswitch-2.0.0/_default/datapath/linux/gso.c:31:
include/net/gre.h:26:8: note: originally defined here
struct gre_cisco_protocol {
        ^
In file included from /root/rpmbuild/BUILD/openvswitch-2.0.0/_default/datapath/linux/gso.c:31:0:
/root/rpmbuild/BUILD/openvswitch-2.0.0/_default/../datapath/linux/compat/include/net/gre.h:82:5: error: conflicting types for 'gre_cisco_register'
int gre_cisco_register(struct gre_cisco_protocol *proto);
     ^
In file included from /root/rpmbuild/BUILD/openvswitch-2.0.0/_default/../datapath/linux/compat/include/net/gre.h:8:0,
                 from /root/rpmbuild/BUILD/openvswitch-2.0.0/_default/datapath/linux/gso.c:31:
include/net/gre.h:33:5: note: previous declaration of 'gre_cisco_register' was here
int gre_cisco_register(struct gre_cisco_protocol *proto);
     ^
In file included from /root/rpmbuild/BUILD/openvswitch-2.0.0/_default/datapath/linux/gso.c:31:0:
/root/rpmbuild/BUILD/openvswitch-2.0.0/_default/../datapath/linux/compat/include/net/gre.h:83:5: error: conflicting types for 'gre_cisco_unregister'
int gre_cisco_unregister(struct gre_cisco_protocol *proto);
     ^
In file included from /root/rpmbuild/BUILD/openvswitch-2.0.0/_default/../datapath/linux/compat/include/net/gre.h:8:0,
                 from /root/rpmbuild/BUILD/openvswitch-2.0.0/_default/datapath/linux/gso.c:31:
include/net/gre.h:34:5: note: previous declaration of 'gre_cisco_unregister' was here
int gre_cisco_unregister(struct gre_cisco_protocol *proto);
     ^
In file included from /root/rpmbuild/BUILD/openvswitch-2.0.0/_default/datapath/linux/gso.c:31:0:
/root/rpmbuild/BUILD/openvswitch-2.0.0/_default/../datapath/linux/compat/include/net/gre.h:92:19: error: redefinition of 'ip_gre_calc_hlen'
static inline int ip_gre_calc_hlen(__be16 o_flags)
                   ^
In file included from /root/rpmbuild/BUILD/openvswitch-2.0.0/_default/../datapath/linux/compat/include/net/gre.h:8:0,
                 from /root/rpmbuild/BUILD/openvswitch-2.0.0/_default/datapath/linux/gso.c:31:
include/net/gre.h:43:19: note: previous definition of 'ip_gre_calc_hlen' was here
static inline int ip_gre_calc_hlen(__be16 o_flags)
                   ^
In file included from /root/rpmbuild/BUILD/openvswitch-2.0.0/_default/datapath/linux/actions.c:35:0:
/root/rpmbuild/BUILD/openvswitch-2.0.0/_default/../datapath/linux/compat/include/net/sctp/checksum.h:8:22: error: redefinition of 'sctp_compute_cksum'
static inline __le32 sctp_compute_cksum(const struct sk_buff *skb,
                      ^
In file included from /root/rpmbuild/BUILD/openvswitch-2.0.0/_default/../datapath/linux/compat/include/net/sctp/checksum.h:5:0,
                 from /root/rpmbuild/BUILD/openvswitch-2.0.0/_default/datapath/linux/actions.c:35:
include/net/sctp/checksum.h:89:22: note: previous definition of 'sctp_compute_cksum' was here
static inline __le32 sctp_compute_cksum(const struct sk_buff *skb,
                      ^
In file included from /root/rpmbuild/BUILD/openvswitch-2.0.0/_default/datapath/linux/vport-gre.c:46:0:
/root/rpmbuild/BUILD/openvswitch-2.0.0/_default/../datapath/linux/compat/include/net/gre.h:77:8: error: redefinition of 'struct gre_cisco_protocol'
struct gre_cisco_protocol {
        ^
In file included from /root/rpmbuild/BUILD/openvswitch-2.0.0/_default/../datapath/linux/compat/include/net/gre.h:8:0,
                 from /root/rpmbuild/BUILD/openvswitch-2.0.0/_default/datapath/linux/vport-gre.c:46:
include/net/gre.h:26:8: note: originally defined here
struct gre_cisco_protocol {
        ^
In file included from /root/rpmbuild/BUILD/openvswitch-2.0.0/_default/datapath/linux/vport-gre.c:46:0:
/root/rpmbuild/BUILD/openvswitch-2.0.0/_default/../datapath/linux/compat/include/net/gre.h:82:5: error: conflicting types for 'gre_cisco_register'
int gre_cisco_register(struct gre_cisco_protocol *proto);
     ^
In file included from /root/rpmbuild/BUILD/openvswitch-2.0.0/_default/../datapath/linux/compat/include/net/gre.h:8:0,
                 from /root/rpmbuild/BUILD/openvswitch-2.0.0/_default/datapath/linux/vport-gre.c:46:
include/net/gre.h:33:5: note: previous declaration of 'gre_cisco_register' was here
int gre_cisco_register(struct gre_cisco_protocol *proto);
     ^
In file included from /root/rpmbuild/BUILD/openvswitch-2.0.0/_default/datapath/linux/vport-gre.c:46:0:
/root/rpmbuild/BUILD/openvswitch-2.0.0/_default/../datapath/linux/compat/include/net/gre.h:83:5: error: conflicting types for 'gre_cisco_unregister'
int gre_cisco_unregister(struct gre_cisco_protocol *proto);
     ^
In file included from /root/rpmbuild/BUILD/openvswitch-2.0.0/_default/../datapath/linux/compat/include/net/gre.h:8:0,
                 from /root/rpmbuild/BUILD/openvswitch-2.0.0/_default/datapath/linux/vport-gre.c:46:
include/net/gre.h:34:5: note: previous declaration of 'gre_cisco_unregister' was here
int gre_cisco_unregister(struct gre_cisco_protocol *proto);
     ^
In file included from /root/rpmbuild/BUILD/openvswitch-2.0.0/_default/datapath/linux/vport-gre.c:46:0:
/root/rpmbuild/BUILD/openvswitch-2.0.0/_default/../datapath/linux/compat/include/net/gre.h:92:19: error: redefinition of 'ip_gre_calc_hlen'
static inline int ip_gre_calc_hlen(__be16 o_flags)
                   ^
In file included from /root/rpmbuild/BUILD/openvswitch-2.0.0/_default/../datapath/linux/compat/include/net/gre.h:8:0,
                 from /root/rpmbuild/BUILD/openvswitch-2.0.0/_default/datapath/linux/vport-gre.c:46:
include/net/gre.h:43:19: note: previous definition of 'ip_gre_calc_hlen' was here
static inline int ip_gre_calc_hlen(__be16 o_flags)
                   ^
make[2]: *** [/root/rpmbuild/BUILD/openvswitch-2.0.0/_default/datapath/linux/vport-gre.o] Error 1
make[2]: *** Waiting for unfinished jobs....
/root/rpmbuild/BUILD/openvswitch-2.0.0/_default/datapath/linux/gre.c:330:5: error: conflicting types for 'gre_cisco_register'
int gre_cisco_register(struct gre_cisco_protocol *newp)
     ^
In file included from /root/rpmbuild/BUILD/openvswitch-2.0.0/_default/../datapath/linux/compat/include/net/gre.h:8:0,
                 from /root/rpmbuild/BUILD/openvswitch-2.0.0/_default/datapath/linux/gre.c:34:
include/net/gre.h:33:5: note: previous declaration of 'gre_cisco_register' was here
int gre_cisco_register(struct gre_cisco_protocol *proto);
     ^
/root/rpmbuild/BUILD/openvswitch-2.0.0/_default/datapath/linux/gre.c:342:5: error: conflicting types for 'gre_cisco_unregister'
int gre_cisco_unregister(struct gre_cisco_protocol *proto)
     ^
In file included from /root/rpmbuild/BUILD/openvswitch-2.0.0/_default/../datapath/linux/compat/include/net/gre.h:8:0,
                 from /root/rpmbuild/BUILD/openvswitch-2.0.0/_default/datapath/linux/gre.c:34:
include/net/gre.h:34:5: note: previous declaration of 'gre_cisco_unregister' was here
int gre_cisco_unregister(struct gre_cisco_protocol *proto);
     ^
make[2]: *** [/root/rpmbuild/BUILD/openvswitch-2.0.0/_default/datapath/linux/gre.o] Error 1
make[2]: *** [/root/rpmbuild/BUILD/openvswitch-2.0.0/_default/datapath/linux/actions.o] Error 1
make[2]: *** [/root/rpmbuild/BUILD/openvswitch-2.0.0/_default/datapath/linux/gso.o] Error 1
make[1]: *** [_module_/root/rpmbuild/BUILD/openvswitch-2.0.0/_default/datapath/linux] Error 2
make[1]: Leaving directory `/usr/src/kernels/3.10.0-54.0.1.el7.x86_64'
make: *** [default] Error 2
make: Leaving directory `/root/rpmbuild/BUILD/openvswitch-2.0.0/_default/datapath/linux'
error: Bad exit status from /var/tmp/rpm-tmp.8ewPxw (%build)



Do let me know if you need more information.

Thanks,
Ashok
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://openvswitch.org/pipermail/ovs-discuss/attachments/20131230/a091aa4d/attachment.html>


More information about the discuss mailing list