Stddef.h file is missing on driver installation

Hello,

I’m trying to install drivers for my 4x Tesla K10 gpu’s on Fedora 35.

I’m using the NVIDIA Software Installer for Unix/Linux:
NVIDIA-Linux-x86_64-460.106.00.run with the following command:

./NVIDIA-Linux-x86_64-460.106.00.run  --kernel-source-path /usr/src/kernels/$(uname -r) --ui=none

I have installed “Development Tools”.

dnf groupinstall "Development Tools" "Development Libraries"

The problem is that the installer can’t find the header file: stddef.h

But the file is definitely on my system:

$> locate 'stddef.h'
/usr/include/boost/asio/detail/cstddef.hpp
/usr/include/linux/stddef.h
/usr/lib/gcc/x86_64-redhat-linux/11/include/stddef.h
/usr/lib64/clang/13.0.0/include/stddef.h
/usr/share/man/man0p/stddef.h.0p.gz
/usr/src/kernels/5.17.5-200.fc35.x86_64/include/linux/stddef.h // <--- HERE it is.
/usr/src/kernels/5.17.5-200.fc35.x86_64/include/uapi/linux/stddef.h

One part of the error message:

In file included from /tmp/selfgz232716/NVIDIA-Linux-x86_64-460.106.00/kernel/nvidia/nv-frontend.c:11:
/tmp/selfgz232716/NVIDIA-Linux-x86_64-460.106.00/kernel/common/inc/nv-misc.h:20:12: fatal error: stddef.h: No such file or directory
20 | include <stddef.h> // NULL

I have included the full log:

nvidia-driver-installation_log.txt (121.1 KB)

What can I do?

In the meanwhile I was able to install the right driver for the Nvidia Tesla K10 under Fedora35.

It helped me to use the following commands and to look into the log messages:

dmesg # Can help to figure out what went wrong when the driver was loaded, but it was maybe the wrong version
lsmod | egrep 'VGA|3D|NVIDIA|GPU|video|nouveau|nvidia' # nouveau should not be inside

I removed all nvidia packages:

sudo dnf remove \*nvidia\*

Install the RPM-Fusion sources:

sudo dnf install   https://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm
sudo dnf install https://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm
dnf repolist | grep rpmfusion

I created the file with this content:

vi /etc/modprobe.d/nvidia-installer-disable-nouveau.conf

Content of the file nvidia-installer-disable-nouveau.conf:

blacklist nouveau
options nouveau modeset=0

dnf update -y 
# Install the right driver for Tesla K10 under Fedora35:
dnf install xorg-x11-drv-nvidia-470xx dnf install xorg-x11-drv-nvidia-470xx-*
#  Install the right driver for Tesla M2070 under Fedora 35:
dnf install xorg-x11-drv-nvidia-390xx xorg-x11-drv-nvidia-390xx-*
modprobe -r nouveau # remove
modprobe nvidia # install

Make sure you have the following entry in your grub file:

vi /etc/default/grub

GRUB_CMDLINE_LINUX=“rd.driver.blacklist=nouveau modprobe.blacklist=nouveau nvidia-drm.modeset=1 rd.lvm.lv=fedora_4xteslak10/00 rhgb quiet rd.driver.blacklist=nouveau modprobe.blacklist=nouveau nvidia-drm.modeset=1”

These entries are important in the grub file:

… rd.driver.blacklist=nouveau modprobe.blacklist=nouveau nvidia-drm.modeset=1 …

dracut /boot/initramfs-$(uname -r).img $(uname -r) --force # be careful!
reboot

I really hope this helps someone to save time!

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.