Chinaunix首页 | 论坛 | 博客
  • 博客访问: 188011
  • 博文数量: 50
  • 博客积分: 1053
  • 博客等级: 少尉
  • 技术积分: 577
  • 用 户 组: 普通用户
  • 注册时间: 2009-12-05 22:55
文章分类

全部博文(50)

文章存档

2016年(2)

2015年(1)

2014年(6)

2012年(11)

2011年(22)

2010年(5)

2009年(3)

我的朋友

分类: LINUX

2011-03-29 21:16:11

[转]解决Android编译中的32/64位问题 ….

android 2010-10-17 17:35:21 阅读340 评论0  字号:大中小 订阅
编译错误如下:
root@zmhot88-laptop:/work/android/src# make
============================================
PLATFORM_VERSION_CODENAME=AOSP
PLATFORM_VERSION=AOSP
TARGET_PRODUCT=generic
TARGET_BUILD_VARIANT=eng
TARGET_SIMULATOR=
TARGET_BUILD_TYPE=release
TARGET_BUILD_APPS=
TARGET_ARCH=arm
HOST_ARCH=x86
HOST_OS=linux
HOST_BUILD_TYPE=release
BUILD_ID=OPENMASTER
============================================
Checking build tools versions...
build/core/main.mk:72: ************************************************************
build/core/main.mk:73: You are attempting to build on a 32-bit system.
build/core/main.mk:74: Only 64-bit build environments are supported beyond froyo/2.2.
build/core/main.mk:75: ************************************************************
build/core/main.mk:76: *** stop.  Stop.


解决方案:
To solve the issue due to sun-java6-sdk, just comment all:

> #    LOCAL_CFLAGS += -m64
> #    LOCAL_LDFLAGS += -m64
>
> in files:
> ./external/clearsilver/cgi/Android.mk
> ./external/clearsilver/java-jni/Android.mk
> ./external/clearsilver/util/Android.mk
> ./external/clearsilver/cs/Android.mk
>
> or change 64 to 32

====================================================

[ANDROID 問題] 64-BIT ENVIRONMENT REQUIRED WHEN CHECKING BUILD TOOL VERSIONS
If you meet following errors below when you try to build your source code:

 

Checking build tools versions...
build/core/main.mk:72:
************************************************************
build/core/main.mk:73: You are attempting to build on a 32-bit
system.
build/core/main.mk:74: Only 64-bit build environments are supported
beyond froyo/2.2.
build/core/main.mk:75:
************************************************************

 

 

Don’t panic, just change the code marked red in

 

build/core/main.mk

 

        ifeq ($(BUILD_OS),linux)
build_arch := $(shell uname -m) 
---ifneq (64,$(findstring 64,$(build_arch))) 
+++ifneq (i686,$(findstring i686,$(build_arch)))
$(warning
************************************************************)
$(warning You are attempting to build on a 32-bit system.)
$(warning Only 64-bit build environments are supported beyond
froyo/2.2.)

 

(--- means delete that line, +++ means add that line)

 
a
and change the code in four mk files below from “+=-m64” to “+=-m32”

 

external/clearsilver/cgi/Android.mk
external/clearsilver/java-jni/Android.mk
external/clearsilver/util/Android.mk
external/clearsilver/cs/Android.mk

       

LOCAL_CFLAGS += -m32
LOCAL_LDFLAGS += -m32

 

I met this problem when trying to build the source code downloaded from Google directly.

阅读(1584) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~