LinuxSir.cn,穿越时空的Linuxsir!

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

有没有人编译过64位的zhcon?介绍一下经验

[复制链接]
发表于 2007-9-18 17:01:31 | 显示全部楼层 |阅读模式
我的GCC是4.2.1,编译时出错了,我想问一下,在编译zhcon之前有没有什么库要先编译?
哪位编译过zhcon介绍一下经验
发表于 2007-9-18 17:04:49 | 显示全部楼层
64 位 zhcon 还有一点问题.就编译个32位的好了. gentoo 版有那个64位的补丁,但用输入法时会退出.

http://www.linuxsir.cn/bbs/showthread.php?t=310832
回复 支持 反对

使用道具 举报

发表于 2007-9-18 17:06:59 | 显示全部楼层
编译过,不过是龙芯上用的.
回复 支持 反对

使用道具 举报

 楼主| 发表于 2007-9-18 17:08:06 | 显示全部楼层
编译zhcon需要哪些库的支持?
回复 支持 反对

使用道具 举报

 楼主| 发表于 2007-9-18 17:10:24 | 显示全部楼层
系统需求
zhcon是一个标准的Linux控制台程序,为了编译和运行zhcon您需要以下软件:

    * 运行内核版本2.2以上的Linux系统(或FreeBSD)。建议在编译内核进加入对FrameBuffer的支持。 GNU C++(gcc).建议使用gcc 2.95.2以上版本。
    * GNU autoconf/automake
    * UNICON&Chinput(可选)
    * libggi(可选)

zhcon的手册上说的内容我都已经有了,还要装些什么东西?
回复 支持 反对

使用道具 举报

发表于 2007-9-18 17:16:59 | 显示全部楼层
  1. cd /sources
  2. tar xvf /CBLFS/zhcon-0.2.5.tar.gz
  3. cd zhcon-0.2.5
  4. zcat /CBLFS/zhcon-0.2.5-to-0.2.6.diff.gz | patch -p1
  5. #cp -a ../zhcon-0.2.5{,-64}
  6. # 32bit
  7. CC="gcc ${BUILD32}" CXX="g++  ${BUILD32}"  \
  8.     ./configure --prefix=/usr --sysconfdir=/etc/zhcon
  9. make
  10. make install
  11. mv -v /usr/bin/zhcon{,-32}

  12. # 这里只编译32位的.
  13. exit

  14. # 64bit
  15. cd ../zhcon-0.2.5-64
  16. zcat /CBLFS/zhcon-0.2.6-amd64.patch.gz | patch -p1
  17. CC="gcc ${BUILD64}" CXX="g++  ${BUILD64}"   \
  18.     ./configure --prefix=/usr --sysconfdir=/etc/zhcon
  19. make
  20. make install

  21. # Linux系统无需修改zhcon.conf,开机启动时是多少分辨率,在zhcon中就是多少分辨率。
  22. # grub引导装载程序 /boot/grub/menu.lst 中添加 vga=791 为1024*768

  23. # zhcon --utf8

  24. # vga=792
  25. #附vga参数表:
  26. #
  27. # VESA buffer console @ 1024x768x64k
  28. #vga = 791
  29. # Normal VGA console
  30. # vga = normal
  31. # VESA buffer console @ 1024x768x64k
  32. # vga=791
  33. # VESA buffer console @ 1024x768x32k
  34. # vga=790
  35. # VESA buffer console @ 1024x768x256
  36. # vga=773
  37. # VESA buffer console @ 800x600x64k
  38. # vga=788
  39. # VESA buffer console @ 800x600x32k
  40. # vga=787
  41. # VESA buffer console @ 800x600x256
  42. # vga=771
  43. # VESA buffer console @ 640x480x64k
  44. # vga=785
  45. # VESA buffer console @ 640x480x32k
  46. # vga=784
  47. # VESA buffer console @ 640x480x256
  48. # vga=769

  49. # BSD系统需要修改配置文件
  50. #修改配置:
  51. #
  52. # cp /usr/etc/zhcon.conf /usr/local/etc/zhcon.conf.myBak
  53. # vim /usr/etc/zhcon.conf
  54. #
  55. #       修改如下部分:
  56. #       #x_resolution = 640
  57. #       #y_resolution = 480
  58. #       x_resolution = 800
  59. #       y_resolution = 600
  60. #
  61. #       #color_depth = 4
  62. #       color_depth = 8
  63. #

  64. #使用UTF-8编码:
  65. #在字符终端模式下:
  66. # zhcon --utf8
复制代码
回复 支持 反对

使用道具 举报

 楼主| 发表于 2007-9-18 17:22:10 | 显示全部楼层
zhcon-0.2.5-to-0.2.6.diff.gz这个包在哪里有下载?刚才google了一下没有找到啊
回复 支持 反对

使用道具 举报

发表于 2007-9-18 17:25:47 | 显示全部楼层
传上来了. 很小.右键 另存为.

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?注册

x
回复 支持 反对

使用道具 举报

 楼主| 发表于 2007-9-18 17:38:21 | 显示全部楼层
编译失败了,下面是以64位方式编译时的错误

  1. gbkdecoder.cpp: In member function 'virtual unsigned int GBKDecoder::Index(char, char)':
  2. gbkdecoder.cpp:36: warning: comparison is always true due to limited range of data type
  3. if g++  -m64 -DHAVE_CONFIG_H -I. -I. -I..     -funsigned-char -O2 -DNDEBUG -Wall -MT graphdev.o -MD -MP -MF ".deps/graphdev.Tpo" -c -o graphdev.o graphdev.cpp;
  4. \
  5.         then mv -f ".deps/graphdev.Tpo" ".deps/graphdev.Po"; else rm -f ".deps/graphdev.Tpo"; exit 1; fi
  6. if g++  -m64 -DHAVE_CONFIG_H -I. -I. -I..     -funsigned-char -O2 -DNDEBUG -Wall -MT hzdecoder.o -MD -MP -MF ".deps/hzdecoder.Tpo" -c -o hzdecoder.o hzdecoder.cpp; \
  7.         then mv -f ".deps/hzdecoder.Tpo" ".deps/hzdecoder.Po"; else rm -f ".deps/hzdecoder.Tpo"; exit 1; fi
  8. if g++  -m64 -DHAVE_CONFIG_H -I. -I. -I..     -funsigned-char -O2 -DNDEBUG -Wall -MT jisdecoder.o -MD -MP -MF ".deps/jisdecoder.Tpo" -c -o jisdecoder.o jisdecoder.cpp; \
  9.         then mv -f ".deps/jisdecoder.Tpo" ".deps/jisdecoder.Po"; else rm -f ".deps/jisdecoder.Tpo"; exit 1; fi
  10. if g++  -m64 -DHAVE_CONFIG_H -I. -I. -I..     -funsigned-char -O2 -DNDEBUG -Wall -MT kscdecoder.o -MD -MP -MF ".deps/kscdecoder.Tpo" -c -o kscdecoder.o kscdecoder.cpp; \
  11.         then mv -f ".deps/kscdecoder.Tpo" ".deps/kscdecoder.Po"; else rm -f ".deps/kscdecoder.Tpo"; exit 1; fi
  12. if g++  -m64 -DHAVE_CONFIG_H -I. -I. -I..     -funsigned-char -O2 -DNDEBUG -Wall -MT main.o -MD -MP -MF ".deps/main.Tpo" -c -o main.o main.cpp; \
  13.         then mv -f ".deps/main.Tpo" ".deps/main.Po"; else rm -f ".deps/main.Tpo"; exit 1; fi
  14. if g++  -m64 -DHAVE_CONFIG_H -I. -I. -I..     -funsigned-char -O2 -DNDEBUG -Wall -MT window.o -MD -MP -MF ".deps/window.Tpo" -c -o window.o window.cpp; \
  15.         then mv -f ".deps/window.Tpo" ".deps/window.Po"; else rm -f ".deps/window.Tpo"; exit 1; fi
  16. if g++  -m64 -DHAVE_CONFIG_H -I. -I. -I..     -funsigned-char -O2 -DNDEBUG -Wall -MT winime.o -MD -MP -MF ".deps/winime.Tpo" -c -o winime.o winime.cpp; \
  17.         then mv -f ".deps/winime.Tpo" ".deps/winime.Po"; else rm -f ".deps/winime.Tpo"; exit 1; fi
  18. winime.cpp: In member function 'int WinIme::MatchWord(char*, int, int)':
  19. winime.cpp:166: warning: dereferencing type-punned pointer will break strict-aliasing rules
  20. winime.cpp: In member function 'int WinIme::Search(char)':
  21. winime.cpp:253: error: cast from 'char*' to 'unsigned int' loses precision
  22. winime.cpp:274: error: cast from 'char*' to 'unsigned int' loses precision
  23. make[3]: *** [winime.o] Error 1
  24. make[3]: Leaving directory `/root/zhcon/zhcon-0.2.5/src'
  25. make[2]: *** [all-recursive] Error 1
  26. make[2]: Leaving directory `/root/zhcon/zhcon-0.2.5/src'
  27. make[1]: *** [all-recursive] Error 1
  28. make[1]: Leaving directory `/root/zhcon/zhcon-0.2.5'
  29. make: *** [all] Error 2
复制代码


以下是32位编译的错误
  1. if gcc -m32 -DHAVE_CONFIG_H -I. -I. -I..     -march=k8 -msse3 -O3 -pipe -funsigned-char -O2 -DNDEBUG -Wall -MT encfilter.o -MD -MP -MF ".deps/encfilter.Tpo" -c
  2. -o encfilter.o encfilter.c; \
  3.         then mv -f ".deps/encfilter.Tpo" ".deps/encfilter.Po"; else rm -f ".deps/encfilter.Tpo"; exit 1; fi
  4. encfilter.c:49:1: warning: "BUFSIZ" redefined
  5. In file included from encfilter.c:35:
  6. /usr/include/stdio.h:108:1: warning: this is the location of the previous definition
  7. encfilter.c: In function 'DoEncodingFilter':
  8. encfilter.c:113: warning: implicit declaration of function 'memcpy'
  9. encfilter.c:113: warning: incompatible implicit declaration of built-in function 'memcpy'
  10. if gcc -m32 -DHAVE_CONFIG_H -I. -I. -I..     -march=k8 -msse3 -O3 -pipe -funsigned-char -O2 -DNDEBUG -Wall -MT iconv_string.o -MD -MP -MF ".deps/iconv_string.Tpo" -c -o iconv_string.o iconv_string.c; \
  11.         then mv -f ".deps/iconv_string.Tpo" ".deps/iconv_string.Po"; else rm -f ".deps/iconv_string.Tpo"; exit 1; fi
  12. iconv_string.c: In function 'iconv_string':
  13. iconv_string.c:77: warning: passing argument 2 of 'iconv' from incompatible pointer type
  14. iconv_string.c:129: warning: passing argument 2 of 'iconv' from incompatible pointer type
  15. if gcc -m32 -DHAVE_CONFIG_H -I. -I. -I..     -march=k8 -msse3 -O3 -pipe -funsigned-char -O2 -DNDEBUG -Wall -MT cmdline.o -MD -MP -MF ".deps/cmdline.Tpo" -c -o cmdline.o cmdline.c; \
  16.         then mv -f ".deps/cmdline.Tpo" ".deps/cmdline.Po"; else rm -f ".deps/cmdline.Tpo"; exit 1; fi
  17. g++  -m32  -funsigned-char -O2 -DNDEBUG -Wall   -o zhcon  basefont.o big52gbdecoder.o big5decoder.o configfile.o console.o gb2big5decoder.o gbdecoder.o gbkdecoder.o graphdev.o hzdecoder.o jisdecoder.o kscdecoder.o main.o window.o winime.o zhcon.o overspotclient.o nativeinputserver.o inputclient.o inputmanager.o inputserver.o candilist.o uniconinputserver.o nativebarclient.o mouse.o encfilter.o iconv_string.o cmdline.o display/libdisplay.a -ldl -lcurses -lutil
  18. mouse.o: In function `Mouse::Process()':
  19. mouse.cpp:(.text+0xb0): undefined reference to `Gpm_GetEvent'
  20. mouse.o: In function `Mouse::Close()':
  21. mouse.cpp:(.text+0x2e1): undefined reference to `Gpm_Close'
  22. mouse.o: In function `Mouse::Open(Console*, int, int, int)':
  23. mouse.cpp:(.text+0x362): undefined reference to `Gpm_Open'
  24. mouse.cpp:(.text+0x36e): undefined reference to `gpm_fd'
  25. mouse.cpp:(.text+0x37b): undefined reference to `Gpm_GetSnapshot'
  26. collect2: ld returned 1 exit status
  27. make[3]: *** [zhcon] Error 1
  28. make[3]: Leaving directory `/root/zhcon/zhcon-0.2.5/src'
  29. make[2]: *** [all-recursive] Error 1
  30. make[2]: Leaving directory `/root/zhcon/zhcon-0.2.5/src'
  31. make[1]: *** [all-recursive] Error 1
  32. make[1]: Leaving directory `/root/zhcon/zhcon-0.2.5'
  33. make: *** [all] Error 2
复制代码
回复 支持 反对

使用道具 举报

 楼主| 发表于 2007-9-18 17:39:13 | 显示全部楼层
我的gpm是以64位方式编译的
回复 支持 反对

使用道具 举报

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

本版积分规则

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