报错信息如下:
-- 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 发布!