Ubuntu22.04 编译 android8.1

1. 出现错误

dex2oatd F 12-12 12:13:30 1496912 1496912 utils.cc:762] ANDROID_DATA not set and /data does not exist
Runtime aborting...
Dumping all threads without appropriate locks held: thread list lock mutator lock
All threads:
DALVIK THREADS (0):
"dex2oatd" prio=5 (not attached)
  | sysTid=1496912 nice=0 cgrp=default
  | state=R schedstat=( 27336572 0 1 ) utm=1 stm=0 core=50 HZ=100
  native: #00 pc 00000000004f5539  out/host/linux-x86/lib64/libartd.so (art::DumpNativeStack(std::__1::basic_ostream<char, std::__1::char_traits<char>>&, int, BacktraceMap*, char const*, art::ArtMethod*, void*)+217)

解决方法:

art/runtime/mem_map.cc

MapFileAtAddress

  if (reuse) {
    // reuse means it is okay that it overlaps an existing page mapping.
    // Only use this if you actually made the page reservation yourself.
    CHECK(expected_ptr != nullptr);
    DCHECK(error_msg != nullptr);
    DCHECK(ContainedWithinExistingMap(expected_ptr, byte_count, error_msg))
        << ((error_msg != nullptr) ? *error_msg : std::string());
    flags |= MAP_FIXED;
    //Add begin @{
#if !defined(ART_TARGET)
  } else if (expected_ptr) {
#define MAP_FIXED_NOREPLACE 0x100000
    flags |= MAP_FIXED_NOREPLACE;
#endif
//@}
  }

2. 出现错误

compile error: scripts/dtc/dtc-parser.tab.o:(.bss+0x50): multiple definition of `yylloc'

解决方法:

kernel/scripts/dtc/dtc-parser.tab.c_shipped

-YYLTYPE yylloc;
+//fix compile error: scripts/dtc/dtc-parser.tab.o:(.bss+0x50): multiple definition of `yylloc'
+extern YYLTYPE yylloc;

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值