Toggle navigation
首页
问答
文章
积分商城
专家
专区
更多专区...
文档中心
返回主站
搜索
提问
会员
中心
登录
注册
编译问题
基于v5.0 qemu-virt64-aarch64编译失败
发布于 2023-05-06 18:53:15 浏览:526
订阅该版
下载最新的v5.0版本qemu-virt64-aarch64编译失败,没有做任何修改,现象如下 ##配置问题如下 ```c mt@mt:~/work/rt-thread/bsp/qemu-virt64-aarch64$ scons --menuconfig scons: Reading SConscript files ... scons: Entering directory `/home/mt/work/rt-thread/tools/kconfig-frontends' scons: Reading SConscript files ... scons: done reading SConscript files. scons: Building targets ... scons: `.' is up to date. scons: done building targets. Cloning into '/home/mt/.env/packages/packages'... remote: Enumerating objects: 19424, done. remote: Counting objects: 100% (73/73), done. remote: Compressing objects: 100% (56/56), done. remote: Total 19424 (delta 27), reused 46 (delta 17), pack-reused 19351 Receiving objects: 100% (19424/19424), 3.40 MiB | 4.17 MiB/s, done. Resolving deltas: 100% (10505/10505), done. Cloning into '/home/mt/.env/tools/scripts'... remote: Enumerating objects: 1975, done. remote: Counting objects: 100% (578/578), done. remote: Compressing objects: 100% (199/199), done. remote: Total 1975 (delta 398), reused 533 (delta 377), pack-reused 1397 Receiving objects: 100% (1975/1975), 2.49 MiB | 3.11 MiB/s, done. Resolving deltas: 100% (1326/1326), done. Kconfig:3:warning: environment variable BSP_ROOT undefined Kconfig:8:warning: environment variable RTT_ROOT undefined /home/mt/.env/packages/packages/security/mbedtls/Kconfig:10:error: recursive dependency detected! For a resolution refer to Documentation/kbuild/kconfig-language.txt subsection "Kconfig recursive dependency limitations" /home/mt/.env/packages/packages/security/mbedtls/Kconfig:10: symbol PKG_USING_MBEDTLS depends on RT_USING_SAL For a resolution refer to Documentation/kbuild/kconfig-language.txt subsection "Kconfig recursive dependency limitations" ../..//components/net/sal/Kconfig:1: symbol RT_USING_SAL is selected by RT_USING_POSIX_SOCKET For a resolution refer to Documentation/kbuild/kconfig-language.txt subsection "Kconfig recursive dependency limitations" ../..//components/libc/posix/Kconfig:29: symbol RT_USING_POSIX_SOCKET is selected by PKG_USING_MBEDTLS *** End of the configuration. *** Execute 'make' to start the build or try 'make help'. ``` ##编译报错如下 ```c mt@mt:~/work/rt-thread/bsp/qemu-virt64-aarch64$ scons --verbose scons: Reading SConscript files ... scons: done reading SConscript files. scons: Building targets ... scons: building associated VariantDir targets: build aarch64-none-elf-gcc -o build/applications/console.o -c -march=armv8-a -mtune=cortex-a53 -ftree-vectorize -ffast-math -funwind-tables -fno-strict-aliasing -Wall -Wno-cpp -std=gnu99 -fdiagnostics-color=always -O0 -gdwarf-2 -D__RTTHREAD__ -I. -Idrivers -Iapplications -I/home/mt/work/rt-thread/include -I/home/mt/work/rt-thread/libcpu/aarch64/common -I/home/mt/work/rt-thread/libcpu/aarch64/cortex-a -I/home/mt/work/rt-thread/components/finsh -I/home/mt/work/rt-thread/components/drivers/include -I/home/mt/work/rt-thread/components/drivers/virtio -I/home/mt/work/rt-thread/components/drivers/fdt/inc -I/home/mt/work/rt-thread/components/drivers/fdt/src/libfdt -I/home/mt/work/rt-thread/components/drivers/fdt/libfdt -I/home/mt/work/rt-thread/components/libc/posix/delay -I/home/mt/work/rt-thread/components/libc/posix/io/termios -I/home/mt/work/rt-thread/components/libc/posix/io/stdio -I/home/mt/work/rt-thread/components/libc/posix/io/poll -I/home/mt/work/rt-thread/components/libc/posix/ipc -I/home/mt/work/rt-thread/components/libc/compilers/common/include -I/home/mt/work/rt-thread/components/dfs/dfs_v1/include -I/home/mt/work/rt-thread/components/dfs/dfs_v1/filesystems/elmfat -I/home/mt/work/rt-thread/components/dfs/dfs_v1/filesystems/romfs -I/home/mt/work/rt-thread/components/dfs/dfs_v1/filesystems/devfs -I/home/mt/work/rt-thread/components/utilities/libadt -I/home/mt/work/rt-thread/components/utilities/resource -I/home/mt/work/rt-thread/components/mm applications/console.c aarch64-none-elf-gcc -o build/applications/graphic.o -c -march=armv8-a -mtune=cortex-a53 -ftree-vectorize -ffast-math -funwind-tables -fno-strict-aliasing -Wall -Wno-cpp -std=gnu99 -fdiagnostics-color=always -O0 -gdwarf-2 -D__RTTHREAD__ -I. -Idrivers -Iapplications -I/home/mt/work/rt-thread/include -I/home/mt/work/rt-thread/libcpu/aarch64/common -I/home/mt/work/rt-thread/libcpu/aarch64/cortex-a -I/home/mt/work/rt-thread/components/finsh -I/home/mt/work/rt-thread/components/drivers/include -I/home/mt/work/rt-thread/components/drivers/virtio -I/home/mt/work/rt-thread/components/drivers/fdt/inc -I/home/mt/work/rt-thread/components/drivers/fdt/src/libfdt -I/home/mt/work/rt-thread/components/drivers/fdt/libfdt -I/home/mt/work/rt-thread/components/libc/posix/delay -I/home/mt/work/rt-thread/components/libc/posix/io/termios -I/home/mt/work/rt-thread/components/libc/posix/io/stdio -I/home/mt/work/rt-thread/components/libc/posix/io/poll -I/home/mt/work/rt-thread/components/libc/posix/ipc -I/home/mt/work/rt-thread/components/libc/compilers/common/include -I/home/mt/work/rt-thread/components/dfs/dfs_v1/include -I/home/mt/work/rt-thread/components/dfs/dfs_v1/filesystems/elmfat -I/home/mt/work/rt-thread/components/dfs/dfs_v1/filesystems/romfs -I/home/mt/work/rt-thread/components/dfs/dfs_v1/filesystems/devfs -I/home/mt/work/rt-thread/components/utilities/libadt -I/home/mt/work/rt-thread/components/utilities/resource -I/home/mt/work/rt-thread/components/mm applications/graphic.c aarch64-none-elf-gcc -o build/applications/mnt.o -c -march=armv8-a -mtune=cortex-a53 -ftree-vectorize -ffast-math -funwind-tables -fno-strict-aliasing -Wall -Wno-cpp -std=gnu99 -fdiagnostics-color=always -O0 -gdwarf-2 -D__RTTHREAD__ -I. -Idrivers -Iapplications -I/home/mt/work/rt-thread/include -I/home/mt/work/rt-thread/libcpu/aarch64/common -I/home/mt/work/rt-thread/libcpu/aarch64/cortex-a -I/home/mt/work/rt-thread/components/finsh -I/home/mt/work/rt-thread/components/drivers/include -I/home/mt/work/rt-thread/components/drivers/virtio -I/home/mt/work/rt-thread/components/drivers/fdt/inc -I/home/mt/work/rt-thread/components/drivers/fdt/src/libfdt -I/home/mt/work/rt-thread/components/drivers/fdt/libfdt -I/home/mt/work/rt-thread/components/libc/posix/delay -I/home/mt/work/rt-thread/components/libc/posix/io/termios -I/home/mt/work/rt-thread/components/libc/posix/io/stdio -I/home/mt/work/rt-thread/components/libc/posix/io/poll -I/home/mt/work/rt-thread/components/libc/posix/ipc -I/home/mt/work/rt-thread/components/libc/compilers/common/include -I/home/mt/work/rt-thread/components/dfs/dfs_v1/include -I/home/mt/work/rt-thread/components/dfs/dfs_v1/filesystems/elmfat -I/home/mt/work/rt-thread/components/dfs/dfs_v1/filesystems/romfs -I/home/mt/work/rt-thread/components/dfs/dfs_v1/filesystems/devfs -I/home/mt/work/rt-thread/components/utilities/libadt -I/home/mt/work/rt-thread/components/utilities/resource -I/home/mt/work/rt-thread/components/mm applications/mnt.c In file included from /home/mt/work/rt-thread/components/libc/compilers/common/include/sys/time.h:18, from /home/mt/work/rt-thread/components/libc/compilers/common/include/sys/select.h:17, from /usr/tools/aarch64-none-elf/aarch64-none-elf/include/sys/types.h:50, from /usr/tools/aarch64-none-elf/aarch64-none-elf/include/sys/_default_fcntl.h:210, from /usr/tools/aarch64-none-elf/aarch64-none-elf/include/sys/fcntl.h:4, from /usr/tools/aarch64-none-elf/aarch64-none-elf/include/fcntl.h:1, from /home/mt/work/rt-thread/components/dfs/dfs_v1/include/dfs.h:19, from /home/mt/work/rt-thread/components/dfs/dfs_v1/include/dfs_fs.h:14, from applications/mnt.c:14: /usr/tools/aarch64-none-elf/aarch64-none-elf/include/time.h:56:1: error: unknown type name 'clock_t' 56 | clock_t clock (void); | ^~~~~~~ /usr/tools/aarch64-none-elf/aarch64-none-elf/include/time.h:30:1: note: 'clock_t' is defined in header '
'; did you forget to '#include
'? 29 | #include
+++ |+#include
30 | /home/mt/work/rt-thread/components/libc/compilers/common/include/sys/time.h:56:5: error: unknown type name 'suseconds_t' 56 | suseconds_t tv_usec; /* and microseconds */ | ^~~~~~~~~~~ /home/mt/work/rt-thread/components/libc/compilers/common/include/sys/time.h:141:20: error: unknown type name 'clockid_t' 141 | int clock_getres (clockid_t clockid, struct timespec *res); | ^~~~~~~~~ /home/mt/work/rt-thread/components/libc/compilers/common/include/sys/time.h:142:20: error: unknown type name 'clockid_t' 142 | int clock_gettime (clockid_t clockid, struct timespec *tp); | ^~~~~~~~~ /home/mt/work/rt-thread/components/libc/compilers/common/include/sys/time.h:143:20: error: unknown type name 'clockid_t' 143 | int clock_settime (clockid_t clockid, const struct timespec *tp); | ^~~~~~~~~ /home/mt/work/rt-thread/components/libc/compilers/common/include/sys/time.h:144:21: error: unknown type name 'clockid_t' 144 | int clock_nanosleep(clockid_t clockid, int flags, const struct timespec *rqtp, struct timespec *rmtp); | ^~~~~~~~~ scons: *** [build/applications/mnt.o] Error 1 scons: building terminated because of errors. ``` ##gcc版本 ```c mt@mt:~/work/rt-thread/bsp/qemu-virt64-aarch64$ aarch64-none-elf-gcc --version aarch64-none-elf-gcc (Arm GNU Toolchain 12.2.Rel1 (Build arm-12.24)) 12.2.1 20221205 Copyright (C) 2022 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. ```
查看更多
张世争
2023-05-09
学以致用
用这边版本: `gcc-arm-10.2-2020.11-x86_64-aarch64-none-elf.tar.xz`,可以正常的编译通过 [https://armkeil.blob.core.windows.net/developer/Files/downloads/gnu-a/10.2-2020.11/binrel/gcc-arm-10.2-2020.11-x86_64-aarch64-none-elf.tar.xz](https://armkeil.blob.core.windows.net/developer/Files/downloads/gnu-a/10.2-2020.11/binrel/gcc-arm-10.2-2020.11-x86_64-aarch64-none-elf.tar.xz) - 去 ARM 官方下载 [https://developer.arm.com/downloads/-/gnu-a](https://developer.arm.com/downloads/-/gnu-a) - 编译前,设置一下环境变量 ```c #!/bin/bash export RTT_CC=gcc export RTT_EXEC_PATH=/home/rtt/linux/tools/gcc-arm-10.2-2020.11-x86_64-aarch64-none-elf/bin export RTT_CC_PREFIX=aarch64-none-elf- export PATH=$PATH:$RTT_EXEC_PATH echo "CC => ${RTT_CC}" echo "PREFIX => ${RTT_CC_PREFIX}" echo "EXEC_PATH => ${RTT_EXEC_PATH}" ```
3
个回答
默认排序
按发布时间排序
hanbing123
2023-05-08
这家伙很懒,什么也没写!
问题得到暂时性解决,更换编译器:https://club.rt-thread.org/ask/article/c8f554c757b28e3e.html
bernard
2023-05-06
这家伙很懒,什么也没写!
重新生成下rtconfig.h后试试
撰写答案
登录
注册新账号
关注者
0
被浏览
526
关于作者
hanbing123
这家伙很懒,什么也没写!
提问
1
回答
1
被采纳
0
关注TA
发私信
相关问题
1
C++编译问题 undefined reference to `_exit'
2
BSP首次使用编译不过
3
去使能posix编译不过
4
关于scons编译的问题
5
s3c2440使用env自带的交叉编译工具链可以吗
6
RT-Thread Studio编译问题
7
移植正点原子SD卡驱动问题
8
FT400代码编译不过
9
ART-Pi-smart 编译不过
10
文档中新手例程编译问题
推荐文章
1
RT-Thread应用项目汇总
2
玩转RT-Thread系列教程
3
国产MCU移植系列教程汇总,欢迎查看!
4
机器人操作系统 (ROS2) 和 RT-Thread 通信
5
五分钟玩转RT-Thread新社区
6
【技术三千问】之《玩转ART-Pi》,看这篇就够了!干货汇总
7
关于STM32H7开发板上使用SDIO接口驱动SD卡挂载文件系统的问题总结
8
STM32的“GPU”——DMA2D实例详解
9
RT-Thread隐藏的宝藏之completion
10
【ART-PI】RT-Thread 开启RTC 与 Alarm组件
最新文章
1
使用百度AI助手辅助编写一个rt-thread下的ONVIF设备发现功能的功能代码
2
RT-Thread 发布 EtherKit开源以太网硬件!
3
rt-thread使用cherryusb实现虚拟串口
4
《C++20 图形界面程序:速度与渲染效率的双重优化秘籍》
5
《原子操作:程序世界里的“最小魔法单位”解析》
热门标签
RT-Thread Studio
串口
Env
LWIP
SPI
AT
Bootloader
Hardfault
CAN总线
FinSH
ART-Pi
USB
DMA
文件系统
RT-Thread
SCons
RT-Thread Nano
线程
MQTT
STM32
RTC
FAL
rt-smart
ESP8266
I2C_IIC
WIZnet_W5500
ota在线升级
UART
PWM
cubemx
freemodbus
flash
packages_软件包
BSP
潘多拉开发板_Pandora
定时器
ADC
GD32
flashDB
socket
中断
Debug
编译报错
msh
SFUD
keil_MDK
rt_mq_消息队列_msg_queue
at_device
ulog
C++_cpp
本月问答贡献
踩姑娘的小蘑菇
7
个答案
3
次被采纳
a1012112796
13
个答案
2
次被采纳
张世争
9
个答案
2
次被采纳
rv666
5
个答案
2
次被采纳
用户名由3_15位
11
个答案
1
次被采纳
本月文章贡献
程序员阿伟
7
篇文章
2
次点赞
hhart
3
篇文章
4
次点赞
大龄码农
1
篇文章
2
次点赞
ThinkCode
1
篇文章
1
次点赞
Betrayer
1
篇文章
1
次点赞
回到
顶部
发布
问题
分享
好友
手机
浏览
扫码手机浏览
投诉
建议
回到
底部