LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
楼主: tawangwuhen

Gentoo console 中文化----zhcon问题(基本解决)

[复制链接]
发表于 2007-8-20 00:04:42 | 显示全部楼层
这个是源代码本身的问题了,也就是upstream的问题
你的emerge --info呢
回复 支持 反对

使用道具 举报

发表于 2007-8-20 11:40:41 | 显示全部楼层
  1. # emerge --info
  2. Portage 2.1.3.6 (default-linux/amd64/2007.0/desktop, gcc-4.2.0, glibc-2.6.1-r0, 2.6.22-gentoo-r4 x86_64)
  3. =================================================================
  4. System uname: 2.6.22-gentoo-r4 x86_64 AMD Athlon(tm) 64 X2 Dual Core Processor 3600+
  5. Gentoo Base System release 1.12.10
  6. Timestamp of tree: Sun, 19 Aug 2007 09:30:01 +0000
  7. ccache version 2.4 [enabled]
  8. dev-java/java-config: 1.3.7, 2.0.33-r1
  9. dev-lang/python:     2.4.4-r4
  10. dev-python/pycrypto: 2.0.1-r6
  11. dev-util/ccache:     2.4-r7
  12. sys-apps/sandbox:    1.2.18.1
  13. sys-devel/autoconf:  2.13, 2.61-r1
  14. sys-devel/automake:  1.4_p6, 1.5, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10
  15. sys-devel/binutils:  2.15.92.0.2-r10, 2.16.1-r3, 2.17-r1, 2.17.50.0.18
  16. sys-devel/gcc-config: 1.3.16
  17. sys-devel/libtool:   1.5.24
  18. virtual/os-headers:  2.6.22-r2
  19. ACCEPT_KEYWORDS="amd64 ~amd64"
  20. AUTOCLEAN="yes"
  21. CBUILD="x86_64-pc-linux-gnu"
  22. CFLAGS="-O2 -march=k8 -pipe -fomit-frame-pointer"
  23. CHOST="x86_64-pc-linux-gnu"
  24. CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/X11/xkb /usr/share/config"
  25. CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/terminfo /etc/texmf/web2c"
  26. CXXFLAGS="-O2 -march=k8 -pipe -fomit-frame-pointer"
  27. DISTDIR="/usr/portage/distfiles"
  28. FEATURES="autoaddcvs ccache cvs distlocks metadata-transfer parallel-fetch sandbox sfperms strict unmerge-orphans userfetch"
  29. GENTOO_MIRRORS="http://61.135.158.199  http://mirror.gentoo.gr.jp http://ftp.twaren.net/Linux/Gentoo/ http://ftp.gentoo.or.kr/ http://ftp.isu.edu.tw/pub/Linux/Gentoo http://mirrors.acm.cs.rpi.edu/gentoo/ http://adelie.polymtl.ca/ http://distfiles.gentoo.org "
  30. LANG="zh_CN.UTF-8"
  31. LC_ALL="en_US.UTF-8"
  32. LDFLAGS="-Wl,-O1"
  33. LINGUAS="zh_CN zh en"
  34. MAKEOPTS="-s -j3"
  35. PKGDIR="/usr/portage/packages"
  36. PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --filter=H_**/files/digest-*"
  37. PORTAGE_TMPDIR="/var/tmp"
  38. PORTDIR="/usr/portage"
  39. PORTDIR_OVERLAY="/usr/portage/local/layman/gentoo-china /usr/portage/local/layman/sabayon /usr/portage/local/layman/berkano /usr/local/portage"
  40. SYNC="rsync://61.135.158.199/gentoo-portage"
  41. USE="3dnow X acc accessibility acl acpi alsa amd64 apache2 ati audiofile avi bash-completion berkdb bitmap-fonts cairo cdr cjk cli cracklib crypt cups dbus divx4linux dri dvd dvdr dvdread eds emboss encode evo fam firefox flash foomaticdb fortran gcc gdbm gif gimp glitz gphoto2 gpm gstreamer gtk gtk2 hal iconv imagemagick ipv6 isdnlog jpeg jpeg2k kerberos ldap libwww mad midi mikmod ming mmx mng mp3 mpeg mplayer mudflap multislot mutitarget mysql ncurses nls nptl nptlonly nsplugin ogg opengl openmp pam pcre pdf perl php png pppd python qt qt3 qt3support qt4 quicktime radeon readline reflection samba scanner sdl session smp spell spl sse sse2 ssl svg tcpd threads tidy tiff truetype truetype-fonts type1-fonts unicode usb vorbis wmf x264 xml xml2 xorg xprint xv xvid zh_CN zlib" ALSA_CARDS="ALC861 MCP55 hda-intel" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" ELIBC="glibc" INPUT_DEVICES="keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="zh_CN zh en" USERLAND="GNU" VIDEO_CARDS="ati radeon fglrx"
  42. Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
复制代码
回复 支持 反对

使用道具 举报

发表于 2007-8-20 14:01:04 | 显示全部楼层
我的不是amd64的系统
我这里无法重现你的问题,
回复 支持 反对

使用道具 举报

发表于 2007-8-20 14:28:26 | 显示全部楼层
Post by ProgramFan
to abcbuzhiming:
Linux 下的几乎所有命令都支持中文,放心好了。你所需要做的是输入这些中文的文件名,这个 zhcon 也带了,包含拼音、五笔,二笔等。


借问一下,zhcon下输入法要怎么切换,现在只懂得调个拼音出来,我用五笔
回复 支持 反对

使用道具 举报

发表于 2007-8-20 14:52:47 | 显示全部楼层
Post by 雕啸长空
借问一下,zhcon下输入法要怎么切换,现在只懂得调个拼音出来,我用五笔
这个问题改设置文件就能解决的吧。/etc/zhcon.conf
回复 支持 反对

使用道具 举报

发表于 2007-8-20 15:27:01 | 显示全部楼层
Post by zhou3345
这个问题改设置文件就能解决的吧。/etc/zhcon.conf
刚才man了一下,有这样一句:
CTRL_ALT_1 - CTRL_ALT_9: switch to input method 1 to 9
在/etc/zhcon这样写着:
#the first ime is the default ime when press CTRL_SPACE
#only the first nine imes are avaiable to zhcon
然后修改了.zhconrc,输入法部份改为:
ime = 五笔,,input/wb.mb,gb2312,native
ime = 智能拼音,cce_pinyin.so,cce,gb2312,unicon

默认输入法改成了五笔了,但ctrl_alt+1 to 9按下后似乎无效,有点晕乎了...
回复 支持 反对

使用道具 举报

发表于 2007-8-20 15:32:39 | 显示全部楼层
Post by 雕啸长空

默认输入法改成了五笔了,但ctrl_alt+1 to 9按下后似乎无效,有点晕乎了...
是啊,这点我也没摸清头绪。因为用zhcon的机会很少,也没去管它。
雕兄弟一直在ubuntu.org.cn很活跃的吧:)
回复 支持 反对

使用道具 举报

发表于 2007-8-20 15:45:51 | 显示全部楼层
嘿嘿,我喜欢灌水
回复 支持 反对

使用道具 举报

发表于 2007-8-20 15:54:36 | 显示全部楼层
这个问题是zhcon编程没有考虑64位兼容性的原因,我这里也出现了
我是先用ebuild命令把zhcon unpack后
进入/var/tmp/portage/目录下找到zhcon的源代码,里面winime.cpp的253和274两行里
把unsigned int改成unsigned long

然后用ebuild的merge命令,就可以编译安装了

这个错误出现的原因是在64位系统下,指针是64位长,unsigned int是32位的,其实保证在32位和64位系统下指针转换不出问题,都应该用unsigned long,因为long在32位系统和64位系统下分别是32位和64位。

Post by 食古不化
借地问一下我的编译错误:
  1. Configuration:
  2.     Target system:             x86_64-pc-linux-gnu
  3.     Source code location:      .
  4.     C++ Compiler:              x86_64-pc-linux-gnu-g++
  5.     C++ Compiler flags:        -O2 -march=k8 -pipe -fomit-frame-pointer -funsigned-char -O2 -DNDEBUG -Wall
  6.     C   Compiler:              x86_64-pc-linux-gnu-gcc
  7.     C   Compiler flags:        -O2 -march=k8 -pipe -fomit-frame-pointer -funsigned-char -O2 -DNDEBUG -Wall
  8.     VGA support:               no
  9.     gpm moues support:         yes
  10.     libggi support:            yes
  11.     unicon support:            no
  12.     zhcon binary dir:          /usr/bin
  13.     zhcon files dir:           /usr/lib64/zhcon

  14. Config complete, now type make to build zhcon.
  15. Good Luck!
  16. Making all in src
  17. Making all in display
  18. fblinear16.cpp: In member function ‘virtual void FBLinear16::RevRect(int, int, int, int)’:
  19. fblinear16.cpp:89: warning: operation on ‘dest32’ may be undefined
  20. fblinear24.cpp: In member function ‘virtual void FBLinear24::RevRect(int, int, int, int)’:
  21. fblinear24.cpp:139: warning: operation on ‘dest32’ may be undefined
  22. fblinear24.cpp:140: warning: operation on ‘dest32’ may be undefined
  23. fblinear24.cpp:141: warning: operation on ‘dest32’ may be undefined
  24. fblinear24.cpp:144: warning: operation on ‘dest32’ may be undefined
  25. fblinear24.cpp:146: warning: operation on ‘dest16’ may be undefined
  26. fblinear24.cpp:151: warning: operation on ‘dest16’ may be undefined
  27. fblinear8.cpp: In member function ‘virtual void FBLinear8::RevRect(int, int, int, int)’:
  28. fblinear8.cpp:66: warning: operation on ‘dest32’ may be undefined
  29. fblinear8.cpp:70: warning: operation on ‘dest16’ may be undefined
  30. fblinear32.cpp: In member function ‘virtual void FBLinear32::RevRect(int, int, int, int)’:
  31. fblinear32.cpp:77: warning: operation on ‘dest32’ may be undefined
  32. big5decoder.cpp: In member function ‘virtual bool BIG5Decoder::IsCode2(char)’:
  33. big5decoder.cpp:30: warning: comparison is always true due to limited range of data type
  34. gbkdecoder.cpp: In member function ‘virtual bool GBKDecoder::IsCode2(char)’:
  35. gbkdecoder.cpp:30: warning: comparison is always true due to limited range of data type
  36. gbkdecoder.cpp: In member function ‘virtual unsigned int GBKDecoder::Index(char, char)’:
  37. gbkdecoder.cpp:36: warning: comparison is always true due to limited range of data type
  38. winime.cpp: In member function ‘int WinIme::MatchWord(char*, int, int)’:
  39. winime.cpp:166: warning: dereferencing type-punned pointer will break strict-aliasing rules
  40. winime.cpp: In member function ‘int WinIme::Search(char)’:
  41. winime.cpp:253: error: cast from ‘char*’ to ‘unsigned int’ loses precision
  42. winime.cpp:274: error: cast from ‘char*’ to ‘unsigned int’ loses precision
  43. make[3]: *** [zhcon-winime.o] Error 1
  44. make[3]: *** Waiting for unfinished jobs....
  45. make[2]: *** [all-recursive] Error 1
  46. make[1]: *** [all-recursive] Error 1
  47. make: *** [all] Error 2
  48. *
  49. * ERROR: app-i18n/zhcon-0.2.6 failed.
  50. * Call stack:
  51. *   ebuild.sh, line 1654:   Called dyn_compile
  52. *   ebuild.sh, line 990:   Called qa_call 'src_compile'
  53. *   ebuild.sh, line 44:   Called src_compile
  54. *   ebuild.sh, line 662:   Called die
  55. *
  56. * emake failed
  57. * If you need support, post the topmost build error, and the call stack if relevant.
  58. * A complete build log is located at '/var/tmp/portage/app-i18n/zhcon-0.2.6/temp/build.log'.
  59. *
复制代码
回复 支持 反对

使用道具 举报

发表于 2007-8-20 17:46:04 | 显示全部楼层
顺手就做个补丁了
回复 支持 反对

使用道具 举报

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

本版积分规则

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