Android AOSP Lollipop构建错误没有sys / types.h

时间:2015-02-19 17:10:31

标签: android cross-compiling android-5.0-lollipop android-source

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

enter PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=5.0.50.50.50.50
TARGET_PRODUCT=full_dory
TARGET_BUILD_VARIANT=userdebug
TARGET_BUILD_TYPE=release
TARGET_BUILD_APPS=
TARGET_ARCH=arm
TARGET_ARCH_VARIANT=armv7-a-neon
TARGET_CPU_VARIANT=cortex-a7
TARGET_2ND_ARCH=
TARGET_2ND_ARCH_VARIANT=
TARGET_2ND_CPU_VARIANT=
HOST_ARCH=x86_64
HOST_OS=linux
HOST_OS_EXTRA=Linux-3.13.0-32-generic-x86_64-with-Ubuntu-14.04-trusty
HOST_BUILD_TYPE=release
BUILD_ID=AOSP
OUT_DIR=out

 find /usr/include -name types.h/usr/include/x86_64-linux-gnu/asm/types.h
/usr/include/x86_64-linux-gnu/bits/types.h
/usr/include/x86_64-linux-gnu/sys/types.h
/usr/include/i386-linux-gnu/asm/types.h
/usr/include/i386-linux-gnu/bits/types.h
/usr/include/i386-linux-gnu/sys/types.h
/usr/include/rpc/types.h
/usr/include/c++/4.8/parallel/types.h
/usr/include/linux/types.h
/usr/include/wx-2.8/wx/types.h
/usr/include/sys/types.h
/usr/include/asm-generic/types.h

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

build/core/base_rules.mk:555: warning: ignoring old commands for target `out/target/product/dory/root/sbin/healthd'
PRODUCT_COPY_FILES system/core/rootdir/init.usb.rc:root/init.usb.rc ignored.
PRODUCT_COPY_FILES system/core/rootdir/init.trace.rc:root/init.trace.rc ignored.
PRODUCT_COPY_FILES system/core/rootdir/ueventd.rc:root/ueventd.rc ignored.
build/core/Makefile:71: warning: overriding commands for target `out/target/product/dory/root/default.prop'
build/core/Makefile:34: warning: ignoring old commands for target `out/target/product/dory/root/default.prop'
No private recovery resources for TARGET_DEVICE dory

prebuilts/clang/linux-x86/host/3.6/bin/clang++ -I external/libcxx/include -I frameworks/base/tools/aapt -I out/host/linux-x86/obj/EXECUTABLES /aapt_intermediates -I out/host/linux-x86/gen/EXECUTABLES/aapt_intermediates -I libnativehelper/include/nativehelper  -isystem system/core/include -isystem hardware/libhardware/include -isystem hardware/libhardware_legacy/include -isystem hardware/ril/include -isystem libnativehelper/include -isystem frameworks/native/include -isystem frameworks/native/opengl/include -isystem frameworks/av/include -isystem frameworks/base/include -isystem tools/include -isystem out/host/linux-x86/obj/include -c    -fno-exceptions -Wno-multichar -m64 -Wa,--noexecstack -fPIC -no-canonical-prefixes -include build/core/combo/include/arch/linux-x86/AndroidConfig.h -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0 -D__STDC_FORMAT_MACROS -D__STDC_CONSTANT_MACROS -DANDROID -fmessage-length=0 -W -Wall -Wno-unused -Winit-self -Wpointer-arith -O2 -g -fno-strict-aliasing -DNDEBUG -UDEBUG  -D__compiler_offsetof=__builtin_offsetof -Werror=int-conversion -Wno-unused-command-line-argument   --gcc-toolchain=prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.15-4.8/    --gcc-toolchain=prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.15-4.8/ --sysroot=prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.15-4.8//sysroot -target x86_64-linux-gnu   -DANDROID -fmessage-length=0 -W -Wall -Wno-unused -Winit-self -Wpointer-arith -Wsign-promo -std=gnu++11 -DNDEBUG -UDEBUG  -Wno-inconsistent-missing-override   --gcc-toolchain=prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.15-4.8/ --sysroot=prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.15-4.8//sysroot -isystem prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.15-4.8//x86_64-linux/include/c++/4.8 -isystem prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.15-4.8//x86_64-linux/include/c++/4.8/x86_64-linux -isystem prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.15-4.8//x86_64-linux/include/c++/4.8/backward -target x86_64-linux-gnu    -DAAPT_VERSION=\"eng.vip.20150219.213147\" -fpie -D_USING_LIBCXX   -nostdinc++  -MD -MF out/host/linux-x86/obj/EXECUTABLES/aapt_intermediates/Main.d -o out/host/linux-x86/obj/EXECUTABLES/aapt_intermediates/Main.o frameworks/base/tools/aapt/Main.cpp

host C++: aapt <= frameworks/base/tools/aapt/Main.cpp
In file included from frameworks/base/tools/aapt/Main.cpp:6:
In file included from frameworks/base/tools/aapt/Main.h:9:
In file included from system/core/include/utils/Log.h:31:
In file included from system/core/include/cutils/log.h:1:
system/core/include/log/log.h:31:10: fatal error: 'sys/types.h' file not found
#include <sys/types.h>
     ^
1 error generated.

它没有提供gcc arm-linux-androideabi-4.9 / bin /和主机clang 3.6我只是下载并复制到目录: gcc arm-linux-androideabi-4.9 我复制并下载到目录。

uname -a Linux vip-Inspiron-N4030 3.13.0-32-generic#57-Ubuntu SMP Tue 7月15日03:51:08 UTC 2014 x86_64 x86_64 x86_64 GNU / Linux

1 个答案:

答案 0 :(得分:1)

使用命令: &#34;制作showcommands&#34; 也适用于目标,例如&#34;制作libdvm showcommands&#34;。

然后我注意到我需要安装gcc: --sysroot = prebuilts / GCC / Linux的86 /主机/ x86_64的-Linux的glibc2.15-4.8 / 从x86_64-linux-glibc2.15-4.8下载然后它可以构建。