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

CMakeFile.txt通过sysroot方式后生成makefile报错

file 报错信息如下:

-- The C compiler identification is unknown
-- The CXX compiler identification is unknown
-- Check for working C compiler: /home/xj/asm/host/bin/aarch64-buildroot-linux-gnu-gcc
-- Check for working C compiler: /home/xj/asm/host/bin/aarch64-buildroot-linux-gnu-gcc -- broken
CMake Error at /usr/share/cmake-3.10/Modules/CMakeTestCCompiler.cmake:52 (message):The C compiler"/home/xj/asm/host/bin/aarch64-buildroot-linux-gnu-gcc"is not able to compile a simple test program.It fails with the following output:Change Dir: /home/xj/asm/lv_mygui/S5_LVGL/CMakeFiles/CMakeTmpRun Build Command:"/usr/bin/make" "cmTC_ee744/fast"/usr/bin/make -f CMakeFiles/cmTC_ee744.dir/build.make CMakeFiles/cmTC_ee744.dir/buildmake[1]: Entering directory '/home/xj/asm/lv_mygui/S5_LVGL/CMakeFiles/CMakeTmp'Building C object CMakeFiles/cmTC_ee744.dir/testCCompiler.c.obj/home/xj/asm/host/bin/aarch64-buildroot-linux-gnu-gcc    -o CMakeFiles/cmTC_ee744.dir/testCCompiler.c.obj   -c /home/xj/asm/lv_mygui/S5_LVGL/CMakeFiles/CMakeTmp/testCCompiler.c/home/xj/asm/host/bin/../libexec/gcc/aarch64-buildroot-linux-gnu/10.3.0/cc1: error while loading shared libraries: libmpfr.so.4: cannot open shared object file: No such file or directoryCMakeFiles/cmTC_ee744.dir/build.make:65: recipe for target 'CMakeFiles/cmTC_ee744.dir/testCCompiler.c.obj' failedmake[1]: *** [CMakeFiles/cmTC_ee744.dir/testCCompiler.c.obj] Error 1make[1]: Leaving directory '/home/xj/asm/lv_mygui/S5_LVGL/CMakeFiles/CMakeTmp'Makefile:126: recipe for target 'cmTC_ee744/fast' failedmake: *** [cmTC_ee744/fast] Error 2CMake will not be able to correctly generate this project.
Call Stack (most recent call first):CMakeLists.txt:18 (project)-- Configuring incomplete, errors occurred!
See also "/home/xj/asm/lv_mygui/S5_LVGL/CMakeFiles/CMakeOutput.log".
See also "/home/xj/asm/lv_mygui/S5_LVGL/CMakeFiles/CMakeError.log".

关键信息: '/home/xj/asm/host/bin/../libexec/gcc/aarch64-buildroot-linux-gnu/10.3.0/cc1: error while loading shared libraries: libmpfr.so.4: cannot open shared object file: No such file or directory'

搜索libmpfr.so.4发现它在 file

然后修改了CMakeFile.txt里的这句发现cmake 可以执行了 file 但是make还是报错 file 进入这个目录查看下具体文件信息 file 发现有软连接 查看连接发现 file 将host/lib里的此文件复制到这里来 file

在查看软连接发现就有了 file

然后再重新cmake后再make,可以正常执行了!

本文由博客一文多发平台 OpenWrite 发布!

http://www.lryc.cn/news/361521.html

相关文章:

  • Python 将Word、Excel、PDF、PPT文档转为OFD文档
  • 【java11】java11新特性之局部变量类型推断升级
  • 遥感卫星影像处理流程
  • 【AR开发-开源框架】使用Sceneform-EQR快速开发AR应用,当前接入了AREngine、ORB-SLAM,可快速地适配不同的安卓设备
  • 学生信息管理系统C++
  • 前端开发三大主流框架解析
  • 【2.文件和目录相关(下)】
  • 【C语言】结构体与内存对齐
  • 【机器学习】之 kmean算法原理及实现
  • 国产高边驱动HD70202Q替换英飞凌BTS7040-2
  • 2024年06月在线IDE流行度最新排名
  • 顺序表和链表基础操作的复习
  • [C#]winform部署官方yolov10目标检测的onnx模型
  • hmcode硬件编程1
  • [C++][CMake] set_target_properties called with incorrect number of arguments
  • AdamW算法
  • 【c++进阶(二)】STL之string类的模拟实现
  • PHPStudy(xp 小皮)V8.1.1 通过cmd进入MySQL命令行模式
  • php反序列化初步了解
  • Windows系统电脑本地部署AI音乐创作工具并实现无公网IP远程使用
  • 玩转Linux进度条
  • 真国色码上赞,科技流量双剑合璧,商家获客新纪元开启
  • C++:特殊类设计和四种类型转换
  • (南京观海微电子)——屏幕材质及优缺点对比
  • uniapp uni.showModal 出现点击没有反应
  • Vue3-VueRouter
  • 【图像处理与机器视觉】频率域滤波
  • python第五次作业
  • JS面向对象编程
  • kotlin1.8.10问题导致gson报错TypeToken type argument must not contain a type variable