@zifehng
2017-06-26T09:21:41.000000Z
字数 2802
阅读 2331
Ubuntu 16.04
Android 5.0.1
提示缺少sys/types.h
$ make menuconfig
HOSTCC scripts/basic/fixdep
scripts/basic/fixdep.c:106:23: fatal error: sys/types.h: No such file or directory
compilation terminated.
......
安装libc6-dev与libc6-dev-i386
$ sudo apt-get install libc6-dev libc6-dev-i386
提示缺少dialog.h
$ make menuconfig
......
In file included from scripts/kconfig/lxdialog/checklist.c:24:0:
scripts/kconfig/lxdialog/dialog.h:31:20: fatal error: curses.h: No such file or directory
compilation terminated.
......
安装libncurses5-dev
$ sudo apt-get install libnurses5-dev
$ make menuconfig
......
/usr/bin/ld: cannot find -lncurses
/usr/bin/ld: cannot find -ltinfo
collect2: error: ld returned 1 exit status
......
安装lib32ncurses5-dev
$ sudo apt-get install lib32ncurses5-dev
编译mboot时报错
/bin/sh: 1: Syntax error: Missing '))'
重新配置dash,选择no
sudo dpkg-reconfigure dash
Ubuntu安装的时候使用了dash,dash比bash体积小速度快,兼容性高!但是在bash下可以正常运行的一些sh在dash下不能使用,造成了一些麻烦。为了解决之,键入sudo dpkg-reconfigure dash,重新配置dash,并选择“no”,即不使用dash。
make: *** [out/host/linux-x86/obj32/EXECUTABLES/aidl_intermediates/aidl_language_l.cpp] Broken pipe
make: *** Deleting file 'out/host/linux-x86/obj32/EXECUTABLES/aidl_intermediates/aidl_language_l.cpp'
make: *** Waiting for unfinished jobs....
make: *** [out/host/linux-x86/obj32/EXECUTABLES/aidl_intermediates/aidl_language_y.cpp] Broken pipe
$ sudo apt-get install bison
/bin/bash: gperf: command not found
$ sudo apt-get install gperf
xxxxxx: error: unsupported reloc 43
$ make clean
http://stackoverflow.com/questions/36048358/building-android-from-sources-unsupported-reloc-43
make: *** No rule to make target 'external/chromium_org/third_party/angle/.git/index', needed by 'out/target/product/wwt/obj/GYP/shared_intermediates/angle/id/commit.h'. Stop.
external/chromium_org/third_party/angle/src/commit_id.target.linux-arm.mk
external/chromium_org/third_party/angle/src/commit_id.target.linux-arm64.mk
$(gyp_shared_intermediate_dir)/angle/id/commit.h: $(gyp_shared_intermediate_dir)/angle/commit_id.py $(LOCAL_PATH)/third_party/angle/.git/index$(GYP_TARGET_DEPENDENCIES)
--------------------------------------------------------------------------
$(gyp_shared_intermediate_dir)/angle/id/commit.h: $(gyp_shared_intermediate_dir)/angle/commit_id.py #$(LOCAL_PATH)/third_party/angle/.git/index$(GYP_TARGET_DEPENDENCIES)
external/chromium_org/Android.mk
......
ifneq (,$(wildcard $(CHROMIUM_DIR)/GypAndroid.$(HOST_OS)-$(TARGET_ARCH).mk))
......
include $(addsuffix .$(HOST_OS)-$(TARGET_ARCH).mk,$(GYP_MAKEFILE_STEMS))
endif
......
ifneq (,$(wildcard $(CHROMIUM_DIR)/GypAndroid.$(HOST_OS)-$(TARGET_2ND_ARCH).mk))
......
include $(addsuffix .$(HOST_OS)-$(TARGET_2ND_ARCH).mk,$(GYP_MAKEFILE_STEMS))
endif
......
error: unsupported reloc 43
cp /usr/bin/ld.gold prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.11-4.6/x86_64-linux/bin/ld
http://stackoverflow.com/questions/36048358/building-android-from-sources-unsupported-reloc-43