[LU-11353] make failing due to missing rhashtable_lookup_get_insert_fast() in 3.10.327 kernel (CentOS 7.1/7.2) Created: 08/Sep/18  Updated: 10/Sep/18  Resolved: 10/Sep/18

Status: Resolved
Project: Lustre
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Question/Request Priority: Major
Reporter: Arshad Hussain Assignee: James A Simmons
Resolution: Won't Fix Votes: 0
Labels: None

Rank (Obsolete): 9223372036854775807

 Description   

Hi,

My lustre dev machine is running 3.10.X Kernel. "make" started to fail after I updated my local branch recently with latest pull. It is failing with ...

CC [M] /root/lustre-xx-3.10/lustre-release/libcfs/libcfs/linux/linux-hash.o
In file included from /root/lustre-xx-3.10/lustre-release/libcfs/libcfs/linux/linux-hash.c:33:0:
/root/lustre-xx-3.10/lustre-release/libcfs/include/libcfs/linux/linux-hash.h: In function 'rhashtable_lookup_get_insert_fast':
/root/lustre-xx-3.10/lustre-release/libcfs/include/libcfs/linux/linux-hash.h:60:2: error: implicit declaration of function 'rhashtable_lookup_insert_fast' [-Werror=implicit-function-declaration]
 rc = rhashtable_lookup_insert_fast(ht, obj, params);
 ^
/root/lustre-xx-3.10/lustre-release/libcfs/include/libcfs/linux/linux-hash.h:63:3: error: implicit declaration of function 'rht_obj' [-Werror=implicit-function-declaration]
 key = rht_obj(ht, obj);
 ^

./configure logs are ...

configure:16966: checking for linux/stringhash.h
configure:16990: cp conftest.c build && make -d modules LDFLAGS= LD=/usr/bin/ld -m elf_x86_64 CC=gcc -f /root/lustre-xx-3.10/lustre-release/build/Makefile LUSTRE_LINUX_CONFIG=/lib/modules/3.10.0-327.13.1.x3.0.89.x86_64/build/.config LINUXINCLUDE= -I/lib/modules/3.10.0-327.13.1.x3.0.89.x86_64/source/arch/x86/include -Iinclude -Iarch/x86/include/generated -I/lib/modules/3.10.0-327.13.1.x3.0.89.x86_64/source/include -Iinclude2 -I/lib/modules/3.10.0-327.13.1.x3.0.89.x86_64/source/include/uapi -Iinclude/generated -I/lib/modules/3.10.0-327.13.1.x3.0.89.x86_64/source/arch/x86/include/uapi -Iarch/x86/include/generated/uapi -I/lib/modules/3.10.0-327.13.1.x3.0.89.x86_64/source/include/uapi -Iinclude/generated/uapi -include /lib/modules/3.10.0-327.13.1.x3.0.89.x86_64/source/include/linux/kconfig.h -o tmp_include_depends -o scripts -o include/config/MARKER -C /lib/modules/3.10.0-327.13.1.x3.0.89.x86_64/build EXTRA_CFLAGS=-Werror-implicit-function-declaration -g -I/root/lustre-xx-3.10/lustre-release/libcfs/include -I/root/lustre-xx-3.10/lustre-release/lnet/include -I/root/lustre-xx-3.10/lustre-release/lustre/include -Wno-format-truncation M=/root/lustre-xx-3.10/lustre-release/build
/root/lustre-xx-3.10/lustre-release/build/conftest.c:56:30: fatal error: linux/stringhash.h: No such file or directory
 #include <linux/stringhash.h>
                              ^
compilation terminated.
make[1]: *** [/root/lustre-xx-3.10/lustre-release/build/conftest.o] Error 1
make: *** [_module_/root/lustre-xx-3.10/lustre-release/build] Error 2
configure:16993: $? = 2

from config.log

lb_cv_compile_rhashtable_lookup_get_insert_fast=no
lb_cv_header_linux_stringhash_h=no

What can be done to get it compiled with 3.10 kernel. It does not have stringhash as kernel version 4.X variant. Is is something to do with commit : bef1069506c38e6d8ebdb4393cccb5a33978a61e

Thanks
Arshad



 Comments   
Comment by James A Simmons [ 08/Sep/18 ]

What version of RHEL are you running ? RHEL7.2 I believe didn't even have rhashtable support. Then RHE7.3 introduced it and the latest RHEL7.5 has full support. Originally the patch back ported all the work to support older RHEL versions but that was disliked. I think you are running a real old RHEL. The question is do we want to support these older versions of RedHat or tell people to move to a newer version.

Comment by Arshad Hussain [ 08/Sep/18 ]

Hi James,

I am running a very old CentOS version 7.1 which is effectively RHEL7.1 base. 

# cat /etc/redhat-release
CentOS Linux release 7.1.1503 (Core)
#
 

I did not upgrade my development VM since 2016 as I understand. However, do remember that until last week (10 days ball-park) this used to work just fine.

Thanks
Arshad

Comment by Andreas Dilger [ 08/Sep/18 ]

Hi Arshad, if you need to stick with this kernel, then please submit a patch to fix the build. Otherwise, I would recommend to update to a newer kernel.

Comment by Arshad Hussain [ 08/Sep/18 ]

Hi Andreas, Absolutely, I could not agree more. Before you mentioned it, my "yum update" was already running

Thanks
Arshad

Comment by James A Simmons [ 09/Sep/18 ]

Shall I close as won't fix?

Comment by Peter Jones [ 10/Sep/18 ]

James

Does the list of kernels in the change log   https://git.whamcloud.com/?p=fs/lustre-release.git;a=blob;f=lustre/ChangeLog;h=1fe0c237442334ba191871eb7c00520201b67814;hb=refs/heads/master  reflect reality?

Peter

Comment by Arshad Hussain [ 10/Sep/18 ]

Hi James,

Upgrading to CentOS 7.5 worked for me. I have done a cursory validation and at least the 'make' succeeds. Please go ahead and close.

Thanks
Arshad

# cat /etc/redhat-release
CentOS Linux release 7.5.1804 (Core)
#

# uname -r
3.10.0-862.9.1.el7_lustre.x86_64
#


# cat config.log | grep rhashtable
configure:17215: checking if 'rhashtable_lookup_get_insert_fast' exist
lb_cv_compile_rhashtable_lookup_get_insert_fast=yes
#
Generated at Sat Feb 10 02:43:08 UTC 2024 using Jira 9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c.