LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 945|回复: 8

求助:安装zhcon打算解决tty下显示中文问题

[复制链接]
发表于 2009-12-28 12:01:36 | 显示全部楼层 |阅读模式
系统是CentOS 5.4,准备安装zhcon打算解决tty纯命令行下显示中文问题,下了两个包 zhcon-0.2.5.tar.gz和 zhcon.0.2.5-to-0.2.6.diff.gz,最后也 升级zhcon.0.2.5到zhcon.0.2.6,安装执行 ./configure时发现好多信赖性问题:
[root@localhost zhcon-0.2.5]# ./configure
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether to enable maintainer-specific portions of Makefiles... no
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
Linux detected
./configure: line 1902: test: =: unary operator expected
x86 platform detected, compile with VGA support
checking for gawk... (cached) gawk
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking how to run the C preprocessor... gcc -E
checking for g++... no
checking for c++... no
checking for gpp... no
checking for aCC... no
checking for CC... no
checking for cxx... no
checking for cc++... no
checking for cl... no
checking for FCC... no
checking for KCC... no
checking for RCC... no
checking for xlC_r... no
checking for xlC... no
checking whether we are using the GNU C++ compiler... no
checking whether g++ accepts -g... no
checking dependency style of g++... none
checking how to run the C++ preprocessor... /lib/cpp
configure: error: C++ preprocessor "/lib/cpp" fails sanity check
See `config.log' for more details.

问题出现了:
OR GCC:
yum -y install gcc

FOR C++/G++
yum -y install gcc-c++ compat-gcc-32 compat-gcc-32-c++

完成后终于可以./configure了

继续
Config complete, now type make to build zhcon.
Good Luck!
[root@localhost zhcon-0.2.5]# make
make  all-recursive
make[1]: Entering directory `/root/DownSoft/zhcon/zhcon-0.2.5'
Making all in src
make[2]: Entering directory `/root/DownSoft/zhcon/zhcon-0.2.5/src'
Making all in display
make[3]: Entering directory `/root/DownSoft/zhcon/zhcon-0.2.5/src/display'
if g++ -DHAVE_CONFIG_H -I. -I. -I../.. -I../../src    -funsigned-char -O2 -march=i686 -DNDEBUG -Wall -MT fbdev.o -MD -MP -MF ".deps/fbdev.Tpo" -c -o fbdev.o fbdev.cpp; \
        then mv -f ".deps/fbdev.Tpo" ".deps/fbdev.Po"; else rm -f ".deps/fbdev.Tpo"; exit 1; fi
if g++ -DHAVE_CONFIG_H -I. -I. -I../.. -I../../src    -funsigned-char -O2 -march=i686 -DNDEBUG -Wall -MT fblinear15.o -MD -MP -MF ".deps/fblinear15.Tpo" -c -o fblinear15.o fblinear15.cpp; \
        then mv -f ".deps/fblinear15.Tpo" ".deps/fblinear15.Po"; else rm -f ".deps/fblinear15.Tpo"; exit 1; fi
if g++ -DHAVE_CONFIG_H -I. -I. -I../.. -I../../src    -funsigned-char -O2 -march=i686 -DNDEBUG -Wall -MT fblinear16.o -MD -MP -MF ".deps/fblinear16.Tpo" -c -o fblinear16.o fblinear16.cpp; \
        then mv -f ".deps/fblinear16.Tpo" ".deps/fblinear16.Po"; else rm -f ".deps/fblinear16.Tpo"; exit 1; fi
fblinear16.cpp: In member function ‘virtual void FBLinear16::RevRect(int, int, int, int)’:
fblinear16.cpp:89: 警告:‘dest32’ 上的运算结果可能是未定义的
if g++ -DHAVE_CONFIG_H -I. -I. -I../.. -I../../src    -funsigned-char -O2 -march=i686 -DNDEBUG -Wall -MT fblinear24.o -MD -MP -MF ".deps/fblinear24.Tpo" -c -o fblinear24.o fblinear24.cpp; \
        then mv -f ".deps/fblinear24.Tpo" ".deps/fblinear24.Po"; else rm -f ".deps/fblinear24.Tpo"; exit 1; fi
fblinear24.cpp: In member function ‘virtual void FBLinear24::RevRect(int, int, int, int)’:
fblinear24.cpp:139: 警告:‘dest32’ 上的运算结果可能是未定义的
fblinear24.cpp:140: 警告:‘dest32’ 上的运算结果可能是未定义的
fblinear24.cpp:141: 警告:‘dest32’ 上的运算结果可能是未定义的
fblinear24.cpp:144: 警告:‘dest32’ 上的运算结果可能是未定义的
fblinear24.cpp:146: 警告:‘dest16’ 上的运算结果可能是未定义的
fblinear24.cpp:151: 警告:‘dest16’ 上的运算结果可能是未定义的
if g++ -DHAVE_CONFIG_H -I. -I. -I../.. -I../../src    -funsigned-char -O2 -march=i686 -DNDEBUG -Wall -MT fblinear32.o -MD -MP -MF ".deps/fblinear32.Tpo" -c -o fblinear32.o fblinear32.cpp; \
        then mv -f ".deps/fblinear32.Tpo" ".deps/fblinear32.Po"; else rm -f ".deps/fblinear32.Tpo"; exit 1; fi
fblinear32.cpp: In member function ‘virtual void FBLinear32::RevRect(int, int, int, int)’:
fblinear32.cpp:77: 警告:‘dest32’ 上的运算结果可能是未定义的
if g++ -DHAVE_CONFIG_H -I. -I. -I../.. -I../../src    -funsigned-char -O2 -march=i686 -DNDEBUG -Wall -MT fblinear4.o -MD -MP -MF ".deps/fblinear4.Tpo" -c -o fblinear4.o fblinear4.cpp; \
        then mv -f ".deps/fblinear4.Tpo" ".deps/fblinear4.Po"; else rm -f ".deps/fblinear4.Tpo"; exit 1; fi
if g++ -DHAVE_CONFIG_H -I. -I. -I../.. -I../../src    -funsigned-char -O2 -march=i686 -DNDEBUG -Wall -MT fblinear8.o -MD -MP -MF ".deps/fblinear8.Tpo" -c -o fblinear8.o fblinear8.cpp; \
        then mv -f ".deps/fblinear8.Tpo" ".deps/fblinear8.Po"; else rm -f ".deps/fblinear8.Tpo"; exit 1; fi
fblinear8.cpp: In member function ‘virtual void FBLinear8::RevRect(int, int, int, int)’:
fblinear8.cpp:66: 警告:‘dest32’ 上的运算结果可能是未定义的
fblinear8.cpp:70: 警告:‘dest16’ 上的运算结果可能是未定义的
if g++ -DHAVE_CONFIG_H -I. -I. -I../.. -I../../src    -funsigned-char -O2 -march=i686 -DNDEBUG -Wall -MT fbvgaplanes.o -MD -MP -MF ".deps/fbvgaplanes.Tpo" -c -o fbvgaplanes.o fbvgaplanes.cpp; \
        then mv -f ".deps/fbvgaplanes.Tpo" ".deps/fbvgaplanes.Po"; else rm -f ".deps/fbvgaplanes.Tpo"; exit 1; fi
if g++ -DHAVE_CONFIG_H -I. -I. -I../.. -I../../src    -funsigned-char -O2 -march=i686 -DNDEBUG -Wall -MT libggi.o -MD -MP -MF ".deps/libggi.Tpo" -c -o libggi.o libggi.cpp; \
        then mv -f ".deps/libggi.Tpo" ".deps/libggi.Po"; else rm -f ".deps/libggi.Tpo"; exit 1; fi
if gcc -DHAVE_CONFIG_H -I. -I. -I../.. -I../../src    -funsigned-char -O2 -march=i686 -DNDEBUG -Wall -MT lrmi.o -MD -MP -MF ".deps/lrmi.Tpo" -c -o lrmi.o lrmi.c; \
        then mv -f ".deps/lrmi.Tpo" ".deps/lrmi.Po"; else rm -f ".deps/lrmi.Tpo"; exit 1; fi
if g++ -DHAVE_CONFIG_H -I. -I. -I../.. -I../../src    -funsigned-char -O2 -march=i686 -DNDEBUG -Wall -MT vgadev.o -MD -MP -MF ".deps/vgadev.Tpo" -c -o vgadev.o vgadev.cpp; \
        then mv -f ".deps/vgadev.Tpo" ".deps/vgadev.Po"; else rm -f ".deps/vgadev.Tpo"; exit 1; fi
rm -f libdisplay.a
ar cru libdisplay.a fbdev.o fblinear15.o fblinear16.o fblinear24.o fblinear32.o fblinear4.o fblinear8.o fbvgaplanes.o libggi.o lrmi.o vgadev.o
ranlib libdisplay.a
make[3]: Leaving directory `/root/DownSoft/zhcon/zhcon-0.2.5/src/display'
make[3]: Entering directory `/root/DownSoft/zhcon/zhcon-0.2.5/src'
if g++ -DHAVE_CONFIG_H -I. -I. -I..     -funsigned-char -O2 -march=i686 -DNDEBUG -Wall -MT basefont.o -MD -MP -MF ".deps/basefont.Tpo" -c -o basefont.o basefont.cpp; \
        then mv -f ".deps/basefont.Tpo" ".deps/basefont.Po"; else rm -f ".deps/basefont.Tpo"; exit 1; fi
if g++ -DHAVE_CONFIG_H -I. -I. -I..     -funsigned-char -O2 -march=i686 -DNDEBUG -Wall -MT big52gbdecoder.o -MD -MP -MF ".deps/big52gbdecoder.Tpo" -c -o big52gbdecoder.o big52gbdecoder.cpp; \
        then mv -f ".deps/big52gbdecoder.Tpo" ".deps/big52gbdecoder.Po"; else rm -f ".deps/big52gbdecoder.Tpo"; exit 1; fi
if g++ -DHAVE_CONFIG_H -I. -I. -I..     -funsigned-char -O2 -march=i686 -DNDEBUG -Wall -MT big5decoder.o -MD -MP -MF ".deps/big5decoder.Tpo" -c -o big5decoder.o big5decoder.cpp; \
        then mv -f ".deps/big5decoder.Tpo" ".deps/big5decoder.Po"; else rm -f ".deps/big5decoder.Tpo"; exit 1; fi
big5decoder.cpp: In member function ‘virtual bool BIG5Decoder::IsCode2(char)’:
big5decoder.cpp:30: 警告:由于数据类型范围限制,比较结果永远为真
if g++ -DHAVE_CONFIG_H -I. -I. -I..     -funsigned-char -O2 -march=i686 -DNDEBUG -Wall -MT configfile.o -MD -MP -MF ".deps/configfile.Tpo" -c -o configfile.o configfile.cpp; \
        then mv -f ".deps/configfile.Tpo" ".deps/configfile.Po"; else rm -f ".deps/configfile.Tpo"; exit 1; fi
if g++ -DHAVE_CONFIG_H -I. -I. -I..     -funsigned-char -O2 -march=i686 -DNDEBUG -Wall -MT console.o -MD -MP -MF ".deps/console.Tpo" -c -o console.o console.cpp; \
        then mv -f ".deps/console.Tpo" ".deps/console.Po"; else rm -f ".deps/console.Tpo"; exit 1; fi
if g++ -DHAVE_CONFIG_H -I. -I. -I..     -funsigned-char -O2 -march=i686 -DNDEBUG -Wall -MT gb2big5decoder.o -MD -MP -MF ".deps/gb2big5decoder.Tpo" -c -o gb2big5decoder.o gb2big5decoder.cpp; \
        then mv -f ".deps/gb2big5decoder.Tpo" ".deps/gb2big5decoder.Po"; else rm -f ".deps/gb2big5decoder.Tpo"; exit 1; fi
if g++ -DHAVE_CONFIG_H -I. -I. -I..     -funsigned-char -O2 -march=i686 -DNDEBUG -Wall -MT gbdecoder.o -MD -MP -MF ".deps/gbdecoder.Tpo" -c -o gbdecoder.o gbdecoder.cpp; \
        then mv -f ".deps/gbdecoder.Tpo" ".deps/gbdecoder.Po"; else rm -f ".deps/gbdecoder.Tpo"; exit 1; fi
if g++ -DHAVE_CONFIG_H -I. -I. -I..     -funsigned-char -O2 -march=i686 -DNDEBUG -Wall -MT gbkdecoder.o -MD -MP -MF ".deps/gbkdecoder.Tpo" -c -o gbkdecoder.o gbkdecoder.cpp; \
        then mv -f ".deps/gbkdecoder.Tpo" ".deps/gbkdecoder.Po"; else rm -f ".deps/gbkdecoder.Tpo"; exit 1; fi
gbkdecoder.cpp: In member function ‘virtual bool GBKDecoder::IsCode2(char)’:
gbkdecoder.cpp:30: 警告:由于数据类型范围限制,比较结果永远为真
gbkdecoder.cpp: In member function ‘virtual unsigned int GBKDecoder::Index(char, char)’:
gbkdecoder.cpp:36: 警告:由于数据类型范围限制,比较结果永远为真
if g++ -DHAVE_CONFIG_H -I. -I. -I..     -funsigned-char -O2 -march=i686 -DNDEBUG -Wall -MT graphdev.o -MD -MP -MF ".deps/graphdev.Tpo" -c -o graphdev.o graphdev.cpp; \
        then mv -f ".deps/graphdev.Tpo" ".deps/graphdev.Po"; else rm -f ".deps/graphdev.Tpo"; exit 1; fi
if g++ -DHAVE_CONFIG_H -I. -I. -I..     -funsigned-char -O2 -march=i686 -DNDEBUG -Wall -MT hzdecoder.o -MD -MP -MF ".deps/hzdecoder.Tpo" -c -o hzdecoder.o hzdecoder.cpp; \
        then mv -f ".deps/hzdecoder.Tpo" ".deps/hzdecoder.Po"; else rm -f ".deps/hzdecoder.Tpo"; exit 1; fi
if g++ -DHAVE_CONFIG_H -I. -I. -I..     -funsigned-char -O2 -march=i686 -DNDEBUG -Wall -MT jisdecoder.o -MD -MP -MF ".deps/jisdecoder.Tpo" -c -o jisdecoder.o jisdecoder.cpp; \
        then mv -f ".deps/jisdecoder.Tpo" ".deps/jisdecoder.Po"; else rm -f ".deps/jisdecoder.Tpo"; exit 1; fi
if g++ -DHAVE_CONFIG_H -I. -I. -I..     -funsigned-char -O2 -march=i686 -DNDEBUG -Wall -MT kscdecoder.o -MD -MP -MF ".deps/kscdecoder.Tpo" -c -o kscdecoder.o kscdecoder.cpp; \
        then mv -f ".deps/kscdecoder.Tpo" ".deps/kscdecoder.Po"; else rm -f ".deps/kscdecoder.Tpo"; exit 1; fi
if g++ -DHAVE_CONFIG_H -I. -I. -I..     -funsigned-char -O2 -march=i686 -DNDEBUG -Wall -MT main.o -MD -MP -MF ".deps/main.Tpo" -c -o main.o main.cpp; \
        then mv -f ".deps/main.Tpo" ".deps/main.Po"; else rm -f ".deps/main.Tpo"; exit 1; fi
if g++ -DHAVE_CONFIG_H -I. -I. -I..     -funsigned-char -O2 -march=i686 -DNDEBUG -Wall -MT window.o -MD -MP -MF ".deps/window.Tpo" -c -o window.o window.cpp; \
        then mv -f ".deps/window.Tpo" ".deps/window.Po"; else rm -f ".deps/window.Tpo"; exit 1; fi
if g++ -DHAVE_CONFIG_H -I. -I. -I..     -funsigned-char -O2 -march=i686 -DNDEBUG -Wall -MT winime.o -MD -MP -MF ".deps/winime.Tpo" -c -o winime.o winime.cpp; \
        then mv -f ".deps/winime.Tpo" ".deps/winime.Po"; else rm -f ".deps/winime.Tpo"; exit 1; fi
if g++ -DHAVE_CONFIG_H -I. -I. -I..     -funsigned-char -O2 -march=i686 -DNDEBUG -Wall -MT zhcon.o -MD -MP -MF ".deps/zhcon.Tpo" -c -o zhcon.o zhcon.cpp; \
        then mv -f ".deps/zhcon.Tpo" ".deps/zhcon.Po"; else rm -f ".deps/zhcon.Tpo"; exit 1; fi
zhcon.cpp:62:18: 错误:term.h:没有那个文件或目录
zhcon.cpp: In member function ‘void Zhcon::InitTty()’:
zhcon.cpp:444: 错误:‘tgetent’ 在此作用域中尚未声明
zhcon.cpp:455: 错误:‘tgetstr’ 在此作用域中尚未声明
make[3]: *** [zhcon.o] 错误 1
make[3]: Leaving directory `/root/DownSoft/zhcon/zhcon-0.2.5/src'
make[2]: *** [all-recursive] 错误 1
make[2]: Leaving directory `/root/DownSoft/zhcon/zhcon-0.2.5/src'
make[1]: *** [all-recursive] 错误 1
make[1]: Leaving directory `/root/DownSoft/zhcon/zhcon-0.2.5'
make: *** [all] 错误 2
无法继续下去了,请问各位,这是什么原因?难道跟我文件放置的目录有关系?

在网上找了相关原因,说是源有问题,于是查看:../zhcon-0.2.5/src/iconv_string.c这个文件,看文件的前面有没有这两行
代码:
#include "iconv_string.h"
#include <iconv.h>

然后再看一下,../zhcon-0.2.5/src/目录下面有没有iconv_string.h这个文件,再次执行make
又出错误:
[root@localhost src]# vi iconv_string.c
[root@localhost src]# ls iconv_string.h
iconv_string.h
[root@localhost src]# make
Making all in display
make[1]: Entering directory `/root/DownSoft/zhcon/zhcon-0.2.5/src/display'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/root/DownSoft/zhcon/zhcon-0.2.5/src/display'
make[1]: Entering directory `/root/DownSoft/zhcon/zhcon-0.2.5/src'
if g++ -DHAVE_CONFIG_H -I. -I. -I..     -funsigned-char -O2 -march=i686 -DNDEBUG -Wall -MT zhcon.o -MD -MP -MF ".deps/zhcon.Tpo" -c -o zhcon.o zhcon.cpp; \
        then mv -f ".deps/zhcon.Tpo" ".deps/zhcon.Po"; else rm -f ".deps/zhcon.Tpo"; exit 1; fi
zhcon.cpp:62:18: 错误:term.h:没有那个文件或目录
zhcon.cpp: In member function ‘void Zhcon::InitTty()’:
zhcon.cpp:444: 错误:‘tgetent’ 在此作用域中尚未声明
zhcon.cpp:455: 错误:‘tgetstr’ 在此作用域中尚未声明
make[1]: *** [zhcon.o] 错误 1
make[1]: Leaving directory `/root/DownSoft/zhcon/zhcon-0.2.5/src'
make: *** [all-recursive] 错误 1

总算是前进了一些!此次又是什么错误呢?说是没有term.h文件,找了一下,确实没有!
发表于 2009-12-28 18:35:35 | 显示全部楼层
看上去是一些 *-dev 包没装,没编译过 zhcon 自己找一下吧。

或许还是自己给内核打补丁更好一点?

zhcon 是不是太老了,貌似四年多都没有更新了……
回复 支持 反对

使用道具 举报

发表于 2009-12-28 18:51:58 | 显示全部楼层
建议yum install fbterm
回复 支持 反对

使用道具 举报

 楼主| 发表于 2009-12-29 08:25:33 | 显示全部楼层
Post by pingz;2060108
看上去是一些 *-dev 包没装,没编译过 zhcon 自己找一下吧。

或许还是自己给内核打补丁更好一点?

zhcon 是不是太老了,貌似四年多都没有更新了……
是很老了,如果不用它,还有什么办法解决纯命令下显示中文的问题?
回复 支持 反对

使用道具 举报

 楼主| 发表于 2009-12-29 08:28:57 | 显示全部楼层
Post by dgod;2060112
建议yum install fbterm


Fbterm -- 支持显示 UTF-8 字体的纯终端,先看看试试这个
回复 支持 反对

使用道具 举报

发表于 2009-12-29 13:19:15 | 显示全部楼层
先安装ncurses-devel包,然后再./configure就可以了。

另外,现在有0.2.6版本呀,是在0.2.5版本上更新的,可以去看看呀。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2009-12-29 16:32:55 | 显示全部楼层
郁闷,始终未能解决,问题是一波又一波
用yum直接提示无效的包
回复 支持 反对

使用道具 举报

发表于 2009-12-29 17:22:29 | 显示全部楼层
安装光盘里面就有呀。
回复 支持 反对

使用道具 举报

发表于 2009-12-31 00:27:17 | 显示全部楼层
用内核的utf8补丁比较好吧~ 也是fb支持的 zhcon太老了
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表