Chinaunix首页 | 论坛 | 博客
  • 博客访问: 601499
  • 博文数量: 204
  • 博客积分: 5172
  • 博客等级: 上校
  • 技术积分: 2092
  • 用 户 组: 普通用户
  • 注册时间: 2009-12-08 21:48
个人简介

一个毫无毅力之人的自勉

文章分类

全部博文(204)

文章存档

2014年(1)

2013年(54)

2012年(50)

2011年(94)

2010年(3)

2009年(3)

分类: LINUX

2013-08-01 16:40:00

 1.download Python-2.7.2 and Python-2.7.2-xcompile.patch




其他patch




2.解压Python-2.7.2.tgz

3.进到目录里 ./configure

4.make python Parser/pgen

5.mv python hostpython

6.mv Parser/pgen Parser/hostpgen


7.make
distclean

//如果clean失败,则拷贝出以上两个备份,重新解压代码,再进行下面

8.patch -p1 < Python-2.7.2-xcompile.patch

9.CC=arm-linux-gcc CXX=arm-linux-g++ AR=arm-linux-ar RANLIB=arm-linux-ranlib ./configure --host=arm-linux --build=x86_64-linux-gnu --prefix=`pwd`/_install

10.make HOSTPYTHON=./hostpython HOSTPGEN=./Parser/hostpgen BLDSHARED="arm-linux-gcc -shared" CROSS_COMPILE=arm-linux- CROSS_COMPILE_TARGET=yes HOSTARCH=arm-linux BUILDARCH=x86_64-linux-gnu

11.make install HOSTPYTHON=./hostpython BLDSHARED="arm-linux-gcc -shared" CROSS_COMPILE=arm-linux- CROSS_COMPILE_TARGET=yes prefix=`pwd`/_install








错误:
exit 77 configure: error: C compiler cannot create executables
交叉编译工具链有问题,换一个即可




In file included from build/temp.linux-x86_64-2.7/libffi/include/ffi.h:64,
                 from /home/chengyake/download/Python-2.7.2/Modules/_ctypes/_ctypes.c:112:
build/temp.linux-x86_64-2.7/libffi/include/ffitarget.h:88: error: 'FFI_DEFAULT_ABI' undeclared here (not in a function)

...
host 和 build 搞反了

重申:
host即一般arm
build:一般x86


阅读(4431) | 评论(0) | 转发(0) |
0

上一篇:一篇dbus的实例

下一篇:没有了

给主人留下些什么吧!~~