编译uclinux时遇到的问题

一   。遇到的问题

刚开始,我下载了官方http://blackfin.uclinux.org/gf/project/uclinux-dist/frs/

uclinux-dist-trunk-svn.src.tar.bz2

解压后,在命令窗口中输入

进入这个解压目录下

输入make clean   

再输入,make menucongfig

root@arby-desktop:/opt/uclinux-dist-trunk-svn-10648#make menuconfig
find vendors -mindepth 2 '(' -name .svn -prune ')' -o -type f -name Kconfig-print | sed 's:^:source ../:' > vendors/Kconfig
config/mkconfig > Kconfig
CC=cc CXX=c++ make -C /opt/uclinux-dist-trunk-svn-10648/config/kconfig conf
make[1]: Entering directory`/opt/uclinux-dist-trunk-svn-10648/config/kconfig'
cc -DCURSES_LOC="<curses.h>"  -c -o conf.o conf.c
cc -DCURSES_LOC="<curses.h>"  -c -o zconf.tab.o zconf.tab.c
cc   conf.o zconf.tab.o   -oconf
make[1]: Leaving directory `/opt/uclinux-dist-trunk-svn-10648/config/kconfig'
CC=cc CXX=c++ make -C /opt/uclinux-dist-trunk-svn-10648/config/kconfig mconf
make[1]: Entering directory `/opt/uclinux-dist-trunk-svn-10648/config/kconfig'
cc -DCURSES_LOC="<curses.h>"  -c -o mconf.o mconf.c
In file included from mconf.c:27:
lxdialog/dialog.h:32:20: error: curses.h: No such file or directory
In file included from mconf.c:27:
lxdialog/dialog.h:97: error: expected specifier-qualifier-list before ‘chtype’
lxdialog/dialog.h:187: error: expected ‘)’ before ‘*’ token
lxdialog/dialog.h:193: error: expected ‘)’ before ‘*’ token
lxdialog/dialog.h:195: error: expected ‘)’ before ‘*’ token
lxdialog/dialog.h:196: error: expected ‘)’ before ‘*’ token
lxdialog/dialog.h:197: error: expected ‘)’ before ‘*’ token
lxdialog/dialog.h:198: error: expected ‘)’ before ‘*’ token
lxdialog/dialog.h:200: error: expected ‘)’ before ‘*’ token
mconf.c: In function ‘conf’:
mconf.c:610: error: ‘KEY_MAX’ undeclared (first use in this function)
mconf.c:610: error: (Each undeclared identifier is reported only once
mconf.c:610: error: for each function it appears in.)
mconf.c: In function ‘conf_choice’:
mconf.c:761: error: ‘KEY_MAX’ undeclared (first use in this function)
make[1]: *** [mconf.o] Error 1
make[1]: Leaving directory `/opt/uclinux-dist-trunk-svn-10648/config/kconfig'
make: *** [/opt/uclinux-dist-trunk-svn-10648/config/kconfig/mconf] Error 2

 

 

 

二 其中还遇到!!!!

configure: error: C++ preprocessor "/lib/cpp" fails sanity check 

 

configure: error: C++ preprocessor "/lib/cpp" fails sanity check

according to some articles on web:

1.http://forum.ubuntu.org.cn/viewtopic.php?f=85&t=102970

出现该情况是由于c++编译器的相关package没有安装,以超级用户登陆,在终端上执行:

#yum install glibc-headers

#yum install gcc-c++

2.http://wiki.ubuntu.org.cn/index.php?title=EclipseSubversion&variant=zh-cn

To solve the error de>C++ preprocessor "/lib/cpp" fails sanity checkde> while compiling Subversion, you need to download GCC, CPP and G++ by installing the following packages

gcc cpp g++

but that is for other Linux distribution system, my is Ubuntu, so we should install the needed libs

sudo aptitude install build-essential

this will download and install the essential lib that is build related, such as gcc g++ ....

 

 

 

 

三。遇到的

lrz.c:2322: warning: missing sentinel in function call
bfin-uclinux-gcc -pipe -Wall -g -O2     -mcpu=bf548-0.2 -DHAVE_CONFIG_H -I. -I.. -I../lib -DNFGVMIN -DEMBED-D__uClinux__ -I/opt/uclinux-dist-trunk-svn-10648  -mcpu=bf548-0.2  -c -o timing.o timing.c
bfin-uclinux-gcc -pipe -Wall -g -O2     -mcpu=bf548-0.2 -DHAVE_CONFIG_H -I. -I.. -I../lib -DNFGVMIN -DEMBED-D__uClinux__ -I/opt/uclinux-dist-trunk-svn-10648  -mcpu=bf548-0.2  -c -o zperr.o zperr.c
bfin-uclinux-gcc -pipe -Wall -g -O2     -mcpu=bf548-0.2 -DHAVE_CONFIG_H -I. -I.. -I../lib -DNFGVMIN -DEMBED-D__uClinux__ -I/opt/uclinux-dist-trunk-svn-10648  -mcpu=bf548-0.2  -c -o zreadline.o zreadline.c
zreadline.c: In function ‘readline_internal’:
zreadline.c:71: warning: format ‘%d’ expects type ‘int’, but argument 4 hastype ‘size_t’
zreadline.c:77: warning: format ‘%d’ expects type ‘int’, but argument 3 hastype ‘size_t’
bfin-uclinux-gcc -pipe -Wall -g -O2     -mcpu=bf548-0.2 -DHAVE_CONFIG_H -I. -I.. -I../lib -DNFGVMIN -DEMBED-D__uClinux__ -I/opt/uclinux-dist-trunk-svn-10648  -mcpu=bf548-0.2  -c -o crctab.o crctab.c
bfin-uclinux-gcc -pipe -Wall -g -O2     -mcpu=bf548-0.2 -DHAVE_CONFIG_H -I. -I.. -I../lib -DNFGVMIN -DEMBED-D__uClinux__ -I/opt/uclinux-dist-trunk-svn-10648  -mcpu=bf548-0.2  -c -o rbsb.o rbsb.c
bfin-uclinux-gcc -pipe -Wall -g -O2     -mcpu=bf548-0.2 -DHAVE_CONFIG_H -I. -I.. -I../lib -DNFGVMIN -DEMBED-D__uClinux__ -I/opt/uclinux-dist-trunk-svn-10648  -mcpu=bf548-0.2  -c -o zm.o zm.c
zm.c: In function ‘zsda32’:
zm.c:454: warning: format ‘%d’ expects type ‘int’, but argument 3 has type‘size_t’
bfin-uclinux-gcc -pipe -Wall -g -O2     -mcpu=bf548-0.2 -DHAVE_CONFIG_H -I. -I.. -I../lib -DNFGVMIN -DEMBED-D__uClinux__ -I/opt/uclinux-dist-trunk-svn-10648  -mcpu=bf548-0.2  -c -o protname.o protname.c
bfin-uclinux-gcc -pipe -Wall -g -O2     -mcpu=bf548-0.2 -DHAVE_CONFIG_H -I. -I.. -I../lib -DNFGVMIN -DEMBED-D__uClinux__ -I/opt/uclinux-dist-trunk-svn-10648  -mcpu=bf548-0.2  -c -o tcp.o tcp.c
tcp.c: In function ‘tcp_server’:
tcp.c:75: warning: passing argument 3 of ‘getsockname’ from incompatiblepointer type
tcp.c:83: warning: passing argument 3 of ‘getsockname’ from incompatiblepointer type
tcp.c: In function ‘tcp_accept’:
tcp.c:103: warning: passing argument 3 of ‘accept’ from incompatible pointertype
bfin-uclinux-gcc -pipe -Wall -g -O2     -mcpu=bf548-0.2 -DHAVE_CONFIG_H -I. -I.. -I../lib -DNFGVMIN -DEMBED-D__uClinux__ -I/opt/uclinux-dist-trunk-svn-10648  -mcpu=bf548-0.2  -c -o lsyslog.o lsyslog.c
lsyslog.c: In function ‘lsyslog’:
lsyslog.c:67: warning: implicit declaration of function ‘sprintf’
lsyslog.c:67: warning: incompatible implicit declaration of built-in function‘sprintf’
lsyslog.c:72: warning: implicit declaration of function ‘vasprintf’
bfin-uclinux-gcc -pipe -Wall -g -O2     -mcpu=bf548-0.2 -DHAVE_CONFIG_H -I. -I.. -I../lib -DNFGVMIN -DEMBED-D__uClinux__ -I/opt/uclinux-dist-trunk-svn-10648  -mcpu=bf548-0.2  -c -o canit.o canit.c
bfin-uclinux-gcc  -Wl,-elf2flt    -mcpu=bf548-0.2 -o lrz lrz.o timing.ozperr.o zreadline.o crctab.o rbsb.o zm.o protname.o tcp.o lsyslog.o canit.o../lib/libzmodem.a  
bfin-uclinux-gcc -pipe -Wall -g -O2     -mcpu=bf548-0.2 -DHAVE_CONFIG_H -I. -I.. -I../lib -DNFGVMIN -DEMBED-D__uClinux__ -I/opt/uclinux-dist-trunk-svn-10648  -mcpu=bf548-0.2  -c -o lsz.o lsz.c
lsz.c: In function ‘zsendfdata’:
lsz.c:2000: warning: format ‘%d’ expects type ‘int’, but argument 3 has type‘size_t’
bfin-uclinux-gcc  -Wl,-elf2flt    -mcpu=bf548-0.2 -o lsz lsz.o timing.ozperr.o zreadline.o crctab.o rbsb.o zm.o protname.o tcp.o lsyslog.o canit.o../lib/libzmodem.a  
make[4]: Leaving directory `/opt/uclinux-dist-trunk-svn-10648/user/lrzsz/src'
make[3]: Leaving directory `/opt/uclinux-dist-trunk-svn-10648/user/lrzsz'
[ ! -d "mtd-utils" ] || ( touch mtd-utils/.sgbuilt_user &&make -C mtd-utils ) || exit $?
make[3]: Entering directory `/opt/uclinux-dist-trunk-svn-10648/user/mtd-utils'
unset CC CFLAGS CPPFLAGS CROSS LDFLAGS;     make-C 36d8de81049c9c908740b690c664b5bd3703ccd6/ WITHOUT_XATTR=1BUILDDIR=$PWD/build-36d8de81049c9c908740b690c664b5bd3703ccd6-host/ 
make[4]: Entering directory `/opt/uclinux-dist-trunk-svn-10648/user/mtd-utils/36d8de81049c9c908740b690c664b5bd3703ccd6'
  CHK    include/version.h
  CC     ftl_format.o
  CC     lib/libmtd.o
  CC     lib/libmtd_legacy.o
  CC     lib/libcrc32.o
  CC     lib/libfec.o
  AR     lib/libmtd.a
  LD     ftl_format
  CC     flash_erase.o
  LD     flash_erase
  CC     nanddump.o
nanddump.c: In function ‘main’:
nanddump.c:450: warning: ignoring return value of ‘write’, declared withattribute warn_unused_result
nanddump.c:453: warning: ignoring return value of ‘write’, declared withattribute warn_unused_result
nanddump.c:473: warning: ignoring return value of ‘write’, declared withattribute warn_unused_result
nanddump.c:476: warning: ignoring return value of ‘write’, declared withattribute warn_unused_result
  LD     nanddump
  CC     doc_loadbios.o
  LD     doc_loadbios
  CC     ftl_check.o
ftl_check.c: In function ‘check_partition’:
ftl_check.c:109: warning: ignoring return value of ‘read’, declared withattribute warn_unused_result
  LD     ftl_check
  CC      mkfs.jffs2.o
  CC     compr_rtime.o
  CC     compr_zlib.o
compr_zlib.c:39:18: error: zlib.h: No such file or directory
compr_zlib.c: In function ‘jffs2_zlib_compress’:
compr_zlib.c:59: error: ‘z_stream’ undeclared (first use in thisfunction)
compr_zlib.c:59: error: (Each undeclared identifier is reported only once
compr_zlib.c:59: error: for each function it appears in.)
compr_zlib.c:59: error: expected ‘;’ before ‘strm’
compr_zlib.c:65: error: ‘strm’ undeclared (first use in this function)
compr_zlib.c:68: error: ‘Z_OK’ undeclared (first use in this function)
compr_zlib.c:68: warning: implicit declaration of function ‘deflateInit’
compr_zlib.c:80: warning: implicit declaration of function ‘deflate’
compr_zlib.c:80: error: ‘Z_PARTIAL_FLUSH’ undeclared (first use in thisfunction)
compr_zlib.c:82: warning: implicit declaration of function ‘deflateEnd’
compr_zlib.c:88: error: ‘Z_FINISH’ undeclared (first use in thisfunction)
compr_zlib.c:89: error: ‘Z_STREAM_END’ undeclared (first use in this function)
compr_zlib.c: In function ‘jffs2_zlib_decompress’:
compr_zlib.c:107: error: ‘z_stream’ undeclared (first use in thisfunction)
compr_zlib.c:107: error: expected ‘;’ before ‘strm’
compr_zlib.c:110: error: ‘strm’ undeclared (first use in this function)
compr_zlib.c:113: error: ‘Z_OK’ undeclared (first use in this function)
compr_zlib.c:113: warning: implicit declaration of function ‘inflateInit’
compr_zlib.c:124: warning: implicit declaration of function ‘inflate’
compr_zlib.c:124: error: ‘Z_FINISH’ undeclared (first use in thisfunction)
compr_zlib.c:127: warning: implicit declaration of function ‘inflateEnd’
make[4]: ***[/opt/uclinux-dist-trunk-svn-10648/user/mtd-utils/build-36d8de81049c9c908740b690c664b5bd3703ccd6-host/compr_zlib.o]Error 1
make[4]: Leaving directory`/opt/uclinux-dist-trunk-svn-10648/user/mtd-utils/36d8de81049c9c908740b690c664b5bd3703ccd6'
make[3]: *** [all] Error 2
make[3]: Leaving directory`/opt/uclinux-dist-trunk-svn-10648/user/mtd-utils'
make[2]: *** [mtd-utils] Error 2
make[2]: Leaving directory `/opt/uclinux-dist-trunk-svn-10648/user'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/opt/uclinux-dist-trunk-svn-10648/user'
make: *** [subdirs] Error 1

 







 

 

 

 

 

 

 

 

 

 

 


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值