drmP.h is missing in kernel 4.18.0

Issues related to hardware problems
Post Reply
tbeernot
Posts: 3
Joined: 2022/01/21 08:15:52

drmP.h is missing in kernel 4.18.0

Post by tbeernot » 2022/01/21 08:28:29

How is it posible that drmP.h is missing from my /usr/includes/drm?

I'm trying to install CUDA 10.2 for CentOS 8. The installation fails on this error:

Code: Select all

   In file included from /tmp/selfgz21250/NVIDIA-Linux-x86_64-440.33.01/kernel/nvidia-drm/nvidia-drm-drv.c:27:
   /tmp/selfgz21250/NVIDIA-Linux-x86_64-440.33.01/kernel/nvidia-drm/nvidia-drm-fb.h:30:10: fatal error: drm/drmP.h: No such file or directory
    #include <drm/drmP.h>
That file is indeed missing, so the error is correct. The problem is that I cannot seem to be able to install it. It appears drmP.h is supposed to be part of the kernel-devel RPM. I have installed that, but the file is not present. I have listed the content of the RPM and it does find the drm.h, but not the drmP.h.

Code: Select all

# repoquery -l /mnt/BaseOS/Packages/kernel-devel-4.18.0-305.el8.x86_64.rpm | grep 'drmP\.h'
Last metadata expiration check: 1:09:34 ago on Fri 21 Jan 2022 07:26:59 AM CET.

# repoquery -l /mnt/BaseOS/Packages/kernel-devel-4.18.0-305.el8.x86_64.rpm | grep 'drm\.h'
Last metadata expiration check: 1:11:07 ago on Fri 21 Jan 2022 07:26:59 AM CET.
/usr/src/kernels/4.18.0-305.el8.x86_64/include/config/drm.h
/usr/src/kernels/4.18.0-305.el8.x86_64/include/drm/gma_drm.h
/usr/src/kernels/4.18.0-305.el8.x86_64/include/drm/i915_drm.h
/usr/src/kernels/4.18.0-305.el8.x86_64/include/linux/platform_data/shmob_drm.h
/usr/src/kernels/4.18.0-305.el8.x86_64/include/uapi/drm/amdgpu_drm.h
/usr/src/kernels/4.18.0-305.el8.x86_64/include/uapi/drm/armada_drm.h
/usr/src/kernels/4.18.0-305.el8.x86_64/include/uapi/drm/drm.h
...
From what I can gather drmP.h really should be present
https://elixir.bootlin.com/linux/v4.18/ ... nclude/drm

The files in my /usr/include/drm folder are completely different:

Code: Select all

# ls /usr/include/drm/
amdgpu_drm.h  drm.h        etnaviv_drm.h  i915_drm.h  msm_drm.h      panfrost_drm.h  radeon_drm.h  tegra_drm.h  vgem_drm.h     vmwgfx_drm.h
armada_drm.h  drm_mode.h   exynos_drm.h   lima_drm.h  nouveau_drm.h  qxl_drm.h       savage_drm.h  v3d_drm.h    via_drm.h
drm_fourcc.h  drm_sarea.h  i810_drm.h     mga_drm.h   omap_drm.h     r128_drm.h      sis_drm.h     vc4_drm.h    virtgpu_drm.h
Are there different versions of CentOS 8????

User avatar
TrevorH
Site Admin
Posts: 33191
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: drmP.h is missing in kernel 4.18.0

Post by TrevorH » 2022/01/21 08:42:54

A quick google says that drmP.h was removed from the linux kernel in 5.5. I would suspect that that commit has been backported into the CentOS 8 kernel by Red Hat. You'll need to find out how to compile that without it. I also checked in Fedora 34 with kernel 5.15 and it's not present there either.

The way to check it is by running dnf provide '*/drmP.h'
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

tbeernot
Posts: 3
Joined: 2022/01/21 08:15:52

Re: drmP.h is missing in kernel 4.18.0

Post by tbeernot » 2022/01/21 09:10:10

I've found that as well, but there is no indication that this was backported to 4.18.0.

It is present in my version of the kernel
https://elixir.bootlin.com/linux/v4.18/ ... nclude/drm

It indeed is not in 5.5
https://elixir.bootlin.com/linux/v5.5/s ... nclude/drm
Last edited by tbeernot on 2022/01/21 09:41:02, edited 1 time in total.

User avatar
TrevorH
Site Admin
Posts: 33191
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: drmP.h is missing in kernel 4.18.0

Post by TrevorH » 2022/01/21 09:28:44

Red Hat regularly backport fixes and enhancements from more recent kernels into the ones used for the distro. It's not unusual for things from much more recent kernels to appear in what are - according to their version number - much older ones. There are 3347 lines in the output from rpm -q --changelog kernel | grep -i drm so any of those could be responsible.

The file was in the original 8.0 kernel-devel-4.18.0-80.1.2.el8_0.x86_64.rpm which further strengthens the idea that it was removed by a backport.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

tbeernot
Posts: 3
Joined: 2022/01/21 08:15:52

Re: drmP.h is missing in kernel 4.18.0

Post by tbeernot » 2022/01/21 09:42:26

All the evidence seems to support that, yes.

User avatar
TrevorH
Site Admin
Posts: 33191
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: drmP.h is missing in kernel 4.18.0

Post by TrevorH » 2022/01/21 09:44:31

I just googled 'NVIDIA-Linux-x86_64-440.33.01' and it's from 2019. Try a newer version.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

Post Reply