C76 with 4.18.0-348.23.1.1.ga8e8b87.el7.1.x86_64 install MLNX_OFED_LINUX-5.4-1.0.3.0 faied

  1. perl mlnxofedinstall --ovs-dpdk --upstream-libs --add-kernel-support# perl mlnxofedinstall --ovs-dpdk --upstream-libs --add-kernel-supportNote: This program will create MLNX_OFED_LINUX TGZ for rhel7.6 under /tmp/MLNX_OFED_LINUX-5.4-1.0.3.0-4.18.0-348.23.1.1.ga8e8b87.el7.1.x86_64 directory.See log file /tmp/MLNX_OFED_LINUX-5.4-1.0.3.0-4.18.0-348.23.1.1.ga8e8b87.el7.1.x86_64/mlnx_iso.31610_logs/mlnx_ofed_iso.31610.log
    Checking if all needed packages are installed…Building MLNX_OFED_LINUX RPMS . Please wait…
    ERROR: Failed executing "MLNX_OFED_SRC-5.4-1.0.3.0/install.pl --tmpdir /tmp/MLNX_OFED_LINUX-5.4-1.0.3.0-4.18.0-348.23.1.1.ga8e8b87.el7.1.x86_64/mlnx_iso.31610_logs --kernel-only --kernel 4.18.0-348.23.1.1.ga8e8b87.el7.1.x86_64 --kernel-sources /lib/modules/4.18.0-348.23.1.1.ga8e8b87.el7.1.x86_64/build --builddir /tmp/MLNX_OFED_LINUX-5.4-1.0.3.0-4.18.0-348.23.1.1.ga8e8b87.el7.1.x86_64/mlnx_iso.31610 --disable-kmp --build-only --distro rhel7.6"ERROR: See /tmp/MLNX_OFED_LINUX-5.4-1.0.3.0-4.18.0-348.23.1.1.ga8e8b87.el7.1.x86_64/mlnx_iso.31610_logs/mlnx_ofed_iso.31610.logFailed to build MLNX_OFED_LINUX for 4.18.0-348.23.1.1.ga8e8b87.el7.1.x86_64

configure:5445: checking if Linux was built with CONFIG_XEN
configure:5469: cp conftest.c build && env CROSS_COMPILE= make -d modules LD=ld CC=gcc -f /tmp/MLNX_OFED_LINUX-5.4-1.0.3.0-4.18.0-348.23.1.1.ga8e8b87.el7.1.x86_64/mlnx_iso.11168/OFED_topdir/BUILD/mlnx-ofa_kernel-5.4/source/compat/build/Makefile MLNX_LINUX_CONFIG=/usr/src/kernels/4.18.0-348.23.1.1.ga8e8b87.el7.1.x86_64/.config LINUXINCLUDE=-include generated/autoconf.h -I/usr/src/kernels/4.18.0-348.23.1.1.ga8e8b87.el7.1.x86_64/arch/x86/include -Iarch/x86/include/generated -Iinclude -I/usr/src/kernels/4.18.0-348.23.1.1.ga8e8b87.el7.1.x86_64/arch/x86/include/uapi -Iarch/x86/include/generated/uapi -I/usr/src/kernels/4.18.0-348.23.1.1.ga8e8b87.el7.1.x86_64/include -I/usr/src/kernels/4.18.0-348.23.1.1.ga8e8b87.el7.1.x86_64/include/uapi -Iinclude/generated/uapi -I/usr/src/kernels/4.18.0-348.23.1.1.ga8e8b87.el7.1.x86_64/arch/x86/include -Iarch/x86/include/generated -I/usr/src/kernels/4.18.0-348.23.1.1.ga8e8b87.el7.1.x86_64/arch/x86/include -I/usr/src/kernels/4.18.0-348.23.1.1.ga8e8b87.el7.1.x86_64/arch/x86/include/generated -I/usr/src/kernels/4.18.0-348.23.1.1.ga8e8b87.el7.1.x86_64/include -I/usr/src/kernels/4.18.0-348.23.1.1.ga8e8b87.el7.1.x86_64/include -I/usr/src/kernels/4.18.0-348.23.1.1.ga8e8b87.el7.1.x86_64/include2 -include /usr/src/kernels/4.18.0-348.23.1.1.ga8e8b87.el7.1.x86_64/include/linux/kconfig.h -o tmp_include_depends -o scripts -o include/config/MARKER -C /usr/src/kernels/4.18.0-348.23.1.1.ga8e8b87.el7.1.x86_64 EXTRA_CFLAGS=-Werror-implicit-function-declaration -Wno-unused-variable -Wno-uninitialized CROSS_COMPILE= M=/tmp/MLNX_OFED_LINUX-5.4-1.0.3.0-4.18.0-348.23.1.1.ga8e8b87.el7.1.x86_64/mlnx_iso.11168/OFED_topdir/BUILD/mlnx-ofa_kernel-5.4/source/compat/build >/dev/null 2>build/output.log; [ 0 -ne 0 ] && cat build/output.log 1>&2 && false || config/warning_filter.sh build/output.log
In file included from ././include/linux/compiler_types.h:58:0,
from :0:
include/linux/compiler-gcc.h:329:5: warning: “__has_attribute” is not defined [-Wundef]
#if __has_attribute(no_sanitize_address)
^
include/linux/compiler-gcc.h:329:20: error: missing binary operator before token “(”
#if __has_attribute(no_sanitize_address)
^
include/linux/compiler-gcc.h:335:52: error: missing binary operator before token “(”
#if defined(SANITIZE_THREAD) && __has_attribute(no_sanitize_thread)

Hi,

The default kernel version of CentOS 7.6 is 3.10.0-957 (CentOS - Wikipedia).

The kernel version “4.18.0-348.23.1.1.ga8e8b87.el7.1.x86_64” which you are using is newer kernel and seems like a customzied one.

Here are my suggestions:

  1. Upgrade gcc version to the latest version and try to “mlnxofedinstall --ovs-dpdk --upstream-libs --add-kernel-support --skip-distro-check”.

  2. Please try to downgrade the kernel version to the default version 3.10.0-957 ?

  3. Please try to use a newer version CenOS 8.6(or higher) which using the default 4.18.0-xxx kernel version?

Longran Wei
Nvidia Support Team