Mailing List Archive

3.61 and .62-pre10: extlinux compilation problem on Linux 2.4
make[1]: Entering directory `/home/gzp/src/syslinux-3.62-pre10/extlinux'
gcc -Wp,-MT,extlinux.o,-MMD,.extlinux.o.d -W -Wall -Wno-sign-compare -D_FILE_OFFSET_BITS=64 -g -Os -I. -I.. -I../libinstaller -c -o
extlinux.o extlinux.c
In file included from /usr/include/linux/vfs.h:4,
from /usr/include/linux/fs.h:14,
from extlinux.c:43:
/usr/include/asm/statfs.h:12: error: redefinition of 'struct statfs'
make[1]: *** [extlinux.o] Error 1
make[1]: Leaving directory `/home/gzp/src/syslinux-3.62-pre10/extlinux'
make: *** [all] Error 2

[kernel]
Linux gzp1 2.4.36-gzp1 #1 SMP Wed Jan 2 09:25:29 CET 2008 i686
GNU/Linux

[glibc]
GNU C Library stable release version 2.3.6, by Roland McGrath et al.
Compiled by GNU CC version 4.1.2.
Compiled on a Linux 2.4.34-gzp1 system on 2007-04-04.

[gcc]
gcc (GCC) 4.2.3

[binutils]
GNU ld (Linux/GNU Binutils) 2.18.50.0.4.20080208

_______________________________________________
SYSLINUX mailing list
Submissions to SYSLINUX@zytor.com
Unsubscribe or set options at:
http://www.zytor.com/mailman/listinfo/syslinux
Please do not send private replies to mailing list traffic.
Re: 3.61 and .62-pre10: extlinux compilation problem on Linux 2.4 [ In reply to ]
Gabor Z. Papp wrote:
> make[1]: Entering directory `/home/gzp/src/syslinux-3.62-pre10/extlinux'
> gcc -Wp,-MT,extlinux.o,-MMD,.extlinux.o.d -W -Wall -Wno-sign-compare -D_FILE_OFFSET_BITS=64 -g -Os -I. -I.. -I../libinstaller -c -o
> extlinux.o extlinux.c
> In file included from /usr/include/linux/vfs.h:4,
> from /usr/include/linux/fs.h:14,
> from extlinux.c:43:
> /usr/include/asm/statfs.h:12: error: redefinition of 'struct statfs'
> make[1]: *** [extlinux.o] Error 1
> make[1]: Leaving directory `/home/gzp/src/syslinux-3.62-pre10/extlinux'
> make: *** [all] Error 2
>

The 2.4 kernel headers "leak" the kernel definition of struct statfs,
which differs from glibc's. The 2.4 kernel headers aren't usable as
/usr/include/{linux,asm} for this and other reasons.

-hpa

_______________________________________________
SYSLINUX mailing list
Submissions to SYSLINUX@zytor.com
Unsubscribe or set options at:
http://www.zytor.com/mailman/listinfo/syslinux
Please do not send private replies to mailing list traffic.
Re: 3.61 and .62-pre10: extlinux compilation problem on Linux 2.4 [ In reply to ]
* "H. Peter Anvin" <hpa@zytor.com>:

| > /usr/include/asm/statfs.h:12: error: redefinition of 'struct statfs'
| > make[1]: *** [extlinux.o] Error 1
| > make[1]: Leaving directory `/home/gzp/src/syslinux-3.62-pre10/extlinux'
| > make: *** [all] Error 2

| The 2.4 kernel headers "leak" the kernel definition of struct statfs,
| which differs from glibc's. The 2.4 kernel headers aren't usable as
| /usr/include/{linux,asm} for this and other reasons.

What really does this mean? >=3.61 can be compiled only on 2.4?

_______________________________________________
SYSLINUX mailing list
Submissions to SYSLINUX@zytor.com
Unsubscribe or set options at:
http://www.zytor.com/mailman/listinfo/syslinux
Please do not send private replies to mailing list traffic.
Re: 3.61 and .62-pre10: extlinux compilation problem on Linux 2.4 [ In reply to ]
Gabor Z. Papp wrote:
> * "H. Peter Anvin" <hpa@zytor.com>:
>
> | > /usr/include/asm/statfs.h:12: error: redefinition of 'struct statfs'
> | > make[1]: *** [extlinux.o] Error 1
> | > make[1]: Leaving directory `/home/gzp/src/syslinux-3.62-pre10/extlinux'
> | > make: *** [all] Error 2
>
> | The 2.4 kernel headers "leak" the kernel definition of struct statfs,
> | which differs from glibc's. The 2.4 kernel headers aren't usable as
> | /usr/include/{linux,asm} for this and other reasons.
>
> What really does this mean? >=3.61 can be compiled only on 2.4?
>

No, it means you need working header files... you shouldn't be using
unmodified 2.4 header files as your user-space header files, since the
philosophy in the 2.4 days was "don't use kernel headers in userspace."

Fixing the header files requires removing (of #ifdef __KERNEL__) things
that conflict with userspace, like the kernel-only definition of struct
statfs.

-hpa

_______________________________________________
SYSLINUX mailing list
Submissions to SYSLINUX@zytor.com
Unsubscribe or set options at:
http://www.zytor.com/mailman/listinfo/syslinux
Please do not send private replies to mailing list traffic.