cce2k能在64位系统下运行吗?

系统安装、升级讨论
版面规则
我们都知道新人的确很菜,也喜欢抱怨,并且带有浓厚的Windows习惯,但既然在这里询问,我们就应该有责任帮助他们解决问题,而不是直接泼冷水、简单的否定或发表对解决问题没有任何帮助的帖子。乐于分享,以人为本,这正是Ubuntu的精神所在。
回复
smilinger
帖子: 8
注册时间: 2007-08-02 14:39

cce2k能在64位系统下运行吗?

#1

帖子 smilinger » 2010-11-09 20:22

我想安装cce2k,使用论坛里arkansas_ubuntu提供的修改过的安装包,编译、安装都正常,但是运行的时候提示段错误(Segmentation Fault)。
请问有谁知道是什么原因吗?我的系统是Ubuntu 10.10 64位,是不是cce的源代码不支持64位的原因?需要对源代码再进行修改吗?
头像
arkansas_ubuntu
帖子: 56
注册时间: 2010-05-18 10:00

Re: cce2k能在64位系统下运行吗?

#2

帖子 arkansas_ubuntu » 2010-11-13 12:46

你好,我是在32位下的环境编译、运行通过的。我手头上没有64位的Linux机器。六月就有个网友给我发站内短信问是否只针对32位机器,现在随着64位机器的普及,看来这是个要解决的问题。我搜索了一下网络发现两个比较有针对性的网页,应该很有帮助,连接如下:
http://www.cyberciti.biz/tips/compile-3 ... linux.html
How to compile a 32-bit application using gcc on the 64-bit Linux version
by VIVEK GITE · 17 COMMENTS
I had to compile a 32-bit application using GNU gcc on the 64-bit version Linux.

Luckily gcc man page directed me to -m32 and -m64 option. These options generate code for a 32-bit or 64-bit environments.

=> The 32-bit environment sets int, long and pointer to 32 bits and generates code that runs on any i386 system.

=> The 64-bit environment sets int to 32 bits and long and pointer to 64 bits and generates code for AMD's x86-64 architecture.

You can pass -m64 or -m32 as follows
For 32 bit version:
$ gcc -m32 -o output32 hello.c

For 64 bit version :
$ gcc -m64 -o output64 hello.c

And output is :
$ ./output32

Output:

Long int size is 4 bytes long!
Now let us see 64 bit output:
$ ./output64

Long int size is 8 bytes long!
Sample code - hello.c:

#include <stdio.h>
int main(){
long z; printf("Long int size is %i bytes long!\n", sizeof(z)); return 0;
}
第二个针对性的网页:
http://stackoverflow.com/questions/2500 ... lain-the-a

这里有重要的一句摘录:
As we know 64 bit processors are backward compatible with 32 bit processors. So, that also wouldn't be a problem. The problem arises because of differences in system calls & call mechanism in 64-bit OS & 32-bit OS.

因为我没有可以尝试的环境,还请你参照这两篇文章,无论成功与否把现象如上一帖一样发在这里,每个人的尝试和结果都很重要。人多力量大!你说呢?
Ubuntu论坛中的PLMM数目比Linux下的病毒数目还少,所以
就不用想了,如果你真的碰上了,恭喜,请执行以下命令:
sudo mount -t french /dev/mouth0 /mnt/kiss
french这个参数可以用man kiss查到。别忘了umount,否则
buffer内的数据会丢失。
回复