TOP_DIR: /home/lyj/seL4_rpi4 App build directory: Configuration start -- Set platform details from PLATFORM=rpi4 -- KernelPlatform: bcm2711 -- KernelARMPlatform: rpi4 -- Found seL4: /home/lyj/seL4_rpi4/kernel -- platform bcm2711 supports multiple architectures, none was given -- defaulting to: aarch64 CMake Error at /home/lyj/seL4_rpi4/build/apps/comm-crypto-relay/gcc.cmake:51 (message): Unable to find valid cross-compiling GCC Call Stack (most recent call first): /home/lyj/seL4_rpi4/build/apps/comm-crypto-relay/gcc.cmake:65 (FindPrefixedGCC) /usr/share/cmake-3.16/Modules/CMakeDetermineSystem.cmake:93 (include) CMakeLists.txt:9 (project) CMake Error: CMake was unable to find a build program corresponding to "Ninja". CMAKE_MAKE_PROGRAM is not set. You probably need to select a different build tool. CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage -- Configuring incomplete, errors occurred! Configuration complete ########################## Build start ninja: Entering directory `/home/lyj/seL4_rpi4/build/apps/comm-crypto-relay' ninja: error: loading 'build.ninja': No such file or directory Build complete ########################## Copy to shared folder: /mnt/d/Resource/tftp cp: 无法获取'/home/lyj/seL4_rpi4/build/apps/comm-crypto-relay/images/*' 的文件状态(stat): 没有那个文件或目录 Copy failed 这段代码哪里错了
时间: 2023-07-29 17:14:38 浏览: 65
这段代码存在多个错误,具体如下:
1. 错误信息:Unable to find valid cross-compiling GCC
这是由于缺少交叉编译工具链导致的。你需要安装适合的交叉编译器,并将其添加到环境变量中,以便 CMake 能够找到它。
2. 错误信息:CMake Error: CMake was unable to find a build program corresponding to "Ninja"
这是由于缺少构建工具 `ninja` 导致的。你需要安装 `ninja` 并将其添加到环境变量中。
3. 错误信息:CMAKE_C_COMPILER not set, after EnableLanguage
这是由于没有设置 C 编译器导致的。你可以通过设置 `CMAKE_C_COMPILER` 环境变量来解决此问题。例如:
```
export CMAKE_C_COMPILER=/path/to/your/c/compiler
```
4. 错误信息:cp: 无法获取'/home/lyj/seL4_rpi4/build/apps/comm-crypto-relay/images/*' 的文件状态(stat): 没有那个文件或目录
这是由于构建过程中没有生成可执行文件导致的。你需要检查构建过程是否出现了其他错误,并确保可执行文件已正确生成。
相关问题
运行时出如下错误CMake Error at /home/lyj/seL4_rpi4/build/apps/comm-crypto-relay/gcc.cmake:51 (message): Unable to find valid cross-compiling GCC Call Stack (most recent call first): /home/lyj/seL4_rpi4/build/apps/comm-crypto-relay/gcc.cmake:65 (FindPrefixedGCC) /usr/share/cmake-3.16/Modules/CMakeDetermineSystem.cmake:93 (include) CMakeLists.txt:9 (project) CMake Error: CMake was unable to find a build program corresponding to "Ninja". CMAKE_MAKE_PROGRAM is not set. You probably need to select a different build tool. CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage -- Configuring incomplete, errors occurred! Configuration complete
这个错误是因为 CMake 找不到交叉编译的 GCC 和 Ninja 工具。你需要先安装交叉编译工具链和 Ninja 工具,然后在 CMake 中指定正确的路径。
你可以尝试执行以下命令来安装 GCC 和 Ninja 工具:
```
sudo apt-get install gcc-arm-linux-gnueabihf
sudo apt-get install ninja-build
```
然后在 CMake 中指定正确的路径,例如:
```
cmake -DCMAKE_TOOLCHAIN_FILE=/path/to/toolchain.cmake -GNinja /path/to/source
```
其中,`/path/to/toolchain.cmake` 是交叉编译工具链的路径,`/path/to/source` 是源代码的路径。
Stack has been installed to: /usr/local/bin/stack WARNING: '/home/lyj/. local/bin' is not on your PATH. Stack will place the binaries it builds in '/home/lyj/. local/bin' so for best results, please add it to the beginning of PATH in your profile.这个问题怎么解决
这个问题的解决方法是将路径 "/home/lyj/.local/bin" 添加到环境变量 PATH 中。
你可以按照以下步骤进行操作:
1. 打开终端,输入以下命令打开 .bashrc 文件:
```
nano ~/.bashrc
```
2. 在文件的最后一行添加以下内容:
```
export PATH=$PATH:/home/lyj/.local/bin
```
3. 按下 Ctrl + X 保存并退出。
4. 输入以下命令使修改生效:
```
source ~/.bashrc
```
完成以上步骤后,再次运行 Stack 命令,应该就不会再出现警告信息了。