1,
Checking build tools versions...
build/core/main.mk:76: ************************************************************
build/core/main.mk:77: You are attempting to build on a 32-bit system.
build/core/main.mk:78: Only 64-bit build environments are supported beyond froyo/2.2.
build/core/main.mk:79: ************************************************************
build/core/main.mk:80: *** stop. Stop.
解决方法:
修改build/core/main.mk
#ifneq (64,$(findstring 64,$(build_arch)))
ifneq (i686,$(findstring i686,$(build_arch)))
2,
build/core/base_rules.mk:78: *** Module name: libasound
build/core/base_rules.mk:79: *** Makefile location: external/alsa-lib
build/core/base_rules.mk:80: *
build/core/base_rules.mk:81: * Each module must use a LOCAL_MODULE_TAGS in its
build/core/base_rules.mk:82: * Android.mk. Possible tags declared by a module:
build/core/base_rules.mk:83: *
build/core/base_rules.mk:84: * optional, debug, eng, tests, samples
build/core/base_rules.mk:85: *
build/core/base_rules.mk:86: * If the module is expected to be in all builds
build/core/base_rules.mk:87: * of a product, then it should use the
build/core/base_rules.mk:88: * "optional" tag:
build/core/base_rules.mk:89: *
build/core/base_rules.mk:90: * Add "LOCAL_MODULE_TAGS := optional" in the
build/core/base_rules.mk:91: * Android.mk for the affected module, and add
build/core/base_rules.mk:92: * the LOCAL_MODULE value for that component
build/core/base_rules.mk:93: * into the PRODUCT_PACKAGES section of product
build/core/base_rules.mk:94: * makefile(s) where it's necessary, if
build/core/base_rules.mk:95: * appropriate.
build/core/base_rules.mk:96: *
build/core/base_rules.mk:97: * If the component should be in EVERY build of ALL
build/core/base_rules.mk:98: * products, then add its LOCAL_MODULE value to the
build/core/base_rules.mk:99: * PRODUCT_PACKAGES section of
build/core/base_rules.mk:100: * build/target/product/core.mk
build/core/base_rules.mk:101: *
build/core/base_rules.mk:102: *** user tag detected on new module - user tags are only supported on legacy modules. Stop.
解决方法:
修改hardware/alsa_sound/Android.mk
在android.mk文件中添加 LOCAL_MODULE_TAGS := optional
注意:是在每个 include $(BUILD_SHARED_LIBRARY) 的前面添加LOCAL_MODULE_TAGS := optional
共需要添加四处。
附:
user: 指该模块只在user版本下才编译
eng: 指该模块只在eng版本下才编译
tests: 指该模块只在tests版本下才编译
optional:指该模块在所有版本下都编译
the BUILDTYPE is one of the following:
Buildtype | Use |
---|---|
user | limited access; suited for production |
userdebug | like "user" but with root access and debuggability; preferred for debugging |
eng | development configuration with additional debugging tools |
3,
/usr/include/gnu/stubs.h:9:27: error: gnu/stubs-64.h: No such file or directory
解决方法:
A,编译环境为32位系统的:在external/clearsilver/java-jni/Android.mk 文件中
注译掉这两句:
#LOCAL_CFLAGS += -m64
#LOCAL_LDFLAGS += -m64
B,64位系统+java1.6环境
安装:
apt-get install libc6-dev-amd64
apt-get install g++-multilib lib64stdc++6
apt-get install lib64z1-dev
C,修改你的编译环境 32位+java1.5
4,
Could not load 'clearsilver-jni'
解决方法:
修改以下文件
external/clearsilver/cgi/Android.mk
external/clearsilver/util/Android.mk
external/clearsilver/cs/Android.mk
注译掉这两句:
#LOCAL_CFLAGS += -m64
#LOCAL_LDFLAGS += -m64
5,在imx51 patch_R10.3包中的default.xml文件有:
<project path="external/alsa-lib" name="platform/external/alsa-lib" revision="refs/heads/master" />
<project path="hardware/alsa_sound" name="platform/hardware/alsa_sound" revision="refs/heads/master" />
<project path="external/alsa-utils" name="platform/external/alsa-utils" revision="refs/heads/master" />
<project path="external/mtd-utils" name="platform/external/mtd-utils" revision="refs/heads/master" />
而原来的git地址:./repo init -u git://android.git.kernel.org/platform/manifest.git -bgingerbread 已不能下载了。
现在的下载地下为:repo init -u https://android.googlesource.com/platform/manifest -b android-2.3.4_r1
上面的那些平台相关包:alsa-lib alsa_sound ...都不能下载了。只能用原来android2.2上的。
6,
target arm C++: libaudio <= hardware/alsa_sound/ALSAControl.cpp
target arm C: libasound <= external/alsa-lib/src/alisp/alisp.c
external/alsa-lib/src/alisp/alisp.c: In function 'F_princ':
external/alsa-lib/src/alisp/alisp.c:1716: error: format not a string literal and no format arguments
解决方法:
alisp.c 1716
- snd_output_printf(instance->out, p1->value.s);
+ snd_output_printf(instance->out, "%s", p1->value.s);