Hendrik Groeneveld
2005-Jan-12 03:47 UTC
[syslinux] syslinux build fails with 2.6 linux headers
As the subject says, building syslinux fails when built against 2.6.8.1
kernel headers. Anybody out there have a patch? The compile errors are
below.
set -e ; for i in memdisk dos win32 mtools unix extlinux sample com32 ; do make
DATE=0x41e470ae HEXDATE=0x41e470ae -C $i all ; done
make[1]: Entering directory `/usr/src/syslinux-3.07-pre1/memdisk'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/usr/src/syslinux-3.07-pre1/memdisk'
make[1]: Entering directory `/usr/src/syslinux-3.07-pre1/dos'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/usr/src/syslinux-3.07-pre1/dos'
make[1]: Entering directory `/usr/src/syslinux-3.07-pre1/win32'
rm -f syslinux.exe
make[1]: Leaving directory `/usr/src/syslinux-3.07-pre1/win32'
make[1]: Entering directory `/usr/src/syslinux-3.07-pre1/mtools'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/usr/src/syslinux-3.07-pre1/mtools'
make[1]: Entering directory `/usr/src/syslinux-3.07-pre1/unix'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/usr/src/syslinux-3.07-pre1/unix'
make[1]: Entering directory `/usr/src/syslinux-3.07-pre1/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../libfat -c -o extlinux.o extlinux.c
In file included from /usr/include/linux/blockgroup_lock.h:10,
from /usr/include/linux/ext2_fs_sb.h:19,
from /usr/include/linux/ext2_fs.h:20,
from extlinux.c:39:
/usr/include/linux/spinlock.h: In function `bit_spin_lock':
/usr/include/linux/spinlock.h:415: error: invalid type argument of `->'
/usr/include/linux/spinlock.h: In function `bit_spin_trylock':
/usr/include/linux/spinlock.h:432: error: invalid type argument of `->'
/usr/include/linux/spinlock.h:435: error: invalid type argument of `->'
/usr/include/linux/spinlock.h:435: error: `TIF_NEED_RESCHED' undeclared
(first use in this function)
/usr/include/linux/spinlock.h:435: error: (Each undeclared identifier is
reported only once
/usr/include/linux/spinlock.h:435: error: for each function it appears in.)
/usr/include/linux/spinlock.h: In function `bit_spin_unlock':
/usr/include/linux/spinlock.h:453: error: invalid type argument of `->'
/usr/include/linux/spinlock.h:453: error: `TIF_NEED_RESCHED' undeclared
(first use in this function)
In file included from /usr/include/linux/cpumask.h:77,
from /usr/include/asm/smp.h:11,
from /usr/include/linux/smp.h:17,
from /usr/include/linux/percpu_counter.h:11,
from /usr/include/linux/ext2_fs_sb.h:20,
from /usr/include/linux/ext2_fs.h:20,
from extlinux.c:39:
/usr/include/linux/bitmap.h: In function `bitmap_zero':
/usr/include/linux/bitmap.h:110: error: `BITS_PER_LONG' undeclared (first
use in this function)
/usr/include/linux/bitmap.h: In function `bitmap_fill':
/usr/include/linux/bitmap.h:125: error: `BITS_PER_LONG' undeclared (first
use in this function)
/usr/include/linux/bitmap.h: In function `bitmap_copy':
/usr/include/linux/bitmap.h:131: error: `BITS_PER_LONG' undeclared (first
use in this function)
/usr/include/linux/bitmap.h: In function `bitmap_and':
/usr/include/linux/bitmap.h:142: error: `BITS_PER_LONG' undeclared (first
use in this function)
/usr/include/linux/bitmap.h: In function `bitmap_or':
/usr/include/linux/bitmap.h:151: error: `BITS_PER_LONG' undeclared (first
use in this function)
/usr/include/linux/bitmap.h: In function `bitmap_xor':
/usr/include/linux/bitmap.h:160: error: `BITS_PER_LONG' undeclared (first
use in this function)
/usr/include/linux/bitmap.h: In function `bitmap_andnot':
/usr/include/linux/bitmap.h:169: error: `BITS_PER_LONG' undeclared (first
use in this function)
/usr/include/linux/bitmap.h: In function `bitmap_complement':
/usr/include/linux/bitmap.h:178: error: `BITS_PER_LONG' undeclared (first
use in this function)
/usr/include/linux/bitmap.h: In function `bitmap_equal':
/usr/include/linux/bitmap.h:187: error: `BITS_PER_LONG' undeclared (first
use in this function)
/usr/include/linux/bitmap.h: In function `bitmap_intersects':
/usr/include/linux/bitmap.h:196: error: `BITS_PER_LONG' undeclared (first
use in this function)
/usr/include/linux/bitmap.h: In function `bitmap_subset':
/usr/include/linux/bitmap.h:205: error: `BITS_PER_LONG' undeclared (first
use in this function)
/usr/include/linux/bitmap.h: In function `bitmap_empty':
/usr/include/linux/bitmap.h:213: error: `BITS_PER_LONG' undeclared (first
use in this function)
/usr/include/linux/bitmap.h: In function `bitmap_full':
/usr/include/linux/bitmap.h:221: error: `BITS_PER_LONG' undeclared (first
use in this function)
/usr/include/linux/bitmap.h: In function `bitmap_shift_right':
/usr/include/linux/bitmap.h:235: error: `BITS_PER_LONG' undeclared (first
use in this function)
/usr/include/linux/bitmap.h: In function `bitmap_shift_left':
/usr/include/linux/bitmap.h:244: error: `BITS_PER_LONG' undeclared (first
use in this function)
In file included from /usr/include/asm/smp.h:11,
from /usr/include/linux/smp.h:17,
from /usr/include/linux/percpu_counter.h:11,
from /usr/include/linux/ext2_fs_sb.h:20,
from /usr/include/linux/ext2_fs.h:20,
from extlinux.c:39:
/usr/include/linux/cpumask.h: At top level:
/usr/include/linux/cpumask.h:80: error: parse error before
"DECLARE_BITMAP"
/usr/include/linux/cpumask.h:81: error: parse error before
"_unused_cpumask_arg_"
/usr/include/linux/cpumask.h:84: error: parse error before '*' token
/usr/include/linux/cpumask.h: In function `__cpu_set':
/usr/include/linux/cpumask.h:86: error: `cpu' undeclared (first use in this
function)
/usr/include/linux/cpumask.h:86: error: `dstp' undeclared (first use in this
function)
/usr/include/linux/cpumask.h: At top level:
/usr/include/linux/cpumask.h:90: error: parse error before '*' token
/usr/include/linux/cpumask.h: In function `__cpu_clear':
/usr/include/linux/cpumask.h:92: error: `cpu' undeclared (first use in this
function)
/usr/include/linux/cpumask.h:92: error: `dstp' undeclared (first use in this
function)
/usr/include/linux/cpumask.h: At top level:
/usr/include/linux/cpumask.h:96: error: parse error before '*' token
/usr/include/linux/cpumask.h: In function `__cpus_setall':
/usr/include/linux/cpumask.h:98: error: `dstp' undeclared (first use in this
function)
/usr/include/linux/cpumask.h:98: error: `nbits' undeclared (first use in
this function)
/usr/include/linux/cpumask.h: At top level:
/usr/include/linux/cpumask.h:102: error: parse error before '*' token
/usr/include/linux/cpumask.h: In function `__cpus_clear':
/usr/include/linux/cpumask.h:104: error: `dstp' undeclared (first use in
this function)
/usr/include/linux/cpumask.h:104: error: `nbits' undeclared (first use in
this function)
/usr/include/linux/cpumask.h: At top level:
/usr/include/linux/cpumask.h:111: error: parse error before
"cpumask_t"
/usr/include/linux/cpumask.h: In function `__cpu_test_and_set':
/usr/include/linux/cpumask.h:113: error: `cpu' undeclared (first use in this
function)
/usr/include/linux/cpumask.h:113: error: `addr' undeclared (first use in
this function)
/usr/include/linux/cpumask.h: At top level:
/usr/include/linux/cpumask.h:117: error: parse error before '*' token
/usr/include/linux/cpumask.h: In function `__cpus_and':
/usr/include/linux/cpumask.h:120: error: `dstp' undeclared (first use in
this function)
/usr/include/linux/cpumask.h:120: error: `src1p' undeclared (first use in
this function)
/usr/include/linux/cpumask.h:120: error: `src2p' undeclared (first use in
this function)
/usr/include/linux/cpumask.h:120: error: `nbits' undeclared (first use in
this function)
/usr/include/linux/cpumask.h: At top level:
/usr/include/linux/cpumask.h:124: error: parse error before '*' token
/usr/include/linux/cpumask.h: In function `__cpus_or':
/usr/include/linux/cpumask.h:127: error: `dstp' undeclared (first use in
this function)
/usr/include/linux/cpumask.h:127: error: `src1p' undeclared (first use in
this function)
/usr/include/linux/cpumask.h:127: error: `src2p' undeclared (first use in
this function)
/usr/include/linux/cpumask.h:127: error: `nbits' undeclared (first use in
this function)
/usr/include/linux/cpumask.h: At top level:
/usr/include/linux/cpumask.h:131: error: parse error before '*' token
/usr/include/linux/cpumask.h: In function `__cpus_xor':
/usr/include/linux/cpumask.h:134: error: `dstp' undeclared (first use in
this function)
/usr/include/linux/cpumask.h:134: error: `src1p' undeclared (first use in
this function)
/usr/include/linux/cpumask.h:134: error: `src2p' undeclared (first use in
this function)
/usr/include/linux/cpumask.h:134: error: `nbits' undeclared (first use in
this function)
/usr/include/linux/cpumask.h: At top level:
/usr/include/linux/cpumask.h:139: error: parse error before '*' token
/usr/include/linux/cpumask.h: In function `__cpus_andnot':
/usr/include/linux/cpumask.h:142: error: `dstp' undeclared (first use in
this function)
/usr/include/linux/cpumask.h:142: error: `src1p' undeclared (first use in
this function)
/usr/include/linux/cpumask.h:142: error: `src2p' undeclared (first use in
this function)
/usr/include/linux/cpumask.h:142: error: `nbits' undeclared (first use in
this function)
/usr/include/linux/cpumask.h: At top level:
/usr/include/linux/cpumask.h:146: error: parse error before '*' token
/usr/include/linux/cpumask.h: In function `__cpus_complement':
/usr/include/linux/cpumask.h:149: error: `dstp' undeclared (first use in
this function)
/usr/include/linux/cpumask.h:149: error: `srcp' undeclared (first use in
this function)
/usr/include/linux/cpumask.h:149: error: `nbits' undeclared (first use in
this function)
/usr/include/linux/cpumask.h: At top level:
/usr/include/linux/cpumask.h:153: error: parse error before '*' token
/usr/include/linux/cpumask.h: In function `__cpus_equal':
/usr/include/linux/cpumask.h:156: error: `src1p' undeclared (first use in
this function)
/usr/include/linux/cpumask.h:156: error: `src2p' undeclared (first use in
this function)
/usr/include/linux/cpumask.h:156: error: `nbits' undeclared (first use in
this function)
/usr/include/linux/cpumask.h: At top level:
/usr/include/linux/cpumask.h:160: error: parse error before '*' token
/usr/include/linux/cpumask.h: In function `__cpus_intersects':
/usr/include/linux/cpumask.h:163: error: `src1p' undeclared (first use in
this function)
/usr/include/linux/cpumask.h:163: error: `src2p' undeclared (first use in
this function)
/usr/include/linux/cpumask.h:163: error: `nbits' undeclared (first use in
this function)
/usr/include/linux/cpumask.h: At top level:
/usr/include/linux/cpumask.h:167: error: parse error before '*' token
/usr/include/linux/cpumask.h: In function `__cpus_subset':
/usr/include/linux/cpumask.h:170: error: `src1p' undeclared (first use in
this function)
/usr/include/linux/cpumask.h:170: error: `src2p' undeclared (first use in
this function)
/usr/include/linux/cpumask.h:170: error: `nbits' undeclared (first use in
this function)
/usr/include/linux/cpumask.h: At top level:
/usr/include/linux/cpumask.h:174: error: parse error before '*' token
/usr/include/linux/cpumask.h: In function `__cpus_empty':
/usr/include/linux/cpumask.h:176: error: `srcp' undeclared (first use in
this function)
/usr/include/linux/cpumask.h:176: error: `nbits' undeclared (first use in
this function)
/usr/include/linux/cpumask.h: At top level:
/usr/include/linux/cpumask.h:180: error: parse error before '*' token
/usr/include/linux/cpumask.h: In function `__cpus_full':
/usr/include/linux/cpumask.h:182: error: `srcp' undeclared (first use in
this function)
/usr/include/linux/cpumask.h:182: error: `nbits' undeclared (first use in
this function)
/usr/include/linux/cpumask.h: At top level:
/usr/include/linux/cpumask.h:186: error: parse error before '*' token
/usr/include/linux/cpumask.h: In function `__cpus_weight':
/usr/include/linux/cpumask.h:188: error: `srcp' undeclared (first use in
this function)
/usr/include/linux/cpumask.h:188: error: `nbits' undeclared (first use in
this function)
/usr/include/linux/cpumask.h: At top level:
/usr/include/linux/cpumask.h:193: error: parse error before '*' token
/usr/include/linux/cpumask.h: In function `__cpus_shift_right':
/usr/include/linux/cpumask.h:196: error: `dstp' undeclared (first use in
this function)
/usr/include/linux/cpumask.h:196: error: `srcp' undeclared (first use in
this function)
/usr/include/linux/cpumask.h:196: error: `n' undeclared (first use in this
function)
/usr/include/linux/cpumask.h:196: error: `nbits' undeclared (first use in
this function)
/usr/include/linux/cpumask.h: At top level:
/usr/include/linux/cpumask.h:201: error: parse error before '*' token
/usr/include/linux/cpumask.h: In function `__cpus_shift_left':
/usr/include/linux/cpumask.h:204: error: `dstp' undeclared (first use in
this function)
/usr/include/linux/cpumask.h:204: error: `srcp' undeclared (first use in
this function)
/usr/include/linux/cpumask.h:204: error: `n' undeclared (first use in this
function)
/usr/include/linux/cpumask.h:204: error: `nbits' undeclared (first use in
this function)
/usr/include/linux/cpumask.h: At top level:
/usr/include/linux/cpumask.h:208: error: parse error before '*' token
/usr/include/linux/cpumask.h: In function `__first_cpu':
/usr/include/linux/cpumask.h:210: error: `srcp' undeclared (first use in
this function)
/usr/include/linux/cpumask.h:210: error: `nbits' undeclared (first use in
this function)
/usr/include/linux/cpumask.h: At top level:
/usr/include/linux/cpumask.h:214: error: parse error before '*' token
/usr/include/linux/cpumask.h: In function `__next_cpu':
/usr/include/linux/cpumask.h:216: error: `srcp' undeclared (first use in
this function)
/usr/include/linux/cpumask.h:216: error: `nbits' undeclared (first use in
this function)
/usr/include/linux/cpumask.h:216: error: `n' undeclared (first use in this
function)
/usr/include/linux/cpumask.h: At top level:
/usr/include/linux/cpumask.h:265: error: parse error before '*' token
/usr/include/linux/cpumask.h: In function `__cpumask_scnprintf':
/usr/include/linux/cpumask.h:267: error: `buf' undeclared (first use in this
function)
/usr/include/linux/cpumask.h:267: error: `len' undeclared (first use in this
function)
/usr/include/linux/cpumask.h:267: error: `srcp' undeclared (first use in
this function)
/usr/include/linux/cpumask.h:267: error: `nbits' undeclared (first use in
this function)
/usr/include/linux/cpumask.h: At top level:
/usr/include/linux/cpumask.h:273: error: parse error before
"cpumask_t"
/usr/include/linux/cpumask.h: In function `__cpumask_parse':
/usr/include/linux/cpumask.h:275: error: `buf' undeclared (first use in this
function)
/usr/include/linux/cpumask.h:275: error: `len' undeclared (first use in this
function)
/usr/include/linux/cpumask.h:275: error: `dstp' undeclared (first use in
this function)
/usr/include/linux/cpumask.h:275: error: `nbits' undeclared (first use in
this function)
/usr/include/linux/cpumask.h: At top level:
/usr/include/linux/cpumask.h:343: error: parse error before
"cpu_possible_map"
/usr/include/linux/cpumask.h:344: error: parse error before
"cpu_online_map"
/usr/include/linux/cpumask.h:345: error: parse error before
"cpu_present_map"
In file included from /usr/include/asm/smp.h:16,
from /usr/include/linux/smp.h:17,
from /usr/include/linux/percpu_counter.h:11,
from /usr/include/linux/ext2_fs_sb.h:20,
from /usr/include/linux/ext2_fs.h:20,
from extlinux.c:39:
/usr/include/asm/fixmap.h:72: error: `FIX_ACPI_PAGES' undeclared here (not
in a function)
/usr/include/asm/fixmap.h:72: error: enumerator value for `FIX_ACPI_END' not
integer constant
/usr/include/asm/fixmap.h:87: error: parse error before "pgprot_t"
In file included from /usr/include/asm/smp.h:18,
from /usr/include/linux/smp.h:17,
from /usr/include/linux/percpu_counter.h:11,
from /usr/include/linux/ext2_fs_sb.h:20,
from /usr/include/linux/ext2_fs.h:20,
from extlinux.c:39:
/usr/include/asm/mpspec.h:8: error: `MAX_MP_BUSSES' undeclared here (not in
a function)
/usr/include/asm/mpspec.h:22: error: `MAX_IRQ_SOURCES' undeclared here (not
in a function)
/usr/include/asm/mpspec.h:31: error: parse error before "id"
/usr/include/asm/mpspec.h:33: error: parse error before "id"
/usr/include/asm/mpspec.h:34: error: parse error before "bus_irq"
/usr/include/asm/mpspec.h:36: error: parse error before "gsi"
/usr/include/asm/mpspec.h:43: error: variable-size type declared outside of any
function
In file included from /usr/include/asm/smp.h:20,
from /usr/include/linux/smp.h:17,
from /usr/include/linux/percpu_counter.h:11,
from /usr/include/linux/ext2_fs_sb.h:20,
from /usr/include/linux/ext2_fs.h:20,
from extlinux.c:39:
/usr/include/asm/io_apic.h:66: error: parse error before "u32"
/usr/include/asm/io_apic.h:68: error: parse error before "u32"
/usr/include/asm/io_apic.h:74: error: parse error before '}' token
/usr/include/asm/io_apic.h:77: error: parse error before "u32"
/usr/include/asm/io_apic.h:79: error: parse error before "u32"
/usr/include/asm/io_apic.h:85: error: parse error before '}' token
/usr/include/asm/io_apic.h:88: error: parse error before "u32"
/usr/include/asm/io_apic.h:90: error: parse error before "u32"
/usr/include/asm/io_apic.h:94: error: parse error before '}' token
/usr/include/asm/io_apic.h:97: error: parse error before "u32"
/usr/include/asm/io_apic.h:99: error: parse error before "u32"
/usr/include/asm/io_apic.h:102: error: parse error before '}' token
In file included from /usr/include/linux/smp.h:17,
from /usr/include/linux/percpu_counter.h:11,
from /usr/include/linux/ext2_fs_sb.h:20,
from /usr/include/linux/ext2_fs.h:20,
from extlinux.c:39:
/usr/include/asm/smp.h:37: error: parse error before "cpu_sibling_map"
/usr/include/asm/smp.h:54: error: parse error before "cpu_callout_map"
In file included from /usr/include/linux/percpu_counter.h:11,
from /usr/include/linux/ext2_fs_sb.h:20,
from /usr/include/linux/ext2_fs.h:20,
from extlinux.c:39:
/usr/include/linux/smp.h: In function `on_each_cpu':
/usr/include/linux/smp.h:65: error: invalid type argument of `->'
/usr/include/linux/smp.h:68: error: invalid type argument of `->'
/usr/include/linux/smp.h:68: error: `TIF_NEED_RESCHED' undeclared (first use
in this function)
In file included from /usr/include/linux/ext2_fs.h:20,
from extlinux.c:39:
/usr/include/linux/ext2_fs_sb.h: At top level:
/usr/include/linux/ext2_fs_sb.h:49: error: parse error before "u32"
/usr/include/linux/ext2_fs_sb.h:51: error: parse error before '*' token
/usr/include/linux/ext2_fs_sb.h:56: error: parse error before '}' token
/usr/include/asm/smp.h:37: warning: array 'cpu_sibling_map' assumed to
have one element
make[1]: *** [extlinux.o] Error 1
make[1]: Leaving directory `/usr/src/syslinux-3.07-pre1/extlinux'
make: *** [all] Error 2
H. Peter Anvin
2005-Jan-12 05:24 UTC
[syslinux] syslinux build fails with 2.6 linux headers
Hendrik Groeneveld wrote:> As the subject says, building syslinux fails when built against 2.6.8.1 > kernel headers. Anybody out there have a patch? The compile errors are > below.Looks like <linux/ext2_fs.h> includes <linux/ext2_fs_sb.h> without __KERNEL__; so it needs an #ifdef __KERNEL__ somewhere. -hpa
Hendrik Groeneveld
2005-Jan-12 06:45 UTC
[syslinux] syslinux build fails with 2.6 linux headers
On Tue, 11 Jan 2005, H. Peter Anvin wrote:> Hendrik Groeneveld wrote: > > As the subject says, building syslinux fails when built against 2.6.8.1 > > kernel headers. Anybody out there have a patch? The compile errors are > > below. > > Looks like <linux/ext2_fs.h> includes <linux/ext2_fs_sb.h> without > __KERNEL__; so it needs an #ifdef __KERNEL__ somewhere. > > -hpaI tried defining __KERNEL__ (a bad idea, I know) which eliminated some of the errors. This seemed to leave another incomplete definition that required inclusion of an arch dependent header. And yes, I would consider this to be a kernel bug, but realistically it needs to be fixed in syslinux (and the kernel where necessary). The world is not going to stay with 2.4 just for the sake of syslinux. I would have hoped that the kernel maintainers would have made a greater effort to maintain compatibility since syslinux is a required utility for building floppy images in 2.6 but this does not seem to be the case :-( -hg
H. Peter Anvin
2005-Jan-12 09:03 UTC
[syslinux] syslinux build fails with 2.6 linux headers
Hendrik Groeneveld wrote:>> >>Don't use the kernel headers, or better, submit a patch to the 2.6 >>kernel maintainers. 2.6 isn't going to stand still, either. > > > The kernel headers seem to be required... >Actually, the linux-libc-headers seem to be required. I'd like the kernel headers to work too, so please send a bug report/patch.> >>However, "the world" isn't using the kernel headers raw out of the >>kernel, which is deprecated. Most people use the linux-kernel-headers >>adapted for glibc: >> >>http://ep09.pld-linux.org/~mmazur/linux-libc-headers/ >> > Where is it written that using the headers that were used to build glibc > (and all the other libraries/programs that use the kernel headers) is > depreciated? To use anything else, IMHO, is a disaster waiting to happen! >Well, I actually happen to agree, but Linus doesn't. The linux-libc-headers is now the approved substitute for kernel headers in userspace. -hpa