Ubuntu1804编译Tiny4412 Android源代码遇到的问题

本文记录了在Ubuntu1804环境下编译Tiny4412Android源代码时遇到的两个主要问题及解决方案。一是编译aidl_language_l.cpp时出现错误,解决办法是设置LC_ALL环境变量为C。二是make过程中liblibc++.so编译失败,通过更换链接器或修改编译配置可解决。
【版权申明】未经博主同意,谢绝转载!(请尊重原创,博主保留追究权) 

Ubuntu1804编译Tiny4412 Android源代码遇到的问题

1. [out/host/linux-x86/obj/EXECUTABLES/aidl_intermediates/aidl_language_l.cpp]

Lex: aidl <= frameworks/base/tools/aidl/aidl_language_l.l
flex-2.5.39: loadlocale.c:130:_nl_intern_locale_data: ?? ‘cnt < (sizeof (_nl_value_type_LC_TIME) / sizeof (_nl_value_type_LC_TIME[0]))’ ???
Export includes file: frameworks/base/tools/aapt/Android.mk – out/host/linux-x86/obj/STATIC_LIBRARIES/libaapt_intermediates/export_includes
Export includes file: frameworks/base/libs/androidfw/Android.mk – out/host/linux-x86/obj/STATIC_LIBRARIES/libandroidfw_intermediates/export_includes
Export includes file: external/libpng/Android.mk – out/host/linux-x86/obj/STATIC_LIBRARIES/libpng_intermediates/export_includes
build/core/binary.mk:646: recipe for target ‘out/host/linux-x86/obj/EXECUTABLES/aidl_intermediates/aidl_language_l.cpp’ failed
make: *** [out/host/linux-x86/obj/EXECUTABLES/aidl_intermediates/aidl_language_l.cpp] Error (core dumped)

解决办法:

#导出环境变量
export LC_ALL=C

2. make: *** [out/host/linux-x86/obj32/lib/libc++.so] Error 1

external/libcxx/src/thread.cpp:133: error: unsupported reloc 43
external/libcxx/src/thread.cpp:133: error: unsupported reloc 43
external/libcxx/include/thread:146: error: unsupported reloc 43
external/libcxx/include/thread:149: error: unsupported reloc 43
external/libcxx/include/thread:149: error: unsupported reloc 43
clang: error: linker command failed with exit code 1 (use -v to see invocation)
build/core/host_shared_library_internal.mk:44: recipe for target ‘out/host/linux-x86/obj32/lib/libc++.so’ failed
make: *** [out/host/linux-x86/obj32/lib/libc++.so] Error 1

解决办法1:

cp /usr/bin/ld.gold prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.11-4.6/x86_64-linux/bin
make update-api
make -j4 # 我也不知道为什么, make不加-j4 会失败.

解决办法2:

# 修改art/build/Android.common_build.mk
# 将
ifneq ($(WITHOUT_HOST_CLANG), true)
# 改为
ifeq ($(WITHOUT_HOST_CLANG), false)
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

安河桥

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值