|
发表于 2006-12-15 16:59:53
|
显示全部楼层
我在cygwin下编译2.6.12也是用make menuconfig不通
scripts/basic/docproc.c: In function 'find_export_symbols':
scripts/basic/docproc.c:184: warning: pointer targets in assignment differ in si
gnedness
scripts/basic/docproc.c:185: warning: pointer targets in assignment differ in si
gnedness
scripts/basic/docproc.c:202: warning: pointer targets in passing argument 2 of '
add_new_symbol' differ in signedness
scripts/basic/docproc.c: In function 'singfunc':
scripts/basic/docproc.c:274: warning: pointer targets in assignment differ in si
gnedness
scripts/basic/docproc.c: In function 'parse_file':
scripts/basic/docproc.c:296: warning: pointer targets in assignment differ in si
gnedness
HOSTLD scripts/kconfig/mconf
scripts/kconfig/mconf.o:mconf.c.text+0xa13): undefined reference to `_libintl_
gettext'
scripts/kconfig/mconf.o:mconf.c.text+0x10c1): undefined reference to `_libintl
_gettext'
scripts/kconfig/mconf.o:mconf.c.text+0x123a): undefined reference to `_libintl
_gettext'
scripts/kconfig/mconf.o:mconf.c.text+0x1277): undefined reference to `_libintl
_gettext'
scripts/kconfig/mconf.o:mconf.c.text+0x1297): undefined reference to `_libintl
_gettext'
scripts/kconfig/mconf.o:mconf.c.text+0x12b7): more undefined references to `_l
ibintl_gettext' follow
scripts/kconfig/mconf.o:mconf.c.text+0x1a8f): undefined reference to `_libintl
_bindtextdomain'
scripts/kconfig/mconf.o:mconf.c.text+0x1a9b): undefined reference to `_libintl
_textdomain'
scripts/kconfig/mconf.o:mconf.c.text+0x1ae7): undefined reference to `_libintl
_gettext'
scripts/kconfig/mconf.o:mconf.c.text+0x1b79): undefined reference to `_libintl
_gettext'
scripts/kconfig/mconf.o:mconf.c:(.text+0x1bc1): undefined reference to `_libintl
_gettext'
scripts/kconfig/mconf.o:mconf.c:(.text+0x1bdc): undefined reference to `_libintl
_gettext'
scripts/kconfig/mconf.o:mconf.c:(.text+0x1c14): undefined reference to `_libintl
_gettext'
后来用在网上看到
On a system where libintl.h is present, but the NLS functionality is
supplied by a separate library instead of the system C library, an attempt
to "make config" or "make menuconfig" will fail with link errors, ex:
scripts/kconfig/mconf.o:mconf.c:(.text+0xf63): undefined reference to
`_libintl_gettext'
This patch attempts to correct the problem by detecting whether or not
NLS support requires linking with libintl.
Signed-off-by: Samuel J Robb <sam.robb@...>
---
--- linux-2.6.15.1/scripts/kconfig/Makefile.orig 2006-01-25 14:55:22.926372900 -0500
+++ linux-2.6.15.1/scripts/kconfig/Makefile 2006-01-30 12:51:04.551596200 -0500
@@ -122,7 +122,17 @@ KBUILD_HAVE_NLS := $(shell \
then echo yes ; \
else echo no ; fi)
ifeq ($(KBUILD_HAVE_NLS),no)
-HOSTCFLAGS += -DKBUILD_NO_NLS
+ HOSTCFLAGS += -DKBUILD_NO_NLS
+else
+ KBUILD_NEED_LINTL := $(shell \
+ if echo -e "\#include <libintl.h>\nint main(int a, char** b) { gettext(\"\"); return 0; }\n" | \
+ $(HOSTCC) $(HOSTCFLAGS) -x c - > /dev/null 2>&1 ; \
+ then echo no ; \
+ else echo yes ; fi)
+ ifeq ($(KBUILD_NEED_LINTL),yes)
+ HOSTLOADLIBES_conf += -lintl
+ HOSTLOADLIBES_mconf += -lintl
+ endif
endif
# generated files seem to need this to find local include files
于是拿了个2.6.15的
make menuconfig通过了
但是make zImage还是错误
In file included from scripts/mod/modpost.c:15:
scripts/mod/modpost.h:27:1: warning: "ELF_ST_BIND" redefined
In file included from /usr/include/elf.h:20,
from scripts/mod/modpost.h:10,
from scripts/mod/modpost.c:15:
/usr/include/sys/elf_generic.h:87:1: warning: this is the location of the previous definition
In file included from scripts/mod/modpost.c:15:
scripts/mod/modpost.h:28:1: warning: "ELF_ST_TYPE" redefined
In file included from /usr/include/elf.h:20,
from scripts/mod/modpost.h:10,
from scripts/mod/modpost.c:15:
/usr/include/sys/elf_generic.h:88:1: warning: this is the location of the previous definition
scripts/mod/modpost.c: In function 'handle_modversions':
scripts/mod/modpost.c:345: error: 'MODULE_SYMBOL_PREFIX' undeclared (first use in this function)
scripts/mod/modpost.c:345: error: (Each undeclared identifier is reported only once
scripts/mod/modpost.c:345: error: for each function it appears in.)
scripts/mod/modpost.c:345: error: parse error before string constant
scripts/mod/modpost.c:347: error: parse error before string constant
scripts/mod/modpost.c:350: error: break statement not within loop or switch
scripts/mod/modpost.c:351: error: case label not within a switch statement
scripts/mod/modpost.c:355: error: break statement not within loop or switch
scripts/mod/modpost.c:358: error: break statement not within loop or switch
scripts/mod/modpost.c:360: error: parse error before string constant
scripts/mod/modpost.c:388: error: break statement not within loop or switch
scripts/mod/modpost.c:389: error: 'default' label not within a switch statement
scripts/mod/modpost.c:391: error: parse error before string constant
scripts/mod/modpost.c:336: warning: unused variable 'crc'
make[2]: *** [scripts/mod/modpost.o] Error 1
make[1]: *** [scripts/mod] Error 2
后来我把2.6.12的scripts文件夹全部替换为2.6.15的
可以make menuconfig了
但是编译到usr目录下的东西时就有出错了 |
|