Summary: | x11-base/xorg-x11-6.8.2-r4 compile error | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Thomas Cort (RETIRED) <tcort> |
Component: | Current packages | Assignee: | Tim Yamin (RETIRED) <plasmaroo> |
Status: | RESOLVED FIXED | ||
Severity: | major | CC: | alpha, gtg602c, x11 |
Priority: | High | ||
Version: | unspecified | ||
Hardware: | Alpha | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | |||
Bug Blocks: | 115705 |
Description
Thomas Cort (RETIRED)
![]() This looks like a linux-headers problem on alpha. Alpha team, have you seen this before? All of the syntax errors in bitops.h are because linux-headers uses inline functions and xorg uses the -ansi CFLAG. "C++, C99, and GNU C each have support for inline functions, although 1990 ANSI C, the dialect of C most commonly used in practice, does not." [1] I created a simple program[2] with an inline function. It compiles without -ansi and gives that informative "error: syntax error" when I use -ansi. I tried xorg-x11-6.8.2-r6 and linux-headers-2.6.11-r3, and I got the same syntax errors. Anyone have ideas on a possible fix for this? [1] http://en.wikipedia.org/wiki/Inline_function#Language_support [2] http://cs.ubishops.ca/~tcort/inline.c I looked into this further and found that the exact problem with linux-headers is asm-alpha/compiler.h. You see asm-alpha/bitops.h includes asm-alpha/compiler.h which includes linux/compiler.h which contains a macro that #define's inline as __inline__ if gcc >= 3.1. asm-alpha/compiler.h #undef's inline which causes the compile error on the inline functions. This is because gcc's -ansi flag (used by Xorg) works with __inline__ functions, not inline functions. This isn't a problem for i386 because inline is #undef'ed in asm-alpha/compiler.h. i386 doesn't have an asm-i386/compiler.h, it just includes linux/compiler.h. I hope that wasn't too confusing. I'll be e-mailing <a href="http://lkml.org/">LKML</a> to see if they can fix this header issue. Before e-mailing the LKML I tried the latest headers from linux-2.6.15-rc5-git3 and they solved the problem. Thank you for looking into that Thomas. This means we need to have sys-kernel/linux-headers bumped, correct? > This means we need to have sys-kernel/linux-headers bumped, correct?
Yes that is correct. linux-headers-2.6.11-r3, the latest linux-headers in
portage, does not include the fix.
> sys-kernel/linux-headers bump
I looked through the kernel changelogs and sources and I believe it should be
fixed in 2.6.14.
You're handy ;) Plasmaroo, I believe this is your bag. Please try sed -i -e 's/ inline / __inline__ /g' /usr/include/asm/bitops.h /usr/include/linux/bitops.h /usr/include/linux/wait.h - should hopefully fix the issue. > Please try sed -i -e 's/ inline / __inline__ /g' /usr/include/asm/bitops.h
> /usr/include/linux/bitops.h /usr/include/linux/wait.h - should hopefully fix
> the issue.
It worked, thanks!
Fixed in 2.6.11-r4; thanks! *** Bug 117668 has been marked as a duplicate of this bug. *** |