|
|
发表于 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 食古不化
借地问一下我的编译错误:
- Configuration:
- Target system: x86_64-pc-linux-gnu
- Source code location: .
- C++ Compiler: x86_64-pc-linux-gnu-g++
- C++ Compiler flags: -O2 -march=k8 -pipe -fomit-frame-pointer -funsigned-char -O2 -DNDEBUG -Wall
- C Compiler: x86_64-pc-linux-gnu-gcc
- C Compiler flags: -O2 -march=k8 -pipe -fomit-frame-pointer -funsigned-char -O2 -DNDEBUG -Wall
- VGA support: no
- gpm moues support: yes
- libggi support: yes
- unicon support: no
- zhcon binary dir: /usr/bin
- zhcon files dir: /usr/lib64/zhcon
- Config complete, now type make to build zhcon.
- Good Luck!
- Making all in src
- Making all in display
- fblinear16.cpp: In member function ‘virtual void FBLinear16::RevRect(int, int, int, int)’:
- fblinear16.cpp:89: warning: operation on ‘dest32’ may be undefined
- fblinear24.cpp: In member function ‘virtual void FBLinear24::RevRect(int, int, int, int)’:
- fblinear24.cpp:139: warning: operation on ‘dest32’ may be undefined
- fblinear24.cpp:140: warning: operation on ‘dest32’ may be undefined
- fblinear24.cpp:141: warning: operation on ‘dest32’ may be undefined
- fblinear24.cpp:144: warning: operation on ‘dest32’ may be undefined
- fblinear24.cpp:146: warning: operation on ‘dest16’ may be undefined
- fblinear24.cpp:151: warning: operation on ‘dest16’ may be undefined
- fblinear8.cpp: In member function ‘virtual void FBLinear8::RevRect(int, int, int, int)’:
- fblinear8.cpp:66: warning: operation on ‘dest32’ may be undefined
- fblinear8.cpp:70: warning: operation on ‘dest16’ may be undefined
- fblinear32.cpp: In member function ‘virtual void FBLinear32::RevRect(int, int, int, int)’:
- fblinear32.cpp:77: warning: operation on ‘dest32’ may be undefined
- big5decoder.cpp: In member function ‘virtual bool BIG5Decoder::IsCode2(char)’:
- big5decoder.cpp:30: warning: comparison is always true due to limited range of data type
- gbkdecoder.cpp: In member function ‘virtual bool GBKDecoder::IsCode2(char)’:
- gbkdecoder.cpp:30: warning: comparison is always true due to limited range of data type
- gbkdecoder.cpp: In member function ‘virtual unsigned int GBKDecoder::Index(char, char)’:
- gbkdecoder.cpp:36: warning: comparison is always true due to limited range of data type
- winime.cpp: In member function ‘int WinIme::MatchWord(char*, int, int)’:
- winime.cpp:166: warning: dereferencing type-punned pointer will break strict-aliasing rules
- winime.cpp: In member function ‘int WinIme::Search(char)’:
- winime.cpp:253: error: cast from ‘char*’ to ‘unsigned int’ loses precision
- winime.cpp:274: error: cast from ‘char*’ to ‘unsigned int’ loses precision
- make[3]: *** [zhcon-winime.o] Error 1
- make[3]: *** Waiting for unfinished jobs....
- make[2]: *** [all-recursive] Error 1
- make[1]: *** [all-recursive] Error 1
- make: *** [all] Error 2
- *
- * ERROR: app-i18n/zhcon-0.2.6 failed.
- * Call stack:
- * ebuild.sh, line 1654: Called dyn_compile
- * ebuild.sh, line 990: Called qa_call 'src_compile'
- * ebuild.sh, line 44: Called src_compile
- * ebuild.sh, line 662: Called die
- *
- * emake failed
- * If you need support, post the topmost build error, and the call stack if relevant.
- * A complete build log is located at '/var/tmp/portage/app-i18n/zhcon-0.2.6/temp/build.log'.
- *
复制代码 |
|