How to solve this insert error(auxiliary: exports duplicate symbol) while kernel has auxiliary?

When I insert my ofed ko building by myself, I meet following error:

auxiliary: exports duplicate symbol __auxiliary_device_add (owned by kernel)


my kernel version: 4.18.0-553.22.1.0.1
my kernel config about AUXILIARY_BUS:
image

Hello @SeekerV,

Thank you for posting your query on our community.

The officially supported default kernel version for RHEL/Rocky 8.10 is 4.18.0-553.el8_10.x86_64, as listed in the MLNX_OFED v24.10-0.7.0.0 release notes.

If you wish to install the drivers for kernel version 4.18.0-553.22.1.0.1, we recommend using the --add-kernel-support flag during driver installation.

It looks like you are attempting to compile the OFED drivers from source and from the screenshot you shared, I noticed that you are working with a custom kernel version: 4.18.0-553.22.1.0.1.an8.x86_64. Please note that debugging issues on custom kernels falls outside the scope of our support.

Thanks,
Bhargavi