当前位置: 技术问答>linux和unix
编译内核时报错:/home/linux-2.6.16/kernel/gcov/gcov-core.c:144: syntax error before "gcov_version"
来源: 互联网 发布时间:2015-12-02
本文导语: 操作系统是红旗4.1 ,原内核是2.4.26-1,编译的是2.6.16. 完整报错信息如下: [root@localhost linux-2.6.16]# make bzImage CHK include/linux/version.h UPD include/linux/version.h SYMLINK include/asm -> include/asm-i386 SPLIT...
操作系统是红旗4.1 ,原内核是2.4.26-1,编译的是2.6.16.
完整报错信息如下:
[root@localhost linux-2.6.16]# make bzImage
CHK include/linux/version.h
UPD include/linux/version.h
SYMLINK include/asm -> include/asm-i386
SPLIT include/linux/autoconf.h -> include/config/*
CC arch/i386/kernel/asm-offsets.s
GEN include/asm-i386/asm-offsets.h
HOSTCC scripts/genksyms/genksyms.o
SHIPPED scripts/genksyms/lex.c
SHIPPED scripts/genksyms/parse.h
SHIPPED scripts/genksyms/keywords.c
HOSTCC scripts/genksyms/lex.o
SHIPPED scripts/genksyms/parse.c
HOSTCC scripts/genksyms/parse.o
HOSTLD scripts/genksyms/genksyms
CC scripts/mod/empty.o
HOSTCC scripts/mod/mk_elfconfig
MKELF scripts/mod/elfconfig.h
HOSTCC scripts/mod/file2alias.o
HOSTCC scripts/mod/modpost.o
HOSTCC scripts/mod/sumversion.o
HOSTLD scripts/mod/modpost
HOSTCC scripts/kallsyms
HOSTCC scripts/conmakehash
CC init/main.o
CHK include/linux/compile.h
UPD include/linux/compile.h
CC init/version.o
CC init/do_mounts.o
CC init/do_mounts_rd.o
CC init/do_mounts_initrd.o
CC init/do_mounts_md.o
LD init/mounts.o
CC init/initramfs.o
CC init/calibrate.o
LD init/built-in.o
HOSTCC usr/gen_init_cpio
CHK usr/initramfs_list
UPD usr/initramfs_list
CPIO usr/initramfs_data.cpio
GZIP usr/initramfs_data.cpio.gz
AS usr/initramfs_data.o
LD usr/built-in.o
CC arch/i386/kernel/process.o
CC arch/i386/kernel/semaphore.o
CC arch/i386/kernel/signal.o
AS arch/i386/kernel/entry.o
CC arch/i386/kernel/traps.o
CC arch/i386/kernel/irq.o
CC arch/i386/kernel/ptrace.o
CC arch/i386/kernel/time.o
CC arch/i386/kernel/ioport.o
CC arch/i386/kernel/ldt.o
CC arch/i386/kernel/setup.o
CC arch/i386/kernel/i8259.o
CC arch/i386/kernel/sys_i386.o
CC arch/i386/kernel/pci-dma.o
CC arch/i386/kernel/i386_ksyms.o
CC arch/i386/kernel/i387.o
CC arch/i386/kernel/dmi_scan.o
CC arch/i386/kernel/bootflag.o
CC arch/i386/kernel/quirks.o
CC arch/i386/kernel/i8237.o
CC arch/i386/kernel/topology.o
CC arch/i386/kernel/acpi/boot.o
CC arch/i386/kernel/acpi/sleep.o
AS arch/i386/kernel/acpi/wakeup.o
CC arch/i386/kernel/acpi/cstate.o
CC arch/i386/kernel/acpi/processor.o
LD arch/i386/kernel/acpi/built-in.o
CC arch/i386/kernel/cpu/common.o
CC arch/i386/kernel/cpu/proc.o
CC arch/i386/kernel/cpu/amd.o
CC arch/i386/kernel/cpu/cyrix.o
CC arch/i386/kernel/cpu/centaur.o
CC arch/i386/kernel/cpu/transmeta.o
CC arch/i386/kernel/cpu/intel.o
CC arch/i386/kernel/cpu/intel_cacheinfo.o
CC arch/i386/kernel/cpu/rise.o
CC arch/i386/kernel/cpu/nexgen.o
CC arch/i386/kernel/cpu/umc.o
CC arch/i386/kernel/cpu/mcheck/mce.o
CC arch/i386/kernel/cpu/mcheck/k7.o
CC arch/i386/kernel/cpu/mcheck/p4.o
CC arch/i386/kernel/cpu/mcheck/p5.o
CC arch/i386/kernel/cpu/mcheck/p6.o
CC arch/i386/kernel/cpu/mcheck/winchip.o
LD arch/i386/kernel/cpu/mcheck/built-in.o
CC arch/i386/kernel/cpu/mtrr/main.o
CC arch/i386/kernel/cpu/mtrr/if.o
CC arch/i386/kernel/cpu/mtrr/generic.o
CC arch/i386/kernel/cpu/mtrr/state.o
CC arch/i386/kernel/cpu/mtrr/amd.o
CC arch/i386/kernel/cpu/mtrr/cyrix.o
CC arch/i386/kernel/cpu/mtrr/centaur.o
LD arch/i386/kernel/cpu/mtrr/built-in.o
LD arch/i386/kernel/cpu/built-in.o
CC arch/i386/kernel/timers/timer.o
CC arch/i386/kernel/timers/timer_none.o
CC arch/i386/kernel/timers/timer_tsc.o
CC arch/i386/kernel/timers/timer_pit.o
CC arch/i386/kernel/timers/common.o
CC arch/i386/kernel/timers/timer_pm.o
LD arch/i386/kernel/timers/built-in.o
CC arch/i386/kernel/reboot.o
CC arch/i386/kernel/apm.o
/home/linux-2.6.16/arch/i386/kernel/apm.c: In function `suspend':
/home/linux-2.6.16/arch/i386/kernel/apm.c:1195: warning: `pm_send_all' is deprecated (declared at /home/linux-2.6.16/include/linux/pm_legacy.h:31)
/home/linux-2.6.16/arch/i386/kernel/apm.c:1249: warning: `pm_send_all' is deprecated (declared at /home/linux-2.6.16/include/linux/pm_legacy.h:31)
/home/linux-2.6.16/arch/i386/kernel/apm.c: In function `check_events':
/home/linux-2.6.16/arch/i386/kernel/apm.c:1370: warning: `pm_send_all' is deprecated (declared at /home/linux-2.6.16/include/linux/pm_legacy.h:31)
CC arch/i386/kernel/module.o
CC arch/i386/kernel/sysenter.o
LDS arch/i386/kernel/vsyscall.lds
AS arch/i386/kernel/vsyscall-int80.o
AS arch/i386/kernel/vsyscall-note.o
SYSCALL arch/i386/kernel/vsyscall-int80.so
AS arch/i386/kernel/vsyscall-sysenter.o
SYSCALL arch/i386/kernel/vsyscall-sysenter.so
AS arch/i386/kernel/vsyscall.o
CC arch/i386/kernel/doublefault.o
CC arch/i386/kernel/vm86.o
CC arch/i386/kernel/early_printk.o
SYSCALL arch/i386/kernel/vsyscall-syms.o
LD arch/i386/kernel/built-in.o
AS arch/i386/kernel/head.o
CC arch/i386/kernel/init_task.o
LDS arch/i386/kernel/vmlinux.lds
CC arch/i386/mm/init.o
CC arch/i386/mm/pgtable.o
CC arch/i386/mm/fault.o
CC arch/i386/mm/ioremap.o
CC arch/i386/mm/extable.o
CC arch/i386/mm/pageattr.o
CC arch/i386/mm/mmap.o
CC arch/i386/mm/highmem.o
LD arch/i386/mm/built-in.o
CC arch/i386/mach-default/setup.o
LD arch/i386/mach-default/built-in.o
LD arch/i386/crypto/built-in.o
CC kernel/sched.o
CC kernel/fork.o
CC kernel/exec_domain.o
CC kernel/panic.o
CC kernel/printk.o
CC kernel/profile.o
CC kernel/exit.o
CC kernel/itimer.o
CC kernel/time.o
CC kernel/softirq.o
CC kernel/resource.o
CC kernel/sysctl.o
CC kernel/capability.o
CC kernel/ptrace.o
CC kernel/timer.o
CC kernel/user.o
CC kernel/signal.o
CC kernel/sys.o
CC kernel/kmod.o
CC kernel/workqueue.o
CC kernel/pid.o
CC kernel/rcupdate.o
CC kernel/extable.o
CC kernel/params.o
CC kernel/posix-timers.o
CC kernel/kthread.o
CC kernel/wait.o
CC kernel/kfifo.o
CC kernel/sys_ni.o
CC kernel/posix-cpu-timers.o
CC kernel/mutex.o
CC kernel/hrtimer.o
CC kernel/mutex-debug.o
CC kernel/futex.o
CC kernel/dma.o
CC kernel/uid16.o
CC kernel/module.o
CC kernel/kallsyms.o
CC kernel/gcov/gcov-core.o
/home/linux-2.6.16/kernel/gcov/gcov-core.c:144: syntax error before "gcov_version"
/home/linux-2.6.16/kernel/gcov/gcov-core.c:144: warning: type defaults to `int'in declaration of `gcov_version'
/home/linux-2.6.16/kernel/gcov/gcov-core.c:144: warning: data definition has notype or storage class
/home/linux-2.6.16/kernel/gcov/gcov-core.c: In function `__gcov_init':
/home/linux-2.6.16/kernel/gcov/gcov-core.c:151: structure has no member named `version'
/home/linux-2.6.16/kernel/gcov/gcov-core.c:155: structure has no member named `version'
/home/linux-2.6.16/kernel/gcov/gcov-core.c:156: structure has no member named `version'
/home/linux-2.6.16/kernel/gcov/gcov-core.c:162: structure has no member named `version'
make[2]: *** [kernel/gcov/gcov-core.o] Error 1
make[1]: *** [kernel/gcov] Error 2
make: *** [kernel] Error 2
[root@localhost linux-2.6.16]#
完整报错信息如下:
[root@localhost linux-2.6.16]# make bzImage
CHK include/linux/version.h
UPD include/linux/version.h
SYMLINK include/asm -> include/asm-i386
SPLIT include/linux/autoconf.h -> include/config/*
CC arch/i386/kernel/asm-offsets.s
GEN include/asm-i386/asm-offsets.h
HOSTCC scripts/genksyms/genksyms.o
SHIPPED scripts/genksyms/lex.c
SHIPPED scripts/genksyms/parse.h
SHIPPED scripts/genksyms/keywords.c
HOSTCC scripts/genksyms/lex.o
SHIPPED scripts/genksyms/parse.c
HOSTCC scripts/genksyms/parse.o
HOSTLD scripts/genksyms/genksyms
CC scripts/mod/empty.o
HOSTCC scripts/mod/mk_elfconfig
MKELF scripts/mod/elfconfig.h
HOSTCC scripts/mod/file2alias.o
HOSTCC scripts/mod/modpost.o
HOSTCC scripts/mod/sumversion.o
HOSTLD scripts/mod/modpost
HOSTCC scripts/kallsyms
HOSTCC scripts/conmakehash
CC init/main.o
CHK include/linux/compile.h
UPD include/linux/compile.h
CC init/version.o
CC init/do_mounts.o
CC init/do_mounts_rd.o
CC init/do_mounts_initrd.o
CC init/do_mounts_md.o
LD init/mounts.o
CC init/initramfs.o
CC init/calibrate.o
LD init/built-in.o
HOSTCC usr/gen_init_cpio
CHK usr/initramfs_list
UPD usr/initramfs_list
CPIO usr/initramfs_data.cpio
GZIP usr/initramfs_data.cpio.gz
AS usr/initramfs_data.o
LD usr/built-in.o
CC arch/i386/kernel/process.o
CC arch/i386/kernel/semaphore.o
CC arch/i386/kernel/signal.o
AS arch/i386/kernel/entry.o
CC arch/i386/kernel/traps.o
CC arch/i386/kernel/irq.o
CC arch/i386/kernel/ptrace.o
CC arch/i386/kernel/time.o
CC arch/i386/kernel/ioport.o
CC arch/i386/kernel/ldt.o
CC arch/i386/kernel/setup.o
CC arch/i386/kernel/i8259.o
CC arch/i386/kernel/sys_i386.o
CC arch/i386/kernel/pci-dma.o
CC arch/i386/kernel/i386_ksyms.o
CC arch/i386/kernel/i387.o
CC arch/i386/kernel/dmi_scan.o
CC arch/i386/kernel/bootflag.o
CC arch/i386/kernel/quirks.o
CC arch/i386/kernel/i8237.o
CC arch/i386/kernel/topology.o
CC arch/i386/kernel/acpi/boot.o
CC arch/i386/kernel/acpi/sleep.o
AS arch/i386/kernel/acpi/wakeup.o
CC arch/i386/kernel/acpi/cstate.o
CC arch/i386/kernel/acpi/processor.o
LD arch/i386/kernel/acpi/built-in.o
CC arch/i386/kernel/cpu/common.o
CC arch/i386/kernel/cpu/proc.o
CC arch/i386/kernel/cpu/amd.o
CC arch/i386/kernel/cpu/cyrix.o
CC arch/i386/kernel/cpu/centaur.o
CC arch/i386/kernel/cpu/transmeta.o
CC arch/i386/kernel/cpu/intel.o
CC arch/i386/kernel/cpu/intel_cacheinfo.o
CC arch/i386/kernel/cpu/rise.o
CC arch/i386/kernel/cpu/nexgen.o
CC arch/i386/kernel/cpu/umc.o
CC arch/i386/kernel/cpu/mcheck/mce.o
CC arch/i386/kernel/cpu/mcheck/k7.o
CC arch/i386/kernel/cpu/mcheck/p4.o
CC arch/i386/kernel/cpu/mcheck/p5.o
CC arch/i386/kernel/cpu/mcheck/p6.o
CC arch/i386/kernel/cpu/mcheck/winchip.o
LD arch/i386/kernel/cpu/mcheck/built-in.o
CC arch/i386/kernel/cpu/mtrr/main.o
CC arch/i386/kernel/cpu/mtrr/if.o
CC arch/i386/kernel/cpu/mtrr/generic.o
CC arch/i386/kernel/cpu/mtrr/state.o
CC arch/i386/kernel/cpu/mtrr/amd.o
CC arch/i386/kernel/cpu/mtrr/cyrix.o
CC arch/i386/kernel/cpu/mtrr/centaur.o
LD arch/i386/kernel/cpu/mtrr/built-in.o
LD arch/i386/kernel/cpu/built-in.o
CC arch/i386/kernel/timers/timer.o
CC arch/i386/kernel/timers/timer_none.o
CC arch/i386/kernel/timers/timer_tsc.o
CC arch/i386/kernel/timers/timer_pit.o
CC arch/i386/kernel/timers/common.o
CC arch/i386/kernel/timers/timer_pm.o
LD arch/i386/kernel/timers/built-in.o
CC arch/i386/kernel/reboot.o
CC arch/i386/kernel/apm.o
/home/linux-2.6.16/arch/i386/kernel/apm.c: In function `suspend':
/home/linux-2.6.16/arch/i386/kernel/apm.c:1195: warning: `pm_send_all' is deprecated (declared at /home/linux-2.6.16/include/linux/pm_legacy.h:31)
/home/linux-2.6.16/arch/i386/kernel/apm.c:1249: warning: `pm_send_all' is deprecated (declared at /home/linux-2.6.16/include/linux/pm_legacy.h:31)
/home/linux-2.6.16/arch/i386/kernel/apm.c: In function `check_events':
/home/linux-2.6.16/arch/i386/kernel/apm.c:1370: warning: `pm_send_all' is deprecated (declared at /home/linux-2.6.16/include/linux/pm_legacy.h:31)
CC arch/i386/kernel/module.o
CC arch/i386/kernel/sysenter.o
LDS arch/i386/kernel/vsyscall.lds
AS arch/i386/kernel/vsyscall-int80.o
AS arch/i386/kernel/vsyscall-note.o
SYSCALL arch/i386/kernel/vsyscall-int80.so
AS arch/i386/kernel/vsyscall-sysenter.o
SYSCALL arch/i386/kernel/vsyscall-sysenter.so
AS arch/i386/kernel/vsyscall.o
CC arch/i386/kernel/doublefault.o
CC arch/i386/kernel/vm86.o
CC arch/i386/kernel/early_printk.o
SYSCALL arch/i386/kernel/vsyscall-syms.o
LD arch/i386/kernel/built-in.o
AS arch/i386/kernel/head.o
CC arch/i386/kernel/init_task.o
LDS arch/i386/kernel/vmlinux.lds
CC arch/i386/mm/init.o
CC arch/i386/mm/pgtable.o
CC arch/i386/mm/fault.o
CC arch/i386/mm/ioremap.o
CC arch/i386/mm/extable.o
CC arch/i386/mm/pageattr.o
CC arch/i386/mm/mmap.o
CC arch/i386/mm/highmem.o
LD arch/i386/mm/built-in.o
CC arch/i386/mach-default/setup.o
LD arch/i386/mach-default/built-in.o
LD arch/i386/crypto/built-in.o
CC kernel/sched.o
CC kernel/fork.o
CC kernel/exec_domain.o
CC kernel/panic.o
CC kernel/printk.o
CC kernel/profile.o
CC kernel/exit.o
CC kernel/itimer.o
CC kernel/time.o
CC kernel/softirq.o
CC kernel/resource.o
CC kernel/sysctl.o
CC kernel/capability.o
CC kernel/ptrace.o
CC kernel/timer.o
CC kernel/user.o
CC kernel/signal.o
CC kernel/sys.o
CC kernel/kmod.o
CC kernel/workqueue.o
CC kernel/pid.o
CC kernel/rcupdate.o
CC kernel/extable.o
CC kernel/params.o
CC kernel/posix-timers.o
CC kernel/kthread.o
CC kernel/wait.o
CC kernel/kfifo.o
CC kernel/sys_ni.o
CC kernel/posix-cpu-timers.o
CC kernel/mutex.o
CC kernel/hrtimer.o
CC kernel/mutex-debug.o
CC kernel/futex.o
CC kernel/dma.o
CC kernel/uid16.o
CC kernel/module.o
CC kernel/kallsyms.o
CC kernel/gcov/gcov-core.o
/home/linux-2.6.16/kernel/gcov/gcov-core.c:144: syntax error before "gcov_version"
/home/linux-2.6.16/kernel/gcov/gcov-core.c:144: warning: type defaults to `int'in declaration of `gcov_version'
/home/linux-2.6.16/kernel/gcov/gcov-core.c:144: warning: data definition has notype or storage class
/home/linux-2.6.16/kernel/gcov/gcov-core.c: In function `__gcov_init':
/home/linux-2.6.16/kernel/gcov/gcov-core.c:151: structure has no member named `version'
/home/linux-2.6.16/kernel/gcov/gcov-core.c:155: structure has no member named `version'
/home/linux-2.6.16/kernel/gcov/gcov-core.c:156: structure has no member named `version'
/home/linux-2.6.16/kernel/gcov/gcov-core.c:162: structure has no member named `version'
make[2]: *** [kernel/gcov/gcov-core.o] Error 1
make[1]: *** [kernel/gcov] Error 2
make: *** [kernel] Error 2
[root@localhost linux-2.6.16]#
|
另外新版的gcov出的结果的名字后缀是gcda,gcno
再一个,我没用过lcov
我用的是gcov
gcov的-o是要自己指定目录的
再一个,我没用过lcov
我用的是gcov
gcov的-o是要自己指定目录的
|
从你的描述看来,你的patch可能有问题,
既然有提示:/home/linux-2.6.16/kernel/gcov/gcov-core.c:144: syntax error before "gcov_version"
那就顺着这个查过去
既然有提示:/home/linux-2.6.16/kernel/gcov/gcov-core.c:144: syntax error before "gcov_version"
那就顺着这个查过去
|
我怎么找不源代码,你是打了什么补丁吗
|
你把ext3选进去试试.
|
gcov?
奇怪的事情
能说说你的环境配置么?
还有你编译的时候的选项
奇怪的事情
能说说你的环境配置么?
还有你编译的时候的选项