滑清怡 发表于 2025-6-8 12:26:35

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

怪不得博客园干不过别家,体验真的不太好。通过openwrite发布文章,其他平台都能发布,就博客园限制了,理由是文字少的文章限制发布到该平台。
哎,这种行为当真是扶不起的阿斗。以后也不要太把博客园当回事了,迟早要关门的

报错信息如下:
-- 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/CMakeTmp

                Run Build Command:"/usr/bin/make" "cmTC_ee744/fast"
                /usr/bin/make -f CMakeFiles/cmTC_ee744.dir/build.make CMakeFiles/cmTC_ee744.dir/build
                make: 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 directory
                CMakeFiles/cmTC_ee744.dir/build.make:65: recipe for target 'CMakeFiles/cmTC_ee744.dir/testCCompiler.c.obj' failed
                make: *** Error 1
                make: Leaving directory '/home/xj/asm/lv_mygui/S5_LVGL/CMakeFiles/CMakeTmp'
                Makefile:126: recipe for target 'cmTC_ee744/fast' failed
                make: *** Error 2




        CMake 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发现它在

然后修改了CMakeFile.txt里的这句发现cmake 可以执行了

但是make还是报错

进入这个目录查看下具体文件信息

发现有软连接
查看连接发现

将host/lib里的此文件复制到这里来

在查看软连接发现就有了

然后再重新cmake后再make,可以正常执行了!
本文由博客一文多发平台 OpenWrite 发布!

来源:程序园用户自行投稿发布,如果侵权,请联系站长删除
免责声明:如果侵犯了您的权益,请联系站长,我们会及时删除侵权内容,谢谢合作!

辖瑁地 发表于 2025-11-5 01:51:41

感谢发布原创作品,程序园因你更精彩

倘伟 发表于 2025-12-14 15:57:18

收藏一下   不知道什么时候能用到

郏琼芳 发表于 2025-12-23 23:43:11

分享、互助 让互联网精神温暖你我

羡渥蛛 发表于 2026-1-22 14:40:07

感谢分享,下载保存了,貌似很强大

指陡 发表于 2026-1-23 04:57:27

感谢分享,学习下。

姬宜欣 发表于 2026-1-23 06:39:52

用心讨论,共获提升!

祝娜娜 发表于 2026-1-28 18:01:31

谢谢楼主提供!

姚望舒 发表于 2026-1-29 02:46:01

用心讨论,共获提升!

锦惺 发表于 2026-1-29 06:18:21

谢谢分享,辛苦了

椎蕊 发表于 2026-2-4 04:08:11

感谢,下载保存了

筒濂 发表于 2026-2-4 08:42:49

谢谢楼主提供!

抑卞枯 发表于 2026-2-5 03:12:58

感谢分享,学习下。

纣捎牟 发表于 2026-2-7 21:07:10

感谢分享,学习下。

皇甫佳文 发表于 2026-2-8 02:21:12

不错,里面软件多更新就更好了

泠邸 发表于 2026-2-9 00:41:32

很好很强大我过来先占个楼 待编辑

峰邑 发表于 2026-2-9 19:20:50

很好很强大我过来先占个楼 待编辑

尝琨 发表于 2026-2-10 03:43:14

前排留名,哈哈哈

篁瞑普 发表于 2026-2-10 17:04:24

热心回复!

宗和玉 发表于 2026-2-10 22:31:41

新版吗?好像是停更了吧。
页: [1] 2
查看完整版本: CMakeFile.txt通过sysroot方式后生成makefile报错