Open gaurang-lakesidetrading opened 4 weeks ago
Hi @gaurang-lakesidetrading, as you are using a supported release of Onload (as opposed to the latest commit in this repo) I suggest you e-mail support-nic@amd.com and let them know whether you experience this issue with the equivalent Cent OS Stream version, please? Our releases are tested against Red Hat Enterprise Linux but there could be some global configuration difference in the Alma build leading to unexpected compiler version and default option combinations.
Steps:
1) Download source code and extract
2) Attempt to build
cd /root/onload-8.1.3.40/scripts
./onload_install
onload_install: Building Onload.
Build tree made for linux as x86_64_linux-5.14.0-427.16.1.el9_4.x86_64
make: Entering directory '/root/onload-8.1.3.40/build/x86_64_linux-5.14.0-427.16.1.el9_4.x86_64'
/root/onload-8.1.3.40/src/driver/linux_resource/kernel_compat.sh -k /lib/modules/5.14.0-427.16.1.el9_4.x86_64/build -q > driver/linux_resource/autocompat.h
kernel_compat.sh: Kernel build tree is unable to build modules
make: *** [/root/onload-8.1.3.40/src/mmake.mk:34: driver/linux_resource/autocompat.h] Error 1
make: Leaving directory '/root/onload-8.1.3.40/build/x86_64_linux-5.14.0-427.16.1.el9_4.x86_64'
onload_build: ERROR: Failed to build driver components.
onload_install: ERROR: Build failed. Not installing.
Attempted to run the script with verbose setting, and it's complaining about the gcc -mharden-sls=all
/root/onload-8.1.3.40/src/driver/linux_resource/kernel_compat.sh -v
kernel_compat.sh: MAKEFLAGS :=
tried to compile:
#include <linux/module.h>
MODULE_LICENSE("GPL");
compiler output:
make: Entering directory '/usr/src/kernels/5.14.0-427.16.1.el9_4.x86_64'
CC [M] /tmp/tmp.dEviQFFfYu/test.o
gcc: error: unrecognized command-line option ‘-mharden-sls=all’
make[1]: *** [scripts/Makefile.build:299: /tmp/tmp.dEviQFFfYu/test.o] Error 1
make: *** [Makefile:1934: /tmp/tmp.dEviQFFfYu] Error 2
make: Leaving directory '/usr/src/kernels/5.14.0-427.16.1.el9_4.x86_64'
kernel_compat.sh: Kernel build tree is unable to build modules
This is my version of gcc
gcc --version
gcc (GCC) 11.2.0
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Based on https://github.com/Xilinx-CNS/onload/issues/209, I also tried
unset CC; CC=/usr/local/bin/gcc; ./onload_install
and
unset CC; ./onload_install
to no effect. I'm not sure where the gcc harden-sls flag is even coming from.