[LU-16323] Build failed with "error: conflicting types for ‘rhashtable_walk_enter’" Created: 18/Nov/22 Updated: 18/Nov/22 Resolved: 18/Nov/22 |
|
| Status: | Resolved |
| Project: | Lustre |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Minor |
| Reporter: | Arshad Hussain | Assignee: | WC Triage |
| Resolution: | Not a Bug | Votes: | 0 |
| Labels: | None | ||
| Severity: | 3 |
| Rank (Obsolete): | 9223372036854775807 |
| Description |
|
Build fails with error: conflicting types for ‘rhashtable_walk_enter’
make[3]: Entering directory '/usr/src/kernels/4.18.0-372.9.1.el8.x86_64' CC [M] /root/lustre-release/lustre-release/libcfs/libcfs/linux/linux-hash.o In file included from /root/lustre-release/lustre-release/libcfs/libcfs/linux/linux-hash.c:33: /root/lustre-release/lustre-release/libcfs/include/libcfs/linux/linux-hash.h:70:12: error: conflicting types for ‘rhashtable_walk_enter’ static int rhashtable_walk_enter(struct rhashtable *ht, ^~~~~~~~~~~~~~~~~~~~~ In file included from /root/lustre-release/lustre-release/libcfs/include/libcfs/linux/linux-hash.h:27, from /root/lustre-release/lustre-release/libcfs/libcfs/linux/linux-hash.c:33: include/linux/rhashtable.h:248:6: note: previous declaration of ‘rhashtable_walk_enter’ was here void rhashtable_walk_enter(struct rhashtable *ht, ^~~~~~~~~~~~~~~~~~~~~ In file included from /root/lustre-release/lustre-release/libcfs/libcfs/linux/linux-hash.c:33: /root/lustre-release/lustre-release/libcfs/include/libcfs/linux/linux-hash.h: In function ‘rhashtable_walk_enter’: /root/lustre-release/lustre-release/libcfs/include/libcfs/linux/linux-hash.h:76:9: error: implicit declaration of function ‘rhashtable_walk_init’; did you mean ‘rhashtable_walk_exit’? [-Werror=implicit-function-declaration] return rhashtable_walk_init(ht, iter); ^~~~~~~~~~~~~~~~~~~~ rhashtable_walk_exit At top level: /root/lustre-release/lustre-release/libcfs/include/libcfs/linux/linux-hash.h:70:12: error: ‘rhashtable_walk_enter’ defined but not used [-Werror=unused-function] static int rhashtable_walk_enter(struct rhashtable *ht, ^~~~~~~~~~~~~~~~~~~~~ rhashtable.h from kernel-devel $ rpm -q --whatprovides /usr/src/kernels/4.18.0-372.9.1.el8.x86_64/include/linux/rhashtable.h kernel-devel-4.18.0-372.9.1.el8.x86_64 Kernel version $ uname -r 4.18.0-372.9.1.el8.x86_64 Steps to reproduce $ git pull $ sh autogen.sh $ ./configure $ make Master (Head) is pointing to...
18e14c7099065891516b189467c0ff11ec7f470a (origin/master, origin/HEAD, master) LU-16216 tests: Update sanity-lnet for other LNDs
|
| Comments |
| Comment by Arshad Hussain [ 18/Nov/22 ] |
|
from: libcfs/include/libcfs/linux/linux-hash.h #ifndef HAVE_RHASHTABLE_WALK_ENTER
static int rhashtable_walk_enter(struct rhashtable *ht,
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> struct rhashtable_iter *iter)
{
#ifdef HAVE_3ARG_RHASHTABLE_WALK_INIT
>>>>>>>>return rhashtable_walk_init(ht, iter, GFP_KERNEL);
#else
>>>>>>>>return rhashtable_walk_init(ht, iter);
#endif
}
#endif
from: /usr/src/kernels/4.18.0-372.9.1.el8.x86_64/include/linux/rhashtable.h void rhashtable_walk_enter(struct rhashtable *ht, >>>>>>>>>>>>>>>>>>>>>>>> struct rhashtable_iter *iter);
|
| Comment by Arshad Hussain [ 18/Nov/22 ] |
|
config.log lb_cv_compile_rhashtable_replace_fast=yes lb_cv_compile_rhashtable_walk_enter=no lb_cv_compile_rhashtable_walk_init=no |
| Comment by Arshad Hussain [ 18/Nov/22 ] |
|
Workaround. Rebooting the VM and doing the cycle of autogen, configure, make correctly detects the function. This is not a lustre bug. lb_cv_compile_rhashtable_replace_fast=yes lb_cv_compile_rhashtable_walk_enter=yes /* correctly detects the function */ lb_cv_compile_rhashtable_walk_init=no |