[Badmem-users] cannot compile the kernel
Status: Beta
Brought to you by:
eagle2
|
From: Andreas F. <and...@po...> - 2006-06-08 18:50:22
|
Hello!
Because I have a faulty ram module in my laptop I would really like to
compile a kernel with badmem support. I patched the 2.6.12 kernel and
tried to comile it, but it does not work. When comiling the badmem part
there are some complaints about syntax errors as shown below. I also
tried to comile a 2.6.15 kernel with the same result:
aef@chaos:~/build/linux-2.6.15.7 > nice -19 make-kpkg --initrd kernel_image
<...>
CC mm/shmem.o
gcc -m32 -DKERNELLIB_TEST -o mm/badmemkernellib_version -I
/home/aef/build/badmem/badmemlib/include mm/badmemlib_version.c -lbadmem -lm
BadMEMlib version 1.7.0
$Id: lib.c,v 1.21 2004/03/16 16:20:59 eagle2 Exp $
$Id: hash.c,v 1.7 2004/03/16 13:58:54 eagle2 Exp $
$Id: mdf.c,v 1.15 2004/03/16 13:58:55 eagle2 Exp $
$Id: patn.c,v 1.21 2004/03/16 13:58:55 eagle2 Exp $
$Id: type.c,v 1.6 2001/08/14 15:02:53 eagle2 Exp $
rm -f mm/badmemkernellib_version # This file is not used any more, so
we can delete it
if [ -e /home/aef/build/badmem/configure -a ! -e
/home/aef/build/badmem/Makefile ]; then cd /home/aef/build/badmem;
export CFLAGS=""; export LDFLAGS=""; ./configure ; fi
/usr/bin/make -C /home/aef/build/badmem/badmemlib IN_KERNEL_MODE=1 clean
links
rm -f *.o *~ libbadmem.so.? include/*~ libbadmem.a memtest_badmemlib.o
ln -sf lib.c kernel_lib.c; ln -sf patn.c kernel_patn.c; ln -sf mdf.c
kernel_mdf.c; ln -sf hash.c kernel_hash.c;
ln -sf lib.c memtest_lib.c; ln -sf patn.c memtest_patn.c; ln -sf mdf.c
memtest_mdf.c; ln -sf hash.c memtest_hash.c; ln -sf string.c
memtest_string.c; ln -sf vsprintf.c memtest_vsprintf.c;
/usr/bin/make -C /home/aef/build/badmem/badmemlib IN_KERNEL_MODE=1
kernel_badmemlib.o
gcc -m32 -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs
-fno-strict-aliasing -fno-common -ffreestanding -O2
-fomit-frame-pointer -pipe -msoft-float -mpreferred-stack-boundary=2
-fno-unit-at-a-time -march=i686 -Iinclude/asm-i386/mach-default
-Wdeclaration-after-statement -Wno-pointer-sign
-I/home/aef/build/badmem/badmemlib/include -I./include -D__KERNEL__ -c
-o kernel_lib.o kernel_lib.c
In file included from /usr/include/asm/string.h:8,
from /usr/include/linux/string.h:24,
from kernel_lib.c:4:
/usr/include/asm-i486/string.h:44: error: syntax error before 'size_t'
/usr/include/asm-i486/string.h: In function 'strncpy':
/usr/include/asm-i486/string.h:58: error: 'src' undeclared (first use in
this function)
/usr/include/asm-i486/string.h:58: error: (Each undeclared identifier is
reported only once
/usr/include/asm-i486/string.h:58: error: for each function it appears in.)
/usr/include/asm-i486/string.h:58: error: 'dest' undeclared (first use
in this function)
/usr/include/asm-i486/string.h:58: error: 'count' undeclared (first use
in this function)
/usr/include/asm-i486/string.h: At top level:
/usr/include/asm-i486/string.h:80: error: syntax error before 'size_t'
/usr/include/asm-i486/string.h: In function 'strncat':
/usr/include/asm-i486/string.h:97: error: 'src' undeclared (first use in
this function)
/usr/include/asm-i486/string.h:97: error: 'dest' undeclared (first use
in this function)
/usr/include/asm-i486/string.h:97: error: 'count' undeclared (first use
in this function)
/usr/include/asm-i486/string.h: At top level:
/usr/include/asm-i486/string.h:125: error: syntax error before 'size_t'
/usr/include/asm-i486/string.h: In function 'strncmp':
/usr/include/asm-i486/string.h:143: error: 'cs' undeclared (first use in
this function)
/usr/include/asm-i486/string.h:143: error: 'ct' undeclared (first use in
this function)
/usr/include/asm-i486/string.h:143: error: 'count' undeclared (first use
in this function)
/usr/include/asm-i486/string.h: At top level:
/usr/include/asm-i486/string.h:189: error: syntax error before 'strlen'
/usr/include/asm-i486/string.h:204: error: syntax error before 'size_t'
/usr/include/asm-i486/string.h: In function '__memcpy':
/usr/include/asm-i486/string.h:217: error: 'n' undeclared (first use in
this function)
/usr/include/asm-i486/string.h:217: error: 'to' undeclared (first use in
this function)
/usr/include/asm-i486/string.h:217: error: 'from' undeclared (first use
in this function)
/usr/include/asm-i486/string.h: At top level:
/usr/include/asm-i486/string.h:226: error: syntax error before 'size_t'
/usr/include/asm-i486/string.h: In function '__constant_memcpy':
/usr/include/asm-i486/string.h:229: error: 'n' undeclared (first use in
this function)
/usr/include/asm-i486/string.h:229: error: 'to' undeclared (first use in
this function)
/usr/include/asm-i486/string.h:232: error: 'from' undeclared (first use
in this function)
/usr/include/asm-i486/string.h: At top level:
/usr/include/asm-i486/string.h:327: error: syntax error before 'size_t'
/usr/include/asm-i486/string.h:332: error: syntax error before 'size_t'
/usr/include/asm-i486/string.h: In function 'memchr':
/usr/include/asm-i486/string.h:336: error: 'count' undeclared (first use
in this function)
/usr/include/asm-i486/string.h:345: error: 'c' undeclared (first use in
this function)
/usr/include/asm-i486/string.h:345: error: 'cs' undeclared (first use in
this function)
/usr/include/asm-i486/string.h: At top level:
/usr/include/asm-i486/string.h:350: error: syntax error before 'size_t'
/usr/include/asm-i486/string.h: In function '__memset_generic':
/usr/include/asm-i486/string.h:357: error: 'c' undeclared (first use in
this function)
/usr/include/asm-i486/string.h:357: error: 's' undeclared (first use in
this function)
/usr/include/asm-i486/string.h:357: error: 'count' undeclared (first use
in this function)
/usr/include/asm-i486/string.h: At top level:
/usr/include/asm-i486/string.h:370: error: syntax error before 'size_t'
/usr/include/asm-i486/string.h: In function '__constant_c_memset':
/usr/include/asm-i486/string.h:383: error: 'c' undeclared (first use in
this function)
/usr/include/asm-i486/string.h:383: error: 'count' undeclared (first use
in this function)
/usr/include/asm-i486/string.h:383: error: 's' undeclared (first use in
this function)
/usr/include/asm-i486/string.h: At top level:
/usr/include/asm-i486/string.h:390: error: syntax error before 'strnlen'
/usr/include/asm-i486/string.h:390: error: syntax error before 'size_t'
/usr/include/asm-i486/string.h: In function 'strnlen':
/usr/include/asm-i486/string.h:405: error: 's' undeclared (first use in
this function)
/usr/include/asm-i486/string.h:405: error: 'count' undeclared (first use
in this function)
/usr/include/asm-i486/string.h: At top level:
/usr/include/asm-i486/string.h:419: error: syntax error before 'size_t'
/usr/include/asm-i486/string.h: In function '__constant_c_and_count_memset':
/usr/include/asm-i486/string.h:421: error: 'count' undeclared (first use
in this function)
/usr/include/asm-i486/string.h:423: error: 's' undeclared (first use in
this function)
/usr/include/asm-i486/string.h:425: error: 'pattern' undeclared (first
use in this function)
/usr/include/asm-i486/string.h: At top level:
/usr/include/asm-i486/string.h:478: error: syntax error before 'size_t'
/usr/include/asm-i486/string.h: In function 'memscan':
/usr/include/asm-i486/string.h:480: error: 'size' undeclared (first use
in this function)
/usr/include/asm-i486/string.h:481: error: 'addr' undeclared (first use
in this function)
/usr/include/asm-i486/string.h:487: error: 'c' undeclared (first use in
this function)
/usr/include/asm-i486/string.h:482: error: invalid lvalue in asm output 0
/usr/include/asm-i486/string.h:482: error: invalid lvalue in asm output 1
In file included from kernel_lib.c:4:
/usr/include/linux/string.h: At top level:
/usr/include/linux/string.h:33: error: syntax error before 'strlcpy'
/usr/include/linux/string.h:33: error: syntax error before 'size_t'
/usr/include/linux/string.h:42: error: syntax error before 'strlcat'
/usr/include/linux/string.h:57: error: syntax error before 'size_t'
In file included from kernel_lib.c:5:
/usr/include/linux/kernel.h:104: error: syntax error before 'size_t'
/usr/include/linux/kernel.h:106: error: syntax error before 'size_t'
/usr/include/linux/kernel.h:108: error: syntax error before 'size_t'
/usr/include/linux/kernel.h:110: error: syntax error before 'size_t'
In file included from /usr/include/linux/list.h:7,
from /usr/include/linux/mmzone.h:9,
from /usr/include/linux/gfp.h:4,
from /usr/include/linux/slab.h:15,
from kernel_lib.c:6:
/usr/include/linux/prefetch.h:58: error: syntax error before 'size_t'
/usr/include/linux/prefetch.h: In function 'prefetch_range':
/usr/include/linux/prefetch.h:62: error: 'addr' undeclared (first use in
this function)
/usr/include/linux/prefetch.h:62: error: 'len' undeclared (first use in
this function)
In file included from /usr/include/linux/gfp.h:4,
from /usr/include/linux/slab.h:15,
from kernel_lib.c:6:
/usr/include/linux/mmzone.h: At top level:
/usr/include/linux/mmzone.h:402: error: syntax error before 'size_t'
/usr/include/linux/mmzone.h:405: error: syntax error before 'size_t'
In file included from /usr/include/linux/cpumask.h:82,
from /usr/include/linux/topology.h:30,
from /usr/include/linux/mmzone.h:407,
from /usr/include/linux/gfp.h:4,
from /usr/include/linux/slab.h:15,
from kernel_lib.c:6:
/usr/include/linux/bitmap.h: In function 'bitmap_fill':
/usr/include/linux/bitmap.h:129: error: 'size_t' undeclared (first use
in this function)
/usr/include/linux/bitmap.h:129: error: syntax error before 'nlongs'
/usr/include/linux/bitmap.h:130: error: 'nlongs' undeclared (first use
in this function)
In file included from /usr/include/asm/acpi.h:8,
from /usr/include/asm-i486/fixmap.h:27,
from /usr/include/asm/fixmap.h:8,
from /usr/include/asm-i486/smp.h:16,
from /usr/include/asm/smp.h:8,
from /usr/include/linux/smp.h:19,
from /usr/include/linux/topology.h:33,
from /usr/include/linux/mmzone.h:407,
from /usr/include/linux/gfp.h:4,
from /usr/include/linux/slab.h:15,
from kernel_lib.c:6:
/usr/include/asm-i486/acpi.h:31:28: error: acpi/pdc_intel.h: No such
file or directory
In file included from /usr/include/asm/mpspec.h:8,
from /usr/include/asm-i486/smp.h:18,
from /usr/include/asm/smp.h:8,
from /usr/include/linux/smp.h:19,
from /usr/include/linux/topology.h:33,
from /usr/include/linux/mmzone.h:407,
from /usr/include/linux/gfp.h:4,
from /usr/include/linux/slab.h:15,
from kernel_lib.c:6:
/usr/include/asm-i486/mpspec.h:6:25: error: mach_mpspec.h: No such file
or directory
In file included from /usr/include/asm/mpspec.h:8,
from /usr/include/asm-i486/smp.h:18,
from /usr/include/asm/smp.h:8,
from /usr/include/linux/smp.h:19,
from /usr/include/linux/topology.h:33,
from /usr/include/linux/mmzone.h:407,
from /usr/include/linux/gfp.h:4,
from /usr/include/linux/slab.h:15,
from kernel_lib.c:6:
/usr/include/asm-i486/mpspec.h: At top level:
/usr/include/asm-i486/mpspec.h:8: error: 'MAX_MP_BUSSES' undeclared here
(not in a function)
/usr/include/asm-i486/mpspec.h:22: error: 'MAX_IRQ_SOURCES' undeclared
here (not in a function)
In file included from /usr/include/asm/smp.h:8,
from /usr/include/linux/smp.h:19,
from /usr/include/linux/topology.h:33,
from /usr/include/linux/mmzone.h:407,
from /usr/include/linux/gfp.h:4,
from /usr/include/linux/slab.h:15,
from kernel_lib.c:6:
/usr/include/asm-i486/smp.h:78:26: error: mach_apicdef.h: No such file
or directory
In file included from kernel_lib.c:6:
/usr/include/linux/slab.h:59: error: syntax error before 'size_t'
/usr/include/linux/slab.h:60: error: 'kmem_cache_create' declared as
function returning a function
/usr/include/linux/slab.h:61: error: syntax error before 'void'
/usr/include/linux/slab.h:68: error: syntax error before 'size'
/usr/include/linux/slab.h:72: error: syntax error before 'size_t'
/usr/include/linux/slab.h:75: error: syntax error before '}' token
/usr/include/linux/slab.h:76: error: array type has incomplete element type
/usr/include/linux/slab.h:77: error: syntax error before 'unsigned'
/usr/include/linux/slab.h:79: error: syntax error before 'size'
/usr/include/linux/slab.h: In function 'kmalloc':
/usr/include/linux/slab.h:81: error: 'size' undeclared (first use in
this function)
In file included from kernel_lib.c:6:
/usr/include/linux/slab.h:95: error: 'flags' undeclared (first use in
this function)
/usr/include/linux/slab.h: At top level:
/usr/include/linux/slab.h:102: error: syntax error before 'unsigned'
/usr/include/linux/slab.h:114: error: syntax error before 'size'
/usr/include/linux/slab.h: In function 'kmalloc_node':
/usr/include/linux/slab.h:116: error: 'size' undeclared (first use in
this function)
/usr/include/linux/slab.h:116: error: 'flags' undeclared (first use in
this function)
make[3]: *** [kernel_lib.o] Error 1
make[2]: *** [mm/kernel_badmemlib.o] Error 2
make[1]: *** [mm] Error 2
make[1]: Leaving directory `/home/aef/build/linux-2.6.15.7'
make: *** [debian/stamp-build-kernel] Error 2
thanks for any help,
/Andreas
--
GPG public key:
http://pgpkeys.pca.dfn.de:11371/pks/lookup?op=get&search=0xD40D53E802A2EC0A
|