compile errors
hello please cc me since I'm not a member
all my builds fails with this error
In file included from ../include/swab.h:20,
from ../include/misc.h:12,
from io.c:21:/usr/include/linux/byteorder/swab.h:133: error: syntax error before "__u16" /usr/include/linux/byteorder/swab.h:146: error: syntax error before "__u32" make[1]: *** [io.o] Error 1
make[1]: Leaving directory `/usr/src/sorcery/reiserfsprogs-3.6.13/lib'
make: *** [all-recursive] Error 1
I looked into the source and the line is
static __inline__ __attribute_const__ __u16 __fswab16(__u16 x) {
which don't looks bad ......
thanks
On Sun, 22 Feb 2004 21:31:47 +0100 mjl <[email protected]> wrote:
| hello please cc me since I'm not a member | all my builds fails with this error | | In file included from ../include/swab.h:20, | from ../include/misc.h:12, | from io.c:21: | /usr/include/linux/byteorder/swab.h:133: error: syntax error before "__u16" | /usr/include/linux/byteorder/swab.h:146: error: syntax error before "__u32"
You are using userspace headers for building the kernel. Maybe you have a symbolic link from linux/include/asm to the userspace headers. If so, Don't Do That.
In any case, don't use userspace headers to build the kernel.
| make[1]: *** [io.o] Error 1
| make[1]: Leaving directory `/usr/src/sorcery/reiserfsprogs-3.6.13/lib'
| make: *** [all-recursive] Error 1
|
|
| I looked into the source and the line is
|
|
| static __inline__ __attribute_const__ __u16 __fswab16(__u16 x)
| {
|
|
| which don't looks bad ......--
~Randy
Quoted 10 lines · Randy.Dunlap
On Sun, 22 Feb 2004 21:31:47 +0100 mjl <[email protected]> wrote:
| hello please cc me since I'm not a member | all my builds fails with this error | | In file included from ../include/swab.h:20, | from ../include/misc.h:12, | from io.c:21: | /usr/include/linux/byteorder/swab.h:133: error: syntax error before "__u16" | /usr/include/linux/byteorder/swab.h:146: error: syntax error before "__u32"
Quoted 6 lines
You are using userspace headers for building the kernel. Maybe you have a symbolic link from linux/include/asm to the userspace headers. If so, Don't Do That.
In any case, don't use userspace headers to build the kernel.
the problem is that this is a part of compile log from a userspace program....... I builded the kernel right but can't compile some userspace programs (such as Mplayer, linux-utils.....) the configuration I use :
copy from /usr/src/linux/include/asm to /usr/include/asm
copy from /usr/src/linux/include/asm-generic to /usr/include/asm-generic
copy from /usr/src/linux/include/linux to /usr/include/linux
is this wrong ? I've done this all the time (since 2.4.2 kernel) without problem..... if i'm wrong please correct my behaviour
Quoted 15 lines
| make[1]: *** [io.o] Error 1 | make[1]: Leaving directory `/usr/src/sorcery/reiserfsprogs-3.6.13/lib' | make: *** [all-recursive] Error 1 | | | I looked into the source and the line is | | | static __inline__ __attribute_const__ __u16 __fswab16(__u16 x) | { | | | which don't looks bad ......--
~Randy
Quoted 6 lines · MALET JL
copy from
/usr/src/linux/include/asmto/usr/include/asmcopy from/usr/src/linux/include/asm-genericto/usr/include/asm-genericcopy from/usr/src/linux/include/linuxto/usr/include/linuxis this wrong ? I've done this all the time (since 2.4.2 kernel) without problem..... if i'm wrong please correct my behaviour
You should use the kernel headers to build glibc; and sanitised headers such as RedHat's or http://ep09.pld-linux.org/~mmazur/linux-libc-headers/
to build the rest of the system. Suggest you follow www.linuxfromscratch.org for further details.
Chris
Quoted 13 lines · Chris Lingard
Quoted 8 lines · MALET JL
copy from
/usr/src/linux/include/asmto/usr/include/asmcopy from/usr/src/linux/include/asm-genericto/usr/include/asm-genericcopy from/usr/src/linux/include/linuxto/usr/include/linuxis this wrong ? I've done this all the time (since 2.4.2 kernel) without problem..... if i'm wrong please correct my behaviour
Quoted 7 lines
You should use the kernel headers to build glibc; and sanitised headers
such as RedHat's or http://ep09.pld-linux.org/~mmazur/linux-libc-headers/
to build the rest of the system. Suggest you follow www.linuxfromscratch.org for further details.Chris
O_O! question what is the purpose of having two set of headers? do you think this is good work to provide a unsable set of headers with a software? why not include the RedHat's one then......
Re: [linux 2.6.3] [gcc 3.3.3] compile errors. Now OT
Quoted 3 lines · MALET JL
O_O! question what is the purpose of having two set of headers? do you think this is good work to provide a unsable set of headers with a software? why not include the RedHat's one then......
I think that this is off topic for this list; so I will email you direct, quite soon, with some reasons and links.
Nothing wrong with using RedHat, nice distro; but your question was about building with 2.6.x headers. The functionality of 2.6.x is needed by glibc; but not in user space. How that is achieved is quite difficult.
Chris
Quoted 27 lines · MALET JL
Quoted 11 lines · Randy.Dunlap
On Sun, 22 Feb 2004 21:31:47 +0100 mjl <[email protected]> wrote:
| hello please cc me since I'm not a member | all my builds fails with this error | | In file included from ../include/swab.h:20, | from ../include/misc.h:12, | from io.c:21: | /usr/include/linux/byteorder/swab.h:133: error: syntax error before "__u16" | /usr/include/linux/byteorder/swab.h:146: error: syntax error before "__u32"Quoted 6 lines
You are using userspace headers for building the kernel. Maybe you have a symbolic link from linux/include/asm to the userspace headers. If so, Don't Do That.
In any case, don't use userspace headers to build the kernel.the problem is that this is a part of compile log from a userspace program....... I builded the kernel right but can't compile some userspace programs (such as Mplayer, linux-utils.....)
the configuration I use :
copy from/usr/src/linux/include/asmto/usr/include/asmcopy from/usr/src/linux/include/asm-genericto/usr/include/asm-genericcopy from/usr/src/linux/include/linuxto/usr/include/linux
Quoted 3 lines
is this wrong ? I've done this all the time (since 2.4.2 kernel) without problem..... if i'm wrong please correct my behaviour
Just edit offending files and take out the '__attribute_const__'s - I am guessing you tried to compile cdrtools ... =)
Quoted 21 lines
Quoted 21 lines
| make[1]: *** [io.o] Error 1 | make[1]: Leaving directory `/usr/src/sorcery/reiserfsprogs-3.6.13/lib' | make: *** [all-recursive] Error 1 | | | I looked into the source and the line is | | | static __inline__ __attribute_const__ __u16 __fswab16(__u16 x) | { | | | which don't looks bad ......--
~Randy
Signature · 1 line
Martin Schlemmer