当前位置: 首页 > java >正文

AOSP编译错误

缺少libncurses.so.5

FAILED: out/target/product/sailfish/obj_arm/RENDERSCRIPT_BITCODE/libclcore.bc_intermediates/rs_element.bc
/bin/bash -c "PWD=/proc/self/cwd prebuilts/clang/host/linux-x86/clang-3289846/bin/clang -Iframeworks/rs/script_api/include -Iexternal/clang/lib/Headers -MD -DRS_VERSION=24 -std=c99 -c -O3 -fno-builtin -emit-llvm -target renderscript32-linux-androideabi -fsigned-char  -Wno-deprecated -Werror  -Werror -Wall -Wextra -Iframeworks/rs/cpu_ref -DRS_DECLARE_EXPIRED_APIS  -x renderscript frameworks/rs/driver/runtime/rs_element.c -o out/target/product/sailfish/obj_arm/RENDERSCRIPT_BITCODE/libclcore.bc_intermediates/rs_element.bc"
prebuilts/clang/host/linux-x86/clang-3289846/bin/clang.real: error while loading shared libraries: libncurses.so.5: cannot open shared object file: No such file or directory
18:29:27 ninja failed with: exit status 1

搜索报错so 

sudo find / -name libncurses.so.5

复制到/usr/lib

sudo cp /home/替换自己的名字/bin/aosp/prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.17-4.8/sysroot/usr/lib/libncurses.so.5  /usr/lib

其他so同样处理,比如缺libtinfo.so.5

FAILED: out/target/product/sailfish/obj_arm/RENDERSCRIPT_BITCODE/libclcore.bc_intermediates/rs_cl.bc
/bin/bash -c "PWD=/proc/self/cwd prebuilts/clang/host/linux-x86/clang-3289846/bin/clang -Iframeworks/rs/script_api/include -Iexternal/clang/lib/Headers -MD -DRS_VERSION=24 -std=c99 -c -O3 -fno-builtin -emit-llvm -target renderscript32-linux-androideabi -fsigned-char  -Wno-deprecated -Werror  -Werror -Wall -Wextra -Iframeworks/rs/cpu_ref -DRS_DECLARE_EXPIRED_APIS  -x renderscript frameworks/rs/driver/runtime/rs_cl.c -o out/target/product/sailfish/obj_arm/RENDERSCRIPT_BITCODE/libclcore.bc_intermediates/rs_cl.bc"
prebuilts/clang/host/linux-x86/clang-3289846/bin/clang.real: error while loading shared libraries: libtinfo.so.5: cannot open shared object file: No such file or directory
18:38:30 ninja failed with: exit status 1

sudo cp /home/jiuliang/bin/aosp/prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.17-4.8/sysroot/usr/lib/libtinfo.so.5  /usr/lib

编译报错:ninja failed with: exit status 137

ninja failed with: exit status 137

检查 : 这个错误通常与内存不足或系统资源限制有关

exit status 137 通常对应于 Linux 的 SIGKILL 信号,这可能是因为系统由于资源限制(如内存)而强制终止了进程。

增加内存:如果你是在虚拟机或资源受限的环境中编译 AOSP,尝试增加可用的内存。

优化编译过程:使用 make 的 -j 参数来限制并行编译的任务数,这可能会减少内存使用。例如,使用 make -j8  可以改成 make -j8

也有可能是分配的线程数量超过了已有的核心数,需要跟虚拟机分配的核心数一致才行

错误:FAILED: out/soong/.intermediates/

FAILED: out/soong/.intermediates/frameworks/base/test-api-stubs-docs/android_common/test-api-stubs-docs-stubs.srcjar out/soong/.intermediates/frameworks/base/test-api-stubs-docs/android_common/test-api-stubs-docs_api.txt out/soong/.intermediates/frameworks/base/test-api-stubs-docs/android_common/test-api-stubs-docs_removed.txt out/soong/.intermediates/frameworks/base/test-api-stubs-docs/android_common/test-api-stubs-docs_annotations.zip out/soong/.intermediates/frameworks/base/test-api-stubs-docs/android_common/api-versions.xml
 

.denapi-lists-docs/android_common/stubsDir && rm -rf "out/soong/.intermediates/frameworks/base/hiddenapi-lists-docs/android_common/srcjars"
Killed
13:47:32 ninja failed with: exit status 1

解决方法:删掉已生成目录

rm -r out/

21:42:19 You are building on a machine with 12.2GB of RAM
21:42:19 
21:42:19 The minimum required amount of free memory is around 16GB,
21:42:19 and even with that, some configurations may not work.
21:42:19 
21:42:19 If you run into segfaults or other errors, try reducing your
21:42:19 -j value.

http://www.xdnf.cn/news/8972.html

相关文章:

  • Linux云计算训练营笔记day16(Linux周期性计划任务、Python)
  • OpenCV (C/C++) 中使用 Sobel 算子进行边缘检测
  • 【读书笔记】《编码:隐匿在计算机软硬件背后的语言》02 门
  • 【杂谈】------使用 __int128 处理超大整数计算
  • Haproxy 基础知识点
  • Halo:一个强大易用的国产开源建站工具
  • kafka实践与C++操作kafka
  • (自用)Java学习-5.14(注册,盐值加密,模糊查询)
  • Vue-模版绑定指令语法/什么是Vue组件
  • 小巧高效的目录索引生成软件
  • 「AR眼镜+智慧应急管理平台+视频联网」——矿山能源数智化转型的“安全之眼”与“效率引擎”
  • ffmpeg转换竖屏(画面是横屏旋转90度的竖屏文件格式)视频到横屏
  • SBT开源构建工具
  • 萤石云实际视频实时接入(生产环境)
  • Milvus分区-分片-段结构详解与最佳实践
  • java写一个简单的冒泡排序
  • 鸿蒙OSUniApp 制作简单的页面跳转与参数传递功能#三方框架 #Uniapp
  • 前端性能优化:如何让网页加载更快?
  • Oracle SHARED POOLRESERVED FREE LIST
  • OWA登录问题分析与解决方案
  • Vite 介绍
  • 【算法提升】牛牛冲钻五 最长无重复子数组 重排字符串 one_day
  • Hive 分桶(Bucketing)深度解析:原理、实战与核心概念对比
  • 水墨色调中国风PPT模版分享
  • 商务风企业公司推广培训计划PPT模版分享
  • IntelliJ IDEA Ultimate修改软件地区使用
  • C++模板与字符串:从入门到精通
  • python打卡day37
  • 云原生架构核心特性详解
  • AI时代新词-提示词、Agent、Chat:AI时代的交互新概念