Arch Linux

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#5819 - current/kernel-headers broken for developers

Attached to Project: Arch Linux
Opened by Braun (Tim) - Saturday, 11 November 2006, 18:02 GMT
Last edited by Roman Kyrylych (Romashka) - Saturday, 11 November 2006, 19:10 GMT
Task Type Bug Report
Category Packages: Current
Status Closed
Assigned To Tobias Powalowski (tpowa)
Architecture not specified
Severity High
Priority Normal
Reported Version 0.7.2 Gimmick
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

The current header package isn't really useful for developer
e.g. rdtscll is defined in /usr/include/asm/msr.h but arch deliever a
'striped' version. Bleeding Edge development (e.g. sys_splice, sys_tee) and
so on is also really difficult!

Distribution doesn't cut their developers in this dimension.

e.g. gentoo:

ls -l /usr/include/asm | wc -l
158
ls -l /usr/include/linux | wc -l
718

arch:
ls -l /usr/include/asm | wc -l
40
ls -l /usr/include/linux | wc -l
341

BTW: to add -I/usr/src/linux/include is broken by design!

TIM
This task depends upon

Closed by  Jan de Groot (JGC)
Saturday, 11 November 2006, 22:10 GMT
Reason for closing:  Not a bug
Comment by Jan de Groot (JGC) - Saturday, 11 November 2006, 19:35 GMT
The headers in kernel-headers are sanitized headers meant for userspace. Putting raw kernel headers, like gentoo does, in /usr/include is a no-go. If you want to do in-kernel development, you have to use the real kernelheaders, not the sanitized headers from /usr/include.
Comment by Roman Kyrylych (Romashka) - Saturday, 11 November 2006, 19:40 GMT
I think this will also fix problems with compiling UML.
Comment by Braun (Tim) - Saturday, 11 November 2006, 21:27 GMT
There are no conclusive arguments NOT to to use raw kernel headers.
Problematic areas are protected with __KERNEL__ - if someone realize problem than
is this an kernel issue!

But to shrink the kernel-headers make archlinux unusable for developers who interact
with the kernel just a little bit more.

BTW: to use the raw-kernel headers is an no-go: libc is linked against the current
version of arch-headers.

TIM
Comment by Jan de Groot (JGC) - Saturday, 11 November 2006, 22:04 GMT
things defined in __KERNEL__ are useless in userspace, that's what the kernel developers say, so they stop you from using it from userspace by removing it when you export the userspace kernelheaders. If you need stuff that is inside __KERNEL__, then two things could be wrong:

1. You're not developing a userspace application but kernelspace, go use raw kernelheaders
2. The part the userspace kernelheader needs should not be inside __KERNEL__ but should be exported to userspace

When compiling an application that isn't running in kernelspace, you should never ever compile with -D__KERNEL__. If your app has to use that define, your application isn't a userspace application and should not use the headers in /usr/include.

Loading...