xiaoqiang9527 发表于 2014-4-19 10:23:53

我的Android4.0编译时报错,貌似镜像里边文件有问题,能不能给重新发份资料

including device/embedsky/tq210/vendorsetup.sh
including device/moto/stingray/vendorsetup.sh
including device/moto/wingray/vendorsetup.sh
including sdk/bash_completion/adb.bash
/bin/bash: bison: command not found

/bin/bash: bison: command not found
/bin/bash: bison: command not found
/bin/bash: bison: command not found
/bin/bash: bison: command not found
/bin/bash: bison: command not found
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=4.0.4
TARGET_PRODUCT=full_tq210
TARGET_BUILD_VARIANT=eng
TARGET_BUILD_TYPE=release
TARGET_BUILD_APPS=
TARGET_ARCH=arm
TARGET_ARCH_VARIANT=armv7-a-neon
HOST_ARCH=x86
HOST_OS=linux
HOST_BUILD_TYPE=release
BUILD_ID=IMM76I
============================================

CPU number is 12
/bin/bash: bison: command not found
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=4.0.4
TARGET_PRODUCT=full_tq210
TARGET_BUILD_VARIANT=eng
TARGET_BUILD_TYPE=release
TARGET_BUILD_APPS=
TARGET_ARCH=arm
TARGET_ARCH_VARIANT=armv7-a-neon
HOST_ARCH=x86
HOST_OS=linux
HOST_BUILD_TYPE=release
BUILD_ID=IMM76I
============================================
build/core/Makefile:25: warning: overriding commands for target `out/target/product/tq210/system/lib/libserial.so'
build/core/base_rules.mk:523: warning: ignoring old commands for target `out/target/product/tq210/system/lib/libserial.so'
build/core/Makefile:25: warning: overriding commands for target `out/target/product/tq210/system/lib/hw/gps.default.so'
build/core/base_rules.mk:523: warning: ignoring old commands for target `out/target/product/tq210/system/lib/hw/gps.default.so'
build/core/Makefile:25: warning: overriding commands for target `out/target/product/tq210/system/lib/hw/sensors.default.so'
build/core/base_rules.mk:523: warning: ignoring old commands for target `out/target/product/tq210/system/lib/hw/sensors.default.so'
build/core/Makefile:25: warning: overriding commands for target `out/target/product/tq210/system/xbin/iwconfig'
build/core/base_rules.mk:523: warning: ignoring old commands for target `out/target/product/tq210/system/xbin/iwconfig'
build/core/Makefile:25: warning: overriding commands for target `out/target/product/tq210/system/xbin/iwlist'
build/core/base_rules.mk:523: warning: ignoring old commands for target `out/target/product/tq210/system/xbin/iwlist'
Install: out/host/linux-x86/framework/jsilver.jar
Copying: out/target/common/obj/JAVA_LIBRARIES/core_intermediates/classes.jar
Install: out/host/linux-x86/bin/dx
host Executable: aapt (out/host/linux-x86/obj/EXECUTABLES/aapt_intermediates/aapt)
Yacc: aidl <= frameworks/base/tools/aidl/aidl_language_y.y
bison -d-o out/host/linux-x86/obj/EXECUTABLES/aidl_intermediates/aidl_language_y.cpp frameworks/base/tools/aidl/aidl_language_y.y
Lex: aidl <= frameworks/base/tools/aidl/aidl_language_l.l
/bin/bash: bison: command not found
target Prebuilt:(out/target/product/tq210/system/usr/share/zoneinfo/zoneinfo.version)
/bin/bash: flex: command not found
make: *** Error 127
make: *** Waiting for unfinished jobs....
make: *** Error 127
Copy: out/host/linux-x86/usr/share/zoneinfo/zoneinfo.dat
/usr/bin/ld: cannot find -lz
collect2: ld returned 1 exit status
make: *** Error 1

xiaoqiang9527 发表于 2014-4-19 10:30:06

我们是在32linux下编译,镜像里的jdk也没有32位的,然后再网上下载的,还没有使用手册,就只能看着视频做,就报这个错Android4.0 刚开始编译就报错

s1005056 发表于 2014-4-21 13:45:19

xiaoqiang9527 发表于 2014-4-19 10:30
我们是在32linux下编译,镜像里的jdk也没有32位的,然后再网上下载的,还没有使用手册,就只能看着视频做, ...

主要是因為/bin/bash: bison: command not found的問題
之後還有很多缺的指令,可以參考http://blog.csdn.net/ithomer/article/details/6977386

這些在官方文件都沒有提及~"~

jyunyen 发表于 2014-5-7 14:47:34

本帖最后由 jyunyen 于 2014-5-7 18:24 编辑

这是我遇到的问题解决办法
我使用的code是TQ210_Android_4.0.4_v1.0.tar和TQ210_Android_4.0.4_v1.0_v1.1.patch

如果遇到The correct version is: Java SE 1.6.无法编译
要进行下列命令修改
$ sudo update-alternatives --config java
$ sudo update-alternatives --config javac
再选择JDK

如果没有则需要自行安装
http://www.oracle.com/technetwork/java/javase/downloads/java-archive-downloads-javase6-419409.html
Download/Installjdk-6u45-linux-x64.bin

===== 错误1 =====
host C++: obbtool <= frameworks/base/tools/obbtool/Main.cpp
:0:0: error: "_FORTIFY_SOURCE" redefined [-Werror]
:0:0: note: this is the location of the previous definition
cc1plus: all warnings being treated as errors

make: *** Error 1

解决办法:
build/core/combo/HOST_linux-x86.mk line 61:

把:
HOST_GLOBAL_CFLAGS += -D_FORTIFY_SOURCE=0
改为:
HOST_GLOBAL_CFLAGS += -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0
参考:http://code.google.com/p/android/issues/detail?id=20795

===== 错误2 =====
make: *** 解决方法:
vim external/mesa3d/src/glsl/linker.cpp
添加:
#include <cstddef>

===== 错误3 =====
make: *** Error 1
解决办法:
external/oprofile/libpp/format_output.h

把:
mutable counts_t & counts;
改为:
counts_t & counts;

===== 错误4 =====
make: *** Error 1

解决办法:
modify this file: external/gtest/include/gtest/internal/gtest-param-util.h

Add this line:
#include <cstddef>

===== 错误5 =====
Error:make: *** Error 1解决办法:
modify this file: external/llvm/llvm-host-build.mk
Add this line:LOCAL_LDLIBS := -lpthread -ldl

===== 错误6 =====
make: *** Error 1

解决办法:
modify this file: frameworks/compile/slang/Android.mk

from
local_cflags_for_slang := -Wno-sign-promo -Wall -Wno-unused-parameter -Werror
to
local_cflags_for_slang := -Wno-sign-promo -Wall -Wno-unused-parameter

===== 错误7 =====
mkimage" command not found
解决办法:
sudo apt-get install uboot-mkimage
页: [1]
查看完整版本: 我的Android4.0编译时报错,貌似镜像里边文件有问题,能不能给重新发份资料