0
我有Linux Kernel 3.8.0源代碼,當嘗試使用menuconfig選項(使用「make menuconfig」終端命令)配置它時,我得到以下錯誤的列表:配置Linux內核(menuconfig):redifinition錯誤
DALEK linux-3.8.0 # make menuconfig
HOSTCC scripts/kconfig/mconf.o
In file included from scripts/kconfig/expr.h:15:0,
from scripts/kconfig/lkc.h:9,
from scripts/kconfig/mconf.c:22:
scripts/kconfig/list.h:23:8: error: redefinition of ‘struct list_head’
In file included from /usr/lib/gcc/x86_64-linux-gnu/4.7/include/signal.h:9:0,
from scripts/kconfig/mconf.c:18:
/usr/lib/gcc/x86_64-linux-gnu/4.7/include/linux/list.h:19:8: note: originally defined here
In file included from scripts/kconfig/expr.h:15:0,
from scripts/kconfig/lkc.h:9,
from scripts/kconfig/mconf.c:22:
scripts/kconfig/list.h:57:19: error: conflicting types for ‘list_empty’
In file included from /usr/lib/gcc/x86_64-linux-gnu/4.7/include/signal.h:9:0,
from scripts/kconfig/mconf.c:18:
/usr/lib/gcc/x86_64-linux-gnu/4.7/include/linux/list.h:193:19: note: previous definition of ‘list_empty’ was here
In file included from scripts/kconfig/expr.h:15:0,
from scripts/kconfig/lkc.h:9,
from scripts/kconfig/mconf.c:22:
scripts/kconfig/list.h:68:20: error: conflicting types for ‘__list_add’
In file included from /usr/lib/gcc/x86_64-linux-gnu/4.7/include/signal.h:9:0,
from scripts/kconfig/mconf.c:18:
/usr/lib/gcc/x86_64-linux-gnu/4.7/include/linux/list.h:44:20: note: previous definition of ‘__list_add’ was here
In file included from scripts/kconfig/expr.h:15:0,
from scripts/kconfig/lkc.h:9,
from scripts/kconfig/mconf.c:22:
scripts/kconfig/list.h:86:20: error: conflicting types for ‘list_add_tail’
In file included from /usr/lib/gcc/x86_64-linux-gnu/4.7/include/signal.h:9:0,
from scripts/kconfig/mconf.c:18:
/usr/lib/gcc/x86_64-linux-gnu/4.7/include/linux/list.h:81:20: note: previous definition of ‘list_add_tail’ was here
In file included from scripts/kconfig/mconf.c:23:0:
scripts/kconfig/lxdialog/dialog.h:62:0: warning: "MIN" redefined [enabled by default]
In file included from /usr/lib/gcc/x86_64-linux-gnu/4.7/include/ctype.h:27:0,
from scripts/kconfig/mconf.c:11:
/usr/lib/gcc/x86_64-linux-gnu/4.7/include/features.h:153:0: note: this is the location of the previous definition
In file included from scripts/kconfig/mconf.c:23:0:
scripts/kconfig/lxdialog/dialog.h:63:0: warning: "MAX" redefined [enabled by default]
In file included from /usr/lib/gcc/x86_64-linux-gnu/4.7/include/ctype.h:27:0,
from scripts/kconfig/mconf.c:11:
/usr/lib/gcc/x86_64-linux-gnu/4.7/include/features.h:148:0: note: this is the location of the previous definition
make[1]: *** [scripts/kconfig/mconf.o] Error 1
make: *** [menuconfig] Error 2
DALEK linux-3.8.0 #
因此很明顯,在源代碼中的/腳本/ kconfig命令/使用由內核源代碼的Linux頭定義的數據結構和被在頭中先前定義的常數。我應該怎麼做才能糾正這個問題,以便我可以運行menuconfig?
你從哪裏得到這個Linux源代碼? –
我下載了它[這裏] https://www.kernel.org/ –
我可以知道哪個拱門和哪個電路板需要編譯這個內核嗎? –