[LU-15956] lustre-client dkms build error with redefinition of ‘init_sk_module’ Created: 17/Jun/22  Updated: 12/Jul/22  Resolved: 12/Jul/22

Status: Resolved
Project: Lustre
Component/s: None
Affects Version/s: Lustre 2.15.0
Fix Version/s: Lustre 2.16.0, Lustre 2.15.1

Type: Bug Priority: Major
Reporter: Stephane Thiell Assignee: Sebastien Buisson
Resolution: Fixed Votes: 0
Labels: None
Environment:

CentOS 7.9


Attachments: Text File config.log     Text File make.log    
Severity: 3
Rank (Obsolete): 9223372036854775807

 Description   

Hello!
We wanted to try to deploy a few Lustre 2.15.0 clients on a CentOS 7.9 cluster. While we were able to build the standard lustre/kmod RPMs without issue, we hit the following problem when installing the DKMS RPM.

Overview of the dkms rpm build process (from the Compiling Lustre Wiki page)

make distclean
sh ./autogen.sh
 ./configure --enable-dist --disable-server --enable-client
make dist
rpmbuild -bs --without servers lustre-dkms.spec
rpmbuild --rebuild --without servers /path/to/lustre-client-dkms(...).el7.src.rpm

The installation of the lustre-client-dkms RPM fails on CentOS 7.9 with the following errors:

/var/lib/dkms/lustre-client/2.15.0_1_g0a101e6/build/lustre/ptlrpc/gss/gss_sk_mech.c:946:12: error: redefinition of ‘init_sk_module’
 int __init init_sk_module(void)
            ^
In file included from /var/lib/dkms/lustre-client/2.15.0_1_g0a101e6/build/lustre/ptlrpc/gss/gss_crypto.h:6:0,
                 from /var/lib/dkms/lustre-client/2.15.0_1_g0a101e6/build/lustre/ptlrpc/gss/gss_sk_mech.c:44:
/var/lib/dkms/lustre-client/2.15.0_1_g0a101e6/build/lustre/ptlrpc/gss/gss_internal.h:544:19: note: previous definition of ‘init_sk_module’ was here
 static inline int init_sk_module(void) { return 0; }
                   ^
/var/lib/dkms/lustre-client/2.15.0_1_g0a101e6/build/lustre/ptlrpc/gss/gss_sk_mech.c:957:6: error: redefinition of ‘cleanup_sk_module’
 void cleanup_sk_module(void)
      ^
In file included from /var/lib/dkms/lustre-client/2.15.0_1_g0a101e6/build/lustre/ptlrpc/gss/gss_crypto.h:6:0,
                 from /var/lib/dkms/lustre-client/2.15.0_1_g0a101e6/build/lustre/ptlrpc/gss/gss_sk_mech.c:44:
/var/lib/dkms/lustre-client/2.15.0_1_g0a101e6/build/lustre/ptlrpc/gss/gss_internal.h:545:20: note: previous definition of ‘cleanup_sk_module’ was here
 static inline void cleanup_sk_module(void) { return; }
                    ^

 
Attaching dkms' build/ make.log where you can find the full log of the build error and build/ config.log (from /var/lib/dkms/lustre-client on the target client where the build fails).

GCC version: gcc version 4.8.5 20150623 (Red Hat 4.8.5-44) (GCC) 



 Comments   
Comment by Stephane Thiell [ 17/Jun/22 ]

FYI we found a workaround for this: disable gss and thus avoid the compilation error by removing the krb5-devel package from the node:

Indeed, there is a check in lustre-dkms_pre-build.sh:

rpm -qa | grep krb5-devel >/dev/null
if [ $? == 0 ] ; then
        GSS="--enable-gss"
else
        GSS="--disable-gss"
fi

It's one way we found to disable gss support for DKMS build. Then, the lustre client dkms rpm does work.

Comment by Peter Jones [ 17/Jun/22 ]

Stephane

Hats off to you for again being among the first to try a new major release. I think that this might be as simple as Centos7.9 is not a supported distro for clients because of the encryption feature

Sebastien

Could you please confirm/deny?

Thanks

Peter

Comment by Gerrit Updater [ 20/Jun/22 ]

"Sebastien Buisson <sbuisson@ddn.com>" uploaded a new patch: https://review.whamcloud.com/47681
Subject: LU-15956 gss: allow build without ssk
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 06bd93125087d55aca9fe63bbca5553dd9e85748

Comment by Sebastien Buisson [ 20/Jun/22 ]

This looks like an issue with the GSS build system.

Stephane, could you please give a try to https://review.whamcloud.com/47681, and mark review +1 if this works for you?

Thanks!

Comment by Stephane Thiell [ 21/Jun/22 ]

Hi Sebastien,

With your patch, I cannot reproduce the issue anymore, even with krb5-devel installed. Thanks!

Comment by Gerrit Updater [ 25/Jun/22 ]

"Jian Yu <yujian@whamcloud.com>" uploaded a new patch: https://review.whamcloud.com/47781
Subject: LU-15956 gss: allow build without ssk
Project: fs/lustre-release
Branch: b2_15
Current Patch Set: 1
Commit: 121b9aef3026f42d6093c9ae50981df84d47a2f9

Comment by Gerrit Updater [ 08/Jul/22 ]

"Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/47681/
Subject: LU-15956 gss: allow build without ssk
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: 2e061e88a44db70e4446be567243a38a76ed5370

Comment by Gerrit Updater [ 08/Jul/22 ]

"Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/47781/
Subject: LU-15956 gss: allow build without ssk
Project: fs/lustre-release
Branch: b2_15
Current Patch Set:
Commit: e1906ae3dbb6b3291272fd8ba0ecbb9fd2425fbb

Generated at Sat Feb 10 03:22:44 UTC 2024 using Jira 9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c.