Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 25483

Summary: kernel 2.6 : gcc 3.3 : glibc-2.3.2 compile error in sysctl.h
Product: Gentoo Linux Reporter: Boyd Waters <waters.boyd>
Component: [OLD] Core systemAssignee: x86-kernel (DEPRECATED) <x86-kernel>
Status: RESOLVED DUPLICATE    
Severity: normal    
Priority: High    
Version: 1.4_rc4   
Hardware: x86   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Boyd Waters 2003-07-28 23:43:22 UTC
Compilation of glibc-2.3.2-r3 fails with a parse error at sysctl.h

Ah yes... "__user" is confusing it.

We need to include <linux/compiler.h>

(This files is included by linux/kernel.h, but then kernel.h is masked with an
IFDEF __KERNEL__)

So in file /usr/src/linux/include/linux/sysctl.h:
 add the line "#include <linux/compiler.h>"
  after the line "#include <linux/kernel.h>"
Comment 1 SpanKY gentoo-dev 2003-07-29 17:27:03 UTC
this can be found in a few places ... 
 
this patch has been submitted to the kernel people but their answer was 'dont 
use kernel headers in user space' ... 
 
in other words, i dont know if we should really do this :x 
Comment 2 Martin Holzer (RETIRED) gentoo-dev 2003-07-30 06:16:55 UTC
Use the new kernel test : 2.6.0-test2
Comment 3 Boyd Waters 2003-07-30 18:38:35 UTC
"Don't use kernel headers in user space"

Wonderful. Now if we could just get everyone in the world to comply...

... and things like glibc *need* these headers. That's "user space". What then?

I am in the process of developing a set of "sanitized" headers from the kernel headers. I can use the new -test2 kernel sources, but there will still be errors in compiling things here and there. (I have bugs posted regarding X and some other packages.) In general these errors are very simple tweaks to the kernel headers.

But note that I generally do *not* tweak the headers in /usr/src/linux, but rather the headers in /usr/include. Someone has to do this to get us away from kernel headers from 2.4.19 in /usr/include. Some tweaking is necessary.

Glibc is a special case. It needs the headers from the running kernel. Linus Torvalds says that the stuff in /usr/include should be the headers from the kernel used to build glibc. So some tweaking to the kernel headers to make sure that glibc can compile is probably a pragmatic thing. Reporting to the glibc maintainers is a good thing, too.

Bottom line: The kernel maintainers need to work with the glibc maintainers to get these two to compile.
Comment 4 Boyd Waters 2003-08-12 13:25:52 UTC
The new ebuild contains a hack^H^H^H^H work-around that fixes this bug.

See http://bugs.gentoo.org/show_bug.cgi?id=21326

I suggest marking this bug as duplicate of that one.
Comment 5 Tim Yamin (RETIRED) gentoo-dev 2003-08-30 16:24:02 UTC

*** This bug has been marked as a duplicate of 21326 ***