【问题】
折腾:
【记录】Cygwin下交叉编译Linux内核时用make menuconfig去确认和修改配置
期间,Cygwin下交叉编译linux时,去make menuconfig出错:
CLi@PC-CLI-1 ~/develop/kernel/linux-2.6.19.1 $ make menuconfig HOSTCC scripts/basic/docproc scripts/basic/docproc.c: In function ‘find_export_symbols’: scripts/basic/docproc.c:188:5: warning: array subscript has type ‘char’ [-Wchar-subscripts] scripts/basic/docproc.c:191:5: warning: array subscript has type ‘char’ [-Wchar-subscripts] scripts/basic/docproc.c:197:5: warning: array subscript has type ‘char’ [-Wchar-subscripts] scripts/basic/docproc.c:200:5: warning: array subscript has type ‘char’ [-Wchar-subscripts] scripts/basic/docproc.c: In function ‘singfunc’: scripts/basic/docproc.c:267:17: warning: array subscript has type ‘char’ [-Wchar-subscripts] scripts/basic/docproc.c: In function ‘parse_file’: scripts/basic/docproc.c:300:6: warning: array subscript has type ‘char’ [-Wchar-subscripts] scripts/basic/docproc.c:305:6: warning: array subscript has type ‘char’ [-Wchar-subscripts] scripts/basic/docproc.c:310:6: warning: array subscript has type ‘char’ [-Wchar-subscripts] scripts/basic/docproc.c:316:6: warning: array subscript has type ‘char’ [-Wchar-subscripts] scripts/basic/docproc.c:319:6: warning: array subscript has type ‘char’ [-Wchar-subscripts] HOSTCC scripts/kconfig/lxdialog/checklist.o scripts/kconfig/lxdialog/checklist.c: In function ‘dialog_checklist’: scripts/kconfig/lxdialog/checklist.c:206:4: warning: array subscript has type ‘char’ [-Wchar-subscripts] HOSTCC scripts/kconfig/lxdialog/inputbox.o HOSTCC scripts/kconfig/lxdialog/menubox.o scripts/kconfig/lxdialog/menubox.c: In function ‘dialog_menu’: scripts/kconfig/lxdialog/menubox.c:292:5: warning: array subscript has type ‘char’ [-Wchar-subscripts] scripts/kconfig/lxdialog/menubox.c:299:6: warning: array subscript has type ‘char’ [-Wchar-subscripts] HOSTCC scripts/kconfig/lxdialog/textbox.o scripts/kconfig/lxdialog/textbox.c: In function ‘print_line’: scripts/kconfig/lxdialog/textbox.c:323:9: warning: variable ‘x’ set but not used [-Wunused-but-set-variable] scripts/kconfig/lxdialog/textbox.c:323:6: warning: variable ‘y’ set but not used [-Wunused-but-set-variable] HOSTCC scripts/kconfig/lxdialog/util.o scripts/kconfig/lxdialog/util.c: In function ‘first_alpha’: scripts/kconfig/lxdialog/util.c:464:3: warning: array subscript has type ‘char’ [-Wchar-subscripts] HOSTCC scripts/kconfig/lxdialog/yesno.o HOSTCC scripts/kconfig/mconf.o HOSTLD scripts/kconfig/mconf scripts/kconfig/lxdialog/checklist.o:checklist.c:(.text+0x31): undefined reference to `wmove' scripts/kconfig/lxdialog/checklist.o:checklist.c:(.text+0x4e): undefined reference to `wattrset' scripts/kconfig/lxdialog/checklist.o:checklist.c:(.text+0x53): undefined reference to `ncwrap_acs_map' scripts/kconfig/lxdialog/checklist.o:checklist.c:(.text+0x65): undefined reference to `waddch' scripts/kconfig/lxdialog/checklist.o:checklist.c:(.text+0x7d): undefined reference to `waddnstr' scripts/kconfig/lxdialog/checklist.o:checklist.c:(.text+0x91): undefined reference to `wmove' scripts/kconfig/lxdialog/checklist.o:checklist.c:(.text+0xbf): undefined reference to `wattrset' scripts/kconfig/lxdialog/checklist.o:checklist.c:(.text+0xc4): undefined reference to `ncwrap_acs_map' scripts/kconfig/lxdialog/checklist.o:checklist.c:(.text+0xd6): undefined reference to `waddch' scripts/kconfig/lxdialog/checklist.o:checklist.c:(.text+0xdb): undefined reference to `ncwrap_acs_map' scripts/kconfig/lxdialog/checklist.o:checklist.c:(.text+0xed): undefined reference to `waddch' scripts/kconfig/lxdialog/checklist.o:checklist.c:(.text+0xf2): undefined reference to `ncwrap_acs_map' scripts/kconfig/lxdialog/checklist.o:checklist.c:(.text+0x104): undefined reference to `waddch' scripts/kconfig/lxdialog/checklist.o:checklist.c:(.text+0x109): undefined reference to `ncwrap_acs_map' scripts/kconfig/lxdialog/checklist.o:checklist.c:(.text+0x134): undefined reference to `wattrset' scripts/kconfig/lxdialog/checklist.o:checklist.c:(.text+0x139): undefined reference to `ncwrap_acs_map' scripts/kconfig/lxdialog/checklist.o:checklist.c:(.text+0x14b): undefined reference to `waddch' scripts/kconfig/lxdialog/checklist.o:checklist.c:(.text+0x150): undefined reference to `ncwrap_acs_map' scripts/kconfig/lxdialog/checklist.o:checklist.c:(.text+0x162): undefined reference to `waddch' scripts/kconfig/lxdialog/checklist.o:checklist.c:(.text+0x167): undefined reference to `ncwrap_acs_map' scripts/kconfig/lxdialog/checklist.o:checklist.c:(.text+0x179): undefined reference to `waddch' scripts/kconfig/lxdialog/checklist.o:checklist.c:(.text+0x17e): undefined reference to `ncwrap_acs_map' scripts/kconfig/lxdialog/checklist.o:checklist.c:(.text+0x190): undefined reference to `waddch' scripts/kconfig/lxdialog/checklist.o:checklist.c:(.text+0x1ad): undefined reference to `wattrset' scripts/kconfig/lxdialog/checklist.o:checklist.c:(.text+0x1b2): undefined reference to `ncwrap_acs_map' scripts/kconfig/lxdialog/checklist.o:checklist.c:(.text+0x1c4): undefined reference to `waddch' scripts/kconfig/lxdialog/checklist.o:checklist.c:(.text+0x20c): undefined reference to `wattrset' scripts/kconfig/lxdialog/checklist.o:checklist.c:(.text+0x220): undefined reference to `wmove' scripts/kconfig/lxdialog/checklist.o:checklist.c:(.text+0x23f): undefined reference to `waddch' scripts/kconfig/lxdialog/checklist.o:checklist.c:(.text+0x25c): undefined reference to `wmove' scripts/kconfig/lxdialog/checklist.o:checklist.c:(.text+0x276): undefined reference to `wattrset' scripts/kconfig/lxdialog/checklist.o:checklist.c:(.text+0x2a1): undefined reference to `wprintw' scripts/kconfig/lxdialog/checklist.o:checklist.c:(.text+0x2bb): undefined reference to `wattrset' scripts/kconfig/lxdialog/checklist.o:checklist.c:(.text+0x2d0): undefined reference to `wmove' scripts/kconfig/lxdialog/checklist.o:checklist.c:(.text+0x2e9): undefined reference to `waddch' scripts/kconfig/lxdialog/checklist.o:checklist.c:(.text+0x2fe): undefined reference to `wattrset' scripts/kconfig/lxdialog/checklist.o:checklist.c:(.text+0x31a): undefined reference to `waddnstr' scripts/kconfig/lxdialog/checklist.o:checklist.c:(.text+0x332): undefined reference to `wmove' scripts/kconfig/lxdialog/checklist.o:checklist.c:(.text+0x33a): undefined reference to `wrefresh' scripts/kconfig/lxdialog/checklist.o:checklist.c:(.text+0x353): undefined reference to `wattrset' scripts/kconfig/lxdialog/checklist.o:checklist.c:(.text+0x36f): undefined reference to `waddnstr' scripts/kconfig/lxdialog/checklist.o:checklist.c:(.text+0x405): undefined reference to `wmove' scripts/kconfig/lxdialog/checklist.o:checklist.c:(.text+0x4db): undefined reference to `ncwrap_stdscr' scripts/kconfig/lxdialog/checklist.o:checklist.c:(.text+0x4e3): undefined reference to `getmaxy' scripts/kconfig/lxdialog/checklist.o:checklist.c:(.text+0x4f2): undefined reference to `ncwrap_stdscr' scripts/kconfig/lxdialog/checklist.o:checklist.c:(.text+0x4fa): undefined reference to `getmaxx' scripts/kconfig/lxdialog/checklist.o:checklist.c:(.text+0x523): undefined reference to `ncwrap_COLS' scripts/kconfig/lxdialog/checklist.o:checklist.c:(.text+0x53b): undefined reference to `ncwrap_LINES' scripts/kconfig/lxdialog/checklist.o:checklist.c:(.text+0x54b): undefined reference to `ncwrap_stdscr' scripts/kconfig/lxdialog/checklist.o:checklist.c:(.text+0x591): undefined reference to `newwin' scripts/kconfig/lxdialog/checklist.o:checklist.c:(.text+0x5a5): undefined reference to `keypad' scripts/kconfig/lxdialog/checklist.o:checklist.c:(.text+0x5f8): undefined reference to `wattrset' scripts/kconfig/lxdialog/checklist.o:checklist.c:(.text+0x617): undefined reference to `wmove' scripts/kconfig/lxdialog/checklist.o:checklist.c:(.text+0x621): undefined reference to `ncwrap_acs_map' scripts/kconfig/lxdialog/checklist.o:checklist.c:(.text+0x637): undefined reference to `waddch' scripts/kconfig/lxdialog/checklist.o:checklist.c:(.text+0x653): undefined reference to `ncwrap_acs_map' scripts/kconfig/lxdialog/checklist.o:checklist.c:(.text+0x668): undefined reference to `waddch' scripts/kconfig/lxdialog/checklist.o:checklist.c:(.text+0x685): undefined reference to `wattrset' scripts/kconfig/lxdialog/checklist.o:checklist.c:(.text+0x68a): undefined reference to `ncwrap_acs_map' scripts/kconfig/lxdialog/checklist.o:checklist.c:(.text+0x6a0): undefined reference to `waddch' scripts/kconfig/lxdialog/checklist.o:checklist.c:(.text+0x6d1): undefined reference to `wattrset' scripts/kconfig/lxdialog/checklist.o:checklist.c:(.text+0x734): undefined reference to `subwin' scripts/kconfig/lxdialog/checklist.o:checklist.c:(.text+0x748): undefined reference to `keypad' scripts/kconfig/lxdialog/checklist.o:checklist.c:(.text+0x8cd): undefined reference to `wnoutrefresh' scripts/kconfig/lxdialog/checklist.o:checklist.c:(.text+0x8d9): undefined reference to `wnoutrefresh' scripts/kconfig/lxdialog/checklist.o:checklist.c:(.text+0x8de): undefined reference to `doupdate' scripts/kconfig/lxdialog/checklist.o:checklist.c:(.text+0x8fa): undefined reference to `wgetch' scripts/kconfig/lxdialog/checklist.o:checklist.c:(.text+0x9b9): undefined reference to `doupdate' scripts/kconfig/lxdialog/checklist.o:checklist.c:(.text+0x9ce): undefined reference to `delwin' scripts/kconfig/lxdialog/checklist.o:checklist.c:(.text+0x9da): undefined reference to `delwin' scripts/kconfig/lxdialog/checklist.o:checklist.c:(.text+0xa6b): undefined reference to `wnoutrefresh' scripts/kconfig/lxdialog/checklist.o:checklist.c:(.text+0xa77): undefined reference to `wrefresh' scripts/kconfig/lxdialog/checklist.o:checklist.c:(.text+0xace): undefined reference to `scrollok' scripts/kconfig/lxdialog/checklist.o:checklist.c:(.text+0xae2): undefined reference to `wscrl' scripts/kconfig/lxdialog/checklist.o:checklist.c:(.text+0xaf6): undefined reference to `scrollok' scripts/kconfig/lxdialog/checklist.o:checklist.c:(.text+0xb4f): undefined reference to `wnoutrefresh' scripts/kconfig/lxdialog/checklist.o:checklist.c:(.text+0xb5b): undefined reference to `wrefresh' scripts/kconfig/lxdialog/checklist.o:checklist.c:(.text+0xb96): undefined reference to `doupdate' scripts/kconfig/lxdialog/checklist.o:checklist.c:(.text+0xc09): undefined reference to `delwin' scripts/kconfig/lxdialog/checklist.o:checklist.c:(.text+0xc15): undefined reference to `delwin' scripts/kconfig/lxdialog/checklist.o:checklist.c:(.text+0xc51): undefined reference to `delwin' scripts/kconfig/lxdialog/checklist.o:checklist.c:(.text+0xc5d): undefined reference to `delwin' scripts/kconfig/lxdialog/checklist.o:checklist.c:(.text+0xc81): undefined reference to `doupdate' scripts/kconfig/lxdialog/checklist.o:checklist.c:(.text+0xcfa): undefined reference to `scrollok' scripts/kconfig/lxdialog/checklist.o:checklist.c:(.text+0xd0e): undefined reference to `wscrl' scripts/kconfig/lxdialog/checklist.o:checklist.c:(.text+0xd22): undefined reference to `scrollok' scripts/kconfig/lxdialog/checklist.o:checklist.c:(.text+0xd87): undefined reference to `wnoutrefresh' scripts/kconfig/lxdialog/checklist.o:checklist.c:(.text+0xd93): undefined reference to `wrefresh' scripts/kconfig/lxdialog/checklist.o:checklist.c:(.text+0xdb3): undefined reference to `doupdate' scripts/kconfig/lxdialog/checklist.o:checklist.c:(.text+0xdf4): undefined reference to `wrefresh' scripts/kconfig/lxdialog/checklist.o:checklist.c:(.text+0xdf9): undefined reference to `doupdate' scripts/kconfig/lxdialog/checklist.o:checklist.c:(.text+0x123): undefined reference to `waddch' scripts/kconfig/lxdialog/checklist.o:checklist.c:(.text+0x1e4): undefined reference to `waddnstr' scripts/kconfig/lxdialog/checklist.o:checklist.c:(.text+0x421): undefined reference to `wrefresh' /usr/lib/gcc/i686-pc-cygwin/4.7.3/../../../../i686-pc-cygwin/bin/ld: scripts/kconfig/lxdialog/checklist.o: bad reloc address 0x20 in section `.eh_frame' /usr/lib/gcc/i686-pc-cygwin/4.7.3/../../../../i686-pc-cygwin/bin/ld: final link failed: Invalid operation collect2: error: ld returned 1 exit status make[1]: *** [scripts/kconfig/mconf] Error 1 make: *** [menuconfig] Error 2 CLi@PC-CLI-1 ~/develop/kernel/linux-2.6.19.1 $
如图:
即:
| scripts/kconfig/lxdialog/checklist.o:checklist.c:(.text+0x31): undefined reference to `wmove’ |
【解决过程】
1.此人遇到类似问题:
Missing symbols in libncurses?
但是无解。
2.google搜:
cygwin bad reloc address 0x20 in section
倒是可以搜到很多,但是好像也太大帮助。
3.搜:
cygwin scripts/kconfig/lxdialog/checklist.o:checklist.c
参考:
Re: [arm-gnu] cygwin / arm-none-linux-gnueabi kernel build error
去试试:
make HOST_LOADLIBES="-lcurses -lintl" menuconfig
结果就可以了。
CLi@PC-CLI-1 ~/develop/kernel/linux-2.6.19.1 $ make HOST_LOADLIBES="-lcurses -lintl" menuconfig HOSTCC scripts/basic/fixdep scripts/basic/fixdep.c: In function ‘parse_config_file’: scripts/basic/fixdep.c:242:4: warning: array subscript has type ‘char’ [-Wchar-subscripts] scripts/basic/fixdep.c: In function ‘parse_dep_file’: scripts/basic/fixdep.c:319:4: warning: array subscript has type ‘char’ [-Wchar-subscripts] scripts/basic/fixdep.c: In function ‘traps’: scripts/basic/fixdep.c:371:2: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] scripts/basic/fixdep.c:373:4: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] HOSTCC scripts/basic/docproc scripts/basic/docproc.c: In function ‘find_export_symbols’: scripts/basic/docproc.c:188:5: warning: array subscript has type ‘char’ [-Wchar-subscripts] scripts/basic/docproc.c:191:5: warning: array subscript has type ‘char’ [-Wchar-subscripts] scripts/basic/docproc.c:197:5: warning: array subscript has type ‘char’ [-Wchar-subscripts] scripts/basic/docproc.c:200:5: warning: array subscript has type ‘char’ [-Wchar-subscripts] scripts/basic/docproc.c: In function ‘singfunc’: scripts/basic/docproc.c:267:17: warning: array subscript has type ‘char’ [-Wchar-subscripts] scripts/basic/docproc.c: In function ‘parse_file’: scripts/basic/docproc.c:300:6: warning: array subscript has type ‘char’ [-Wchar-subscripts] scripts/basic/docproc.c:305:6: warning: array subscript has type ‘char’ [-Wchar-subscripts] scripts/basic/docproc.c:310:6: warning: array subscript has type ‘char’ [-Wchar-subscripts] scripts/basic/docproc.c:316:6: warning: array subscript has type ‘char’ [-Wchar-subscripts] scripts/basic/docproc.c:319:6: warning: array subscript has type ‘char’ [-Wchar-subscripts] HOSTLD scripts/kconfig/mconf scripts/kconfig/mconf arch/arm/Kconfig
如图:
4.说明,此处,还是和之前的:
类似,是缺少了对应的curses库。
所以,其实,觉得更好的办法,应该是,类似于:
在makefile中,检测到对应的平台是cygwin,然后添加对应的库,才是比较好的。
所以,去看看能否找到更好的解决办法。
然后,针对之前在:
linux-2.6.19.1\scripts\kconfig\Makefile
中添加的:
#ifeq (${OSTYPE},cygwin)
#HOST_LOADLIBES := -lintl
#endif
IS_CYGWIN=$(shell uname | grep -i cygwin > /dev/null 2>&1 && echo yes || echo no)
ifeq ($(IS_CYGWIN),yes)
HOST_LOADLIBES += -lintl
endif去分析:
CLi@PC-CLI-1 ~/develop/kernel/linux-2.6.19.1
$ uname | grep -i cygwin
CYGWIN_NT-6.1-WOW64
CLi@PC-CLI-1 ~/develop/kernel/linux-2.6.19.1
$ grep --help
Usage: grep [OPTION]... PATTERN [FILE]...
Search for PATTERN in each FILE or standard input.
PATTERN is, by default, a basic regular expression (BRE).
Example: grep -i 'hello world' menu.h main.c
Regexp selection and interpretation:
-E, --extended-regexp PATTERN is an extended regular expression (ERE)
-F, --fixed-strings PATTERN is a set of newline-separated fixed strings
-G, --basic-regexp PATTERN is a basic regular expression (BRE)
-P, --perl-regexp PATTERN is a Perl regular expression
-e, --regexp=PATTERN use PATTERN for matching
-f, --file=FILE obtain PATTERN from FILE
-i, --ignore-case ignore case distinctions
-w, --word-regexp force PATTERN to match only whole words
-x, --line-regexp force PATTERN to match only whole lines
-z, --null-data a data line ends in 0 byte, not newline
Miscellaneous:
-s, --no-messages suppress error messages
-v, --invert-match select non-matching lines
-V, --version print version information and exit
--help display this help and exit
--mmap ignored for backwards compatibility
Output control:
-m, --max-count=NUM stop after NUM matches
-b, --byte-offset print the byte offset with output lines
-n, --line-number print line number with output lines
--line-buffered flush output on every line
-H, --with-filename print the filename for each match
-h, --no-filename suppress the prefixing filename on output
--label=LABEL print LABEL as filename for standard input
-o, --only-matching show only the part of a line matching PATTERN
-q, --quiet, --silent suppress all normal output
--binary-files=TYPE assume that binary files are TYPE;
TYPE is `binary', `text', or `without-match'
-a, --text equivalent to --binary-files=text
-I equivalent to --binary-files=without-match
-d, --directories=ACTION how to handle directories;
ACTION is `read', `recurse', or `skip'
-D, --devices=ACTION how to handle devices, FIFOs and sockets;
ACTION is `read' or `skip'
-R, -r, --recursive equivalent to --directories=recurse
--include=FILE_PATTERN search only files that match FILE_PATTERN
--exclude=FILE_PATTERN skip files and directories matching FILE_PATTERN
--exclude-from=FILE skip files matching any file pattern from FILE
--exclude-dir=PATTERN directories that match PATTERN will be skipped.
-L, --files-without-match print only names of FILEs containing no match
-l, --files-with-matches print only names of FILEs containing matches
-c, --count print only a count of matching lines per FILE
-T, --initial-tab make tabs line up (if needed)
-Z, --null print 0 byte after FILE name
Context control:
-B, --before-context=NUM print NUM lines of leading context
-A, --after-context=NUM print NUM lines of trailing context
-C, --context=NUM print NUM lines of output context
-NUM same as --context=NUM
--color[=WHEN],
--colour[=WHEN] use markers to highlight the matching strings;
WHEN is `always', `never', or `auto'
-U, --binary do not strip CR characters at EOL (MSDOS)
-u, --unix-byte-offsets report offsets as if CRs were not there (MSDOS)
`egrep' means `grep -E'. `fgrep' means `grep -F'.
Direct invocation as either `egrep' or `fgrep' is deprecated.
With no FILE, or when FILE is -, read standard input. If less than two FILEs
are given, assume -h. Exit status is 0 if any line was selected, 1 otherwise;
if any error occurs and -q was not given, the exit status is 2.
Report bugs to: [email protected]
GNU Grep home page: <http://www.gnu.org/software/grep/>
General help using GNU software: <http://www.gnu.org/gethelp/>
CLi@PC-CLI-1 ~/develop/kernel/linux-2.6.19.1
$ uname | grep -i cygwin > /dev/null 2>&1 && echo yes || echo no
yes
CLi@PC-CLI-1 ~/develop/kernel/linux-2.6.19.1
$结果可以看出:
此处,IS_CYGWIN,的确生效了,是yes,所以,之前只加了对应的-lintl,所以此处,可以再去加上对应的-lcurses,应该也可以解决问题。
5.所以去改为:
#ifeq (${OSTYPE},cygwin)
#HOST_LOADLIBES := -lintl
#endif
IS_CYGWIN=$(shell uname | grep -i cygwin > /dev/null 2>&1 && echo yes || echo no)
ifeq ($(IS_CYGWIN),yes)
HOST_LOADLIBES += -lintl -lcurses
endif试试,效果也是一样的:
CLi@PC-CLI-1 ~/develop/kernel/linux-2.6.19.1 $ make menuconfig HOSTCC scripts/basic/fixdep scripts/basic/fixdep.c: In function ‘parse_config_file’: scripts/basic/fixdep.c:242:4: warning: array subscript has type ‘char’ [-Wchar-subscripts] scripts/basic/fixdep.c: In function ‘parse_dep_file’: scripts/basic/fixdep.c:319:4: warning: array subscript has type ‘char’ [-Wchar-subscripts] scripts/basic/fixdep.c: In function ‘traps’: scripts/basic/fixdep.c:371:2: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] scripts/basic/fixdep.c:373:4: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] HOSTCC scripts/basic/docproc scripts/basic/docproc.c: In function ‘find_export_symbols’: scripts/basic/docproc.c:188:5: warning: array subscript has type ‘char’ [-Wchar-subscripts] scripts/basic/docproc.c:191:5: warning: array subscript has type ‘char’ [-Wchar-subscripts] scripts/basic/docproc.c:197:5: warning: array subscript has type ‘char’ [-Wchar-subscripts] scripts/basic/docproc.c:200:5: warning: array subscript has type ‘char’ [-Wchar-subscripts] scripts/basic/docproc.c: In function ‘singfunc’: scripts/basic/docproc.c:267:17: warning: array subscript has type ‘char’ [-Wchar-subscripts] scripts/basic/docproc.c: In function ‘parse_file’: scripts/basic/docproc.c:300:6: warning: array subscript has type ‘char’ [-Wchar-subscripts] scripts/basic/docproc.c:305:6: warning: array subscript has type ‘char’ [-Wchar-subscripts] scripts/basic/docproc.c:310:6: warning: array subscript has type ‘char’ [-Wchar-subscripts] scripts/basic/docproc.c:316:6: warning: array subscript has type ‘char’ [-Wchar-subscripts] scripts/basic/docproc.c:319:6: warning: array subscript has type ‘char’ [-Wchar-subscripts] HOSTLD scripts/kconfig/mconf scripts/kconfig/mconf arch/arm/Kconfig
即,无需在命令行中,添加HOST_LOADLIBES参数了。
【总结】
此处,在Cygwin下,交叉编译Linux时,用make menuconfig出现:
| scripts/kconfig/lxdialog/checklist.o:checklist.c:(.text+0x31): undefined reference to `wmove’ |
的错误的,
原因是:
缺少了对应的curses库,导致找不到函数而报错。
解决办法是:
在对应的Makefile:
linux-2.6.19.1\scripts\kconfig\Makefile
中,添加对应的库,即从:
IS_CYGWIN=$(shell uname | grep -i cygwin > /dev/null 2>&1 && echo yes || echo no) ifeq ($(IS_CYGWIN),yes) HOST_LOADLIBES += -lintl endif
变成:
IS_CYGWIN=$(shell uname | grep -i cygwin > /dev/null 2>&1 && echo yes || echo no) ifeq ($(IS_CYGWIN),yes) HOST_LOADLIBES += -lintl -lcurses endif
即可。
转载请注明:在路上 » 【已解决】Cygwin下交叉编译Linux在make menuconfig时出错:scripts/kconfig/lxdialog/checklist.o:checklist.c:(.text+0x31): undefined reference to `wmove’