I failed to build MLNX_OFED_LINUX for 5.4.0-70-generic.

I tried to install MLNX_OFED on two machines, one with ubuntu 20.04.01 and Kernel 5.4.0-66-generic x86_64, the other with ubuntu 20.04.01 and Kernel 5.4.0-70-generic x86_64. I succeeded on the first one but failed the second.

Details:

$ sudo ./mlnxofedinstall --without-dkms --add-kernel-support --with-nvmf --force --without-fw-update

Note: This program will create MLNX_OFED_LINUX TGZ for ubuntu20.04 under /tmp/MLNX_OFED_LINUX-5.3-1.0.0.1-5.4.0-70-generic directory.

See log file /tmp/MLNX_OFED_LINUX-5.3-1.0.0.1-5.4.0-70-generic/mlnx_iso.55884_logs/mlnx_ofed_iso.55884.log

Checking if all needed packages are installed…

Building MLNX_OFED_LINUX DEBS . Please wait…

ERROR: Failed executing “MLNX_OFED_SRC-5.3-1.0.0.1/install.pl --tmpdir /tmp/MLNX_OFED_LINUX-5.3-1.0.0.1-5.4.0-70-generic/mlnx_iso.55884_logs --kernel-only --kernel 5.4.0-70-generic --kernel-sources /lib/modules/5.4.0-70-generic/build --builddir /tmp/MLNX_OFED_LINUX-5.3-1.0.0.1-5.4.0-70-generic/mlnx_iso.55884 --without-dkms --force --without-debug-symbols --build-only --distro ubuntu20.04”

ERROR: See /tmp/MLNX_OFED_LINUX-5.3-1.0.0.1-5.4.0-70-generic/mlnx_iso.55884_logs/mlnx_ofed_iso.55884.log

Failed to build MLNX_OFED_LINUX for 5.4.0-70-generic

And the log:

Logs dir: /tmp/MLNX_OFED_LINUX-5.3-1.0.0.1-5.4.0-70-generic/mlnx_iso.51899_logs/OFED.52096.logs

General log file: /tmp/MLNX_OFED_LINUX-5.3-1.0.0.1-5.4.0-70-generic/mlnx_iso.51899_logs/OFED.52096.logs/general.log

Below is the list of OFED packages that you have chosen

(some may have been added by the installer due to package dependencies):

ofed-scripts

mlnx-ofed-kernel-utils

mlnx-ofed-kernel-modules

iser-modules

isert-modules

srp-modules

mlnx-nfsrdma-modules

mlnx-nvme-modules

kernel-mft-modules

knem-modules

Checking SW Requirements…

One or more required packages for installing OFED-internal are missing.

Attempting to install the following missing packages:

build-essential python3-distutils make pkg-config debhelper dh-autoreconf bzip2 quilt gcc

This program will install the OFED package on your machine.

Note that all other Mellanox, OEM, OFED, RDMA or Distribution IB packages will be removed.

Those packages are removed due to conflicts with OFED, do not reinstall them.

Installing new packages

Building DEB for ofed-scripts-5.3 (ofed-scripts)…

Running /usr/bin/dpkg-buildpackage -us -uc

Building DEB for mlnx-ofed-kernel-utils-5.3 (mlnx-ofed-kernel)…

-W- --with-mlx5-ipsec is enabled

Running /usr/bin/dpkg-buildpackage -us -uc

Failed to build mlnx-ofed-kernel DEB

Collecting debug info…

See /tmp/MLNX_OFED_LINUX-5.3-1.0.0.1-5.4.0-70-generic/mlnx_iso.51899_logs/OFED.52096.logs/mlnx-ofed-kernel.debbuild.log

Is there any possibility that MLNX_OFED_LINUX-5.3-1.0.0.1 is not compatible with kernel 5.4.0-70-generic?

Please help!

Hello Jin,

Thank you for posting your inquiry on the NVIDIA Networking Community.

Based on the information provided, we are not able to reproduce the issue in our lab.

MLNX_OFED driver 5.3 install successfully on kernel 5.4.0-70

As you are running Ubuntu 20.04, recommended is to make use of DKMS which is enabled by default in the OS.

Our install log with the syntax used to install the driver:

# ./mlnxofedinstall -vvv --with-nvmf --force --without-fw-update

Distro was not provided, trying to auto-detect the current distro…

Auto-detected ubuntu20.04 distro.

set_cfg: name: ar-mgr, version: 1.0, debpath: /var/tmp/MLNX_OFED_LINUX-5.3-1.0.0.1-ubuntu20.04-x86_64/DEBS/ar-mgr_1.0-5.8.2.MLNX20210321.g58d33bf.53100_amd64.deb

Logs dir: /tmp/MLNX_OFED_LINUX.10284.logs

General log file: /tmp/MLNX_OFED_LINUX.10284.logs/general.log

Below is the list of MLNX_OFED_LINUX packages that you have chosen

(some may have been added by the installer due to package dependencies):

ofed-scripts

mlnx-ofed-kernel-utils

mlnx-ofed-kernel-dkms

iser-dkms

isert-dkms

srp-dkms

mlnx-nvme-dkms

rdma-core

libibverbs1

ibverbs-utils

ibverbs-providers

libibverbs-dev

libibverbs1-dbg

libibumad3

libibumad-dev

ibacm

librdmacm1

rdmacm-utils

librdmacm-dev

mstflint

ibdump

libibmad5

libibmad-dev

libopensm

opensm

opensm-doc

libopensm-devel

libibnetdisc5

infiniband-diags

mft

kernel-mft-dkms

perftest

ibutils2

ar-mgr

dump-pr

ibsim

ibsim-doc

ucx

sharp

hcoll

knem-dkms

knem

openmpi

mpitests

libdapl2

dapl2-utils

libdapl-dev

dpcp

srptools

mlnx-ethtool

mlnx-iproute2

rshim

This program will install the MLNX_OFED_LINUX package on your machine.

Note that all other Mellanox, OEM, OFED, RDMA or Distribution IB packages will be removed.

Those packages are removed due to conflicts with MLNX_OFED_LINUX, do not reinstall them.

Checking SW Requirements…

Running /usr/bin/dpkg -i --force-confmiss /var/tmp/MLNX_OFED_LINUX-5.3-1.0.0.1-ubuntu20.04-x86_64/DEBS/rshim_2.0.5-10.g0ae03b4.53100_amd64.deb

Running: FW_UPDATE_FLAGS=‘–log /tmp/MLNX_OFED_LINUX.10284.logs/fw_update.log -v --tmpdir /tmp’ RUN_FW_UPDATER=‘no’ /usr/bin/dpkg -i /var/tmp/MLNX_OFED_LINUX-5.3-1.0.0.1-ubuntu20.04-x86_64/DEBS/mlnx-fw-updater_5.3-1.0.0.1_amd64.deb

Selecting previously unselected package mlnx-fw-updater.

(Reading database … 118653 files and directories currently installed.)

Preparing to unpack …/mlnx-fw-updater_5.3-1.0.0.1_amd64.deb …

Unpacking mlnx-fw-updater (5.3-1.0.0.1) …

Setting up mlnx-fw-updater (5.3-1.0.0.1) …

Added 'RUN_FW_UPDATER_ONBOOT=no to /etc/infiniband/openib.conf

Skipping FW update.

Running: /usr/bin/dpkg-deb -x /var/tmp/MLNX_OFED_LINUX-5.3-1.0.0.1-ubuntu20.04-x86_64/DEBS/mlnx-ofed-kernel-dkms_5.3-OFED.5.3.1.0.0.1_all.deb /var/tmp/mlnx-ofed-kernel_module-check 2>/dev/null

is_module_in_deb: ipoib is in /var/tmp/MLNX_OFED_LINUX-5.3-1.0.0.1-ubuntu20.04-x86_64/DEBS/mlnx-ofed-kernel-dkms_5.3-OFED.5.3.1.0.0.1_all.deb

Installation passed successfully

To load the new driver, run:

/etc/init.d/openibd restart

Note: In order to load the new nvme-rdma and nvmet-rdma modules, the nvme module must be reloaded.

root@lx-u200401:/var/tmp/MLNX_OFED_LINUX-5.3-1.0.0.1-ubuntu20.04-x86_64#

Thank you and regards,

~NVIDIA Networking Technical Support

Hi Martijn! Thank you so much for your reply! I tried again and still failed and below is my detailed log. Please help me.

And here is log of make.

I’ve installed the lsb-core as the above file pointed, but now the mlnx-ofed-kernel-dkms still cannot be installed.

Thank you. It turns out that someone in my group changed gcc to another edition, after changing it back to the original one, OFED is now installed. ​