You are not logged in.

#1 2022-07-23 21:28:28

bobbyboy5069
Member
Registered: 2022-07-23
Posts: 3

DRM kernel headers are removed in favor of libdrm's headers

I noticed that in the "linux-api-headers", the kernel DRM headers are removed:

# use headers from libdrm
rm -r "$pkgdir/usr/include/drm"

I tried running diff on some of these headers, and they mostly seem the same. Libdrm's headers either have some code missing or have code that isn't present in the kernel DRM headers.
LFS and Gentoo don't do this, but Slackware does and they also don't give a clear explanation:

# You won't want these files. The ones in libdrm work better.
rm -rf drm

This snippet is from the kernel-headers Slackbuild.

Can someone explain why Arch and Slackware do this? What is the difference between these headers?

Offline

#2 2022-07-24 12:33:46

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 10,262

Re: DRM kernel headers are removed in favor of libdrm's headers

A possible reason :

# toolchain build order: linux-api-headers->glibc->binutils->gcc->glibc->binutils->gcc

That comment higher up in the archlinux linx-api-headers PKGBUILD indicates linux-api-headers is part of the toolchain.
Updating the toolchain is a lot of work for devs, has a huge potential for breaking stuff  and is not done very often.

Updating & testing libdrm is easy and a matter of minutes and happens a lot more often then toolchain rebuilds.

Welcome to archlinux forums

Last edited by Lone_Wolf (2022-07-24 12:34:33)


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.
Did you use the guided installer ? If yes, I can't help you.

(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#3 2022-07-25 18:31:38

bobbyboy5069
Member
Registered: 2022-07-23
Posts: 3

Re: DRM kernel headers are removed in favor of libdrm's headers

That makes sense, but I still don't understand the difference between the headers. Are the kernel headers the same as the ones in libdrm but get updated less frequently? Is libdrm a fork?

Offline

#4 2022-07-26 11:46:34

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 10,262

Re: DRM kernel headers are removed in favor of libdrm's headers

https://gitlab.freedesktop.org/mesa/drm … drm/README has some more info, but doesn't explain why these headers exist in libfrm code.

I looked at the history for linux-api-headers and found the removal of drm headers already happened when it was first packaged under that name in 2010 .
https://github.com/archlinux/svntogit-p … 42d6e2f370

I noticed the headers from libdrm are installed under /usr/include/libdrm , while those in linux-api-headers are removed from /usr/include/drm

Do LFS & Gentoo have both sets of headers or do they remove the libdrm ones from their libdrm build ?


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.
Did you use the guided installer ? If yes, I can't help you.

(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#5 2022-07-27 13:22:34

bobbyboy5069
Member
Registered: 2022-07-23
Posts: 3

Re: DRM kernel headers are removed in favor of libdrm's headers

Gentoo keeps both sets as far as I can tell, I can't read ebuilds that well yet but both the kernel-headers and libdrm ebuilds don't mention anything about removing DRM-related headers.
The kernel headers and libdrm are part of LFS and BLFS respectively, but libdrm doesn't mention the kernel headers at all.

Offline

Board footer

Powered by FluxBB