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[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 directory
CMakeFiles/cmTC_ee744.dir/build.make:65: recipe for target 'CMakeFiles/cmTC_ee744.dir/testCCompiler.c.obj' failed
make[1]: *** [CMakeFiles/cmTC_ee744.dir/testCCompiler.c.obj] Error 1
make[1]: Leaving directory '/home/xj/asm/lv_mygui/S5_LVGL/CMakeFiles/CMakeTmp'
Makefile:126: recipe for target 'cmTC_ee744/fast' failed
make: *** [cmTC_ee744/fast] 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 发布!
本文来自博客园,作者:月笼纱,转载请注明原文链接:https://www.cnblogs.com/xjxcxjx/p/18228807,谢绝CSDN转载!
热门相关:新书 呆萌配腹黑:倒追男神1000次 呆萌配腹黑:欢喜小冤家 黄金渔场 穹顶之上