Hugne / tipc-rhel7

TIPC kmod for RHEL7
1 stars 3 forks source link

Unable to compile for RHEL 7.1 #1

Closed nramesh25 closed 9 years ago

nramesh25 commented 9 years ago

Hi,

I am trying to compile TIPC for RHEL 7.1 and I am getting this error. Am i missing any other patch for RHEL 7.1?

uname -a Linux localhost.localdomain.localdomain 3.10.0-229.4.2.el7.x86_64 #1 SMP Fri Apr 24 15:26:38 EDT 2015 x86_64 x86_64 x86_64 GNU/Linux

make[1]: Entering directory /usr/src/kernels/3.10.0-229.4.2.el7.x86_64' LD /root/rpmbuild/BUILD/tipc/tipc/built-in.o CC [M] /root/rpmbuild/BUILD/tipc/tipc/addr.o CC [M] /root/rpmbuild/BUILD/tipc/tipc/bcast.o CC [M] /root/rpmbuild/BUILD/tipc/tipc/bearer.o CC [M] /root/rpmbuild/BUILD/tipc/tipc/config.o CC [M] /root/rpmbuild/BUILD/tipc/tipc/core.o CC [M] /root/rpmbuild/BUILD/tipc/tipc/handler.o CC [M] /root/rpmbuild/BUILD/tipc/tipc/link.o CC [M] /root/rpmbuild/BUILD/tipc/tipc/discover.o CC [M] /root/rpmbuild/BUILD/tipc/tipc/msg.o CC [M] /root/rpmbuild/BUILD/tipc/tipc/name_distr.o CC [M] /root/rpmbuild/BUILD/tipc/tipc/subscr.o CC [M] /root/rpmbuild/BUILD/tipc/tipc/name_table.o CC [M] /root/rpmbuild/BUILD/tipc/tipc/net.o CC [M] /root/rpmbuild/BUILD/tipc/tipc/netlink.o CC [M] /root/rpmbuild/BUILD/tipc/tipc/node.o /root/rpmbuild/BUILD/tipc/tipc/netlink.c: In function 'tipc_netlink_start': /root/rpmbuild/BUILD/tipc/tipc/netlink.c:89:20: error: macro "genl_register_family_with_ops" passed 3 arguments, but takes just 2 &tipc_genl_ops, 1); ^ /root/rpmbuild/BUILD/tipc/tipc/netlink.c:88:8: error: 'genl_register_family_with_ops' undeclared (first use in this function) res = genl_register_family_with_ops(&tipc_genl_family, ^ /root/rpmbuild/BUILD/tipc/tipc/netlink.c:88:8: note: each undeclared identifier is reported only once for each function it appears in /root/rpmbuild/BUILD/tipc/tipc/netlink.c: At top level: /root/rpmbuild/BUILD/tipc/tipc/netlink.c:79:24: warning: 'tipc_genl_ops' defined but not used [-Wunused-variable] static struct genl_ops tipc_genl_ops = { ^ make[2]: *** [/root/rpmbuild/BUILD/tipc/tipc/netlink.o] Error 1 make[2]: *** Waiting for unfinished jobs.... make[1]: *** [_module_/root/rpmbuild/BUILD/tipc/tipc] Error 2 make[1]: Leaving directory/usr/src/kernels/3.10.0-229.4.2.el7.x86_64' error: Bad exit status from /var/tmp/rpm-tmp.kOAezS (%build)

RPM build errors: Bad exit status from /var/tmp/rpm-tmp.kOAezS (%build) make: *\ [kmod] Error 1 [root@localhost tipc-rhel7-master]#

Hugne commented 9 years ago

I haven't tried building for 7.1, most likely the specfile needs updating (and the source too, from the looks of it..) I can take a look at it tomorrow. genl_register_family_with_ops is not included in the RHEL kabi whitelist I believe, so this was expected

Hugne commented 9 years ago

RHEL 7.1 pulled in commit: c53ed74 genetlink: only pass array to genl_register_family_with_ops()

which broke the KABI. A while ago, i requested a KABI whitelist update to prevent issues like this https://bugzilla.redhat.com/show_bug.cgi?id=1087454 (probably not public) It seems that i missed this symbol...

So we (unfortunately) need to fork off the tipc kmod for RHEL7.1, and include a patch that addresses this.. :(

Hugne commented 9 years ago

I don't have access to a RHEL box with 7.1 to test build this, but you could try if you want. https://github.com/Hugne/tipc-rhel7/commit/813bc8702118521a03f68cf9e37647b83fc14cdb

Otherwise, i'll try to verify it tomorrow

nramesh25 commented 9 years ago

Thanks for the patch. I was able to compile and load the module. Thanks again for the help..

[111702.091381] tipc: module verification failed: signature and/or required key missing - tainting kernel [111702.092222] tipc: Activated (version 2.0.0) [111702.093929] NET: Registered protocol family 30 [111702.094129] tipc: Started in single node mode

[root@localhost src]# modinfo tipc filename: /lib/modules/3.10.0-229.4.2.el7.x86_64/extra/tipc/tipc.ko version: 2.0.0 license: Dual BSD/GPL description: TIPC: Transparent Inter Process Communication rhelversion: 7.1 srcversion: A0D1E9446FCAC0062A03823 depends:
vermagic: 3.10.0-229.4.2.el7.x86_64 SMP mod_unload modversions

Hugne commented 9 years ago

Ok, good. I'll keep the rhel7.1 branch and close this ticket. Thanks for reporting!