Toggle navigation
首页
问答
文章
积分商城
专家
专区
更多专区...
文档中心
返回主站
搜索
提问
会员
中心
登录
注册
Linux
SCons
scons编译出错
linux 下 scons 报错
发布于 2024-01-03 02:21:04 浏览:618
订阅该版
[tocm] 第一次用 rtt,用的最新 github 上 checkout 的,用了两个linux发行版都会在这里报错。但在 windows 下就能正常跑起来。用的 qemu-vexpress-a9。 但看上去像是系统环境的问题? 这个 `__USE_XOPEN2K8` 是什么条件才会开起来呢?我试了下自己强行 define 也过不去。 ```bash scons: Reading SConscript files ... Newlib version: 2.4.0 scons: done reading SConscript files. scons: Building targets ... scons: building associated VariantDir targets: build CC build/kernel/components/dfs/dfs_v2/filesystems/devfs/devfs.o /home/cyan/rt-thread/components/dfs/dfs_v2/filesystems/devfs/devfs.c: In function 'dfs_devfs_stat': /home/cyan/rt-thread/components/dfs/dfs_v2/filesystems/devfs/devfs.c:479:15: error: 'struct stat' has no member named 'st_mtim'; did you mean 'st_mtime'? st->st_mtim.tv_nsec = vnode->mtime.tv_nsec; ^~ /home/cyan/rt-thread/components/dfs/dfs_v2/filesystems/devfs/devfs.c:480:15: error: 'struct stat' has no member named 'st_mtim'; did you mean 'st_mtime'? st->st_mtim.tv_sec = vnode->mtime.tv_sec; ^~ /home/cyan/rt-thread/components/dfs/dfs_v2/filesystems/devfs/devfs.c:481:15: error: 'struct stat' has no member named 'st_ctim'; did you mean 'st_ctime'? st->st_ctim.tv_nsec = vnode->ctime.tv_nsec; ^~ /home/cyan/rt-thread/components/dfs/dfs_v2/filesystems/devfs/devfs.c:482:15: error: 'struct stat' has no member named 'st_ctim'; did you mean 'st_ctime'? st->st_ctim.tv_sec = vnode->ctime.tv_sec; ^~ /home/cyan/rt-thread/components/dfs/dfs_v2/filesystems/devfs/devfs.c:483:15: error: 'struct stat' has no member named 'st_atim'; did you mean 'st_atime'? st->st_atim.tv_nsec = vnode->atime.tv_nsec; ^~ /home/cyan/rt-thread/components/dfs/dfs_v2/filesystems/devfs/devfs.c:484:15: error: 'struct stat' has no member named 'st_atim'; did you mean 'st_atime'? st->st_atim.tv_sec = vnode->atime.tv_sec; ^~ /home/cyan/rt-thread/components/dfs/dfs_v2/filesystems/devfs/devfs.c:500:19: error: 'struct stat' has no member named 'st_mtim'; did you mean 'st_mtime'? st->st_mtim.tv_nsec = vnode->mtime.tv_nsec; ^~ /home/cyan/rt-thread/components/dfs/dfs_v2/filesystems/devfs/devfs.c:501:19: error: 'struct stat' has no member named 'st_mtim'; did you mean 'st_mtime'? st->st_mtim.tv_sec = vnode->mtime.tv_sec; ^~ /home/cyan/rt-thread/components/dfs/dfs_v2/filesystems/devfs/devfs.c:502:19: error: 'struct stat' has no member named 'st_ctim'; did you mean 'st_ctime'? st->st_ctim.tv_nsec = vnode->ctime.tv_nsec; ^~ /home/cyan/rt-thread/components/dfs/dfs_v2/filesystems/devfs/devfs.c:503:19: error: 'struct stat' has no member named 'st_ctim'; did you mean 'st_ctime'? st->st_ctim.tv_sec = vnode->ctime.tv_sec; ^~ /home/cyan/rt-thread/components/dfs/dfs_v2/filesystems/devfs/devfs.c:504:19: error: 'struct stat' has no member named 'st_atim'; did you mean 'st_atime'? st->st_atim.tv_nsec = vnode->atime.tv_nsec; ^~ /home/cyan/rt-thread/components/dfs/dfs_v2/filesystems/devfs/devfs.c:505:19: error: 'struct stat' has no member named 'st_atim'; did you mean 'st_atime'? st->st_atim.tv_sec = vnode->atime.tv_sec; ^~ scons: *** [build/kernel/components/dfs/dfs_v2/filesystems/devfs/devfs.o] Error 1 scons: building terminated because of errors. ``` 查了下是在 struct_stat.h 里定义的,不知道有没有找错地方。 ```c # ifdef __USE_XOPEN2K8 /* Nanosecond resolution timestamps are stored in a format equivalent to 'struct timespec'. This is the type used whenever possible but the Unix namespace rules do not allow the identifier 'timespec' to appear in the
header. Therefore we have to handle the use of this header in strictly standard-compliant sources special. */ struct timespec st_atim; /* Time of last access. */ struct timespec st_mtim; /* Time of last modification. */ struct timespec st_ctim; /* Time of last status change. */ # define st_atime st_atim.tv_sec /* Backward compatibility. */ # define st_mtime st_mtim.tv_sec # define st_ctime st_ctim.tv_sec # else __time_t st_atime; /* Time of last access. */ __syscall_ulong_t st_atimensec; /* Nscecs of last access. */ __time_t st_mtime; /* Time of last modification. */ __syscall_ulong_t st_mtimensec; /* Nsecs of last modification. */ __time_t st_ctime; /* Time of last status change. */ __syscall_ulong_t st_ctimensec; /* Nsecs of last status change. */ # endif ```
查看更多
2
个回答
默认排序
按发布时间排序
RTT_逍遥
认证专家
2024-01-03
https://github.com/supperthomas
https://club.rt-thread.org/ask/article/d25fb0a88165f166.html 试试codespace
bernard
2024-01-03
这家伙很懒,什么也没写!
`scons --menuconfg` 保存下配置,从新生成rtconfig.h后再试试?以及还包括,也可以看看默认的配置是什么。如果是smart,需要使用对应的工具链的。如果是一般的arm-none-eabi工具链,就不用打开smart选项
撰写答案
登录
注册新账号
关注者
0
被浏览
618
关于作者
cyancat
这家伙很懒,什么也没写!
提问
1
回答
0
被采纳
0
关注TA
发私信
相关问题
1
scons不支持python3吗?
2
编译又出现问题
3
BSP目录下做好一个项目后,怎么把发给别人的包裁剪的小...
4
为什么重新scons --target=mdk 后,以前在MDK工程里保存的C文
5
Scons 添加Group,SConscript已经执行,源码却没有添加进工程
6
scons如何指定输出目录?
7
新人求助。
8
想用env 工具自己构建编译环境想用vscode 进行一些简单程序
9
关于scons脚本问题
10
使用scons --target=makefile的问题
推荐文章
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
次被采纳
张世争
8
个答案
2
次被采纳
rv666
5
个答案
2
次被采纳
用户名由3_15位
11
个答案
1
次被采纳
KunYi
6
个答案
1
次被采纳
本月文章贡献
程序员阿伟
5
篇文章
2
次点赞
hhart
3
篇文章
4
次点赞
大龄码农
1
篇文章
2
次点赞
ThinkCode
1
篇文章
1
次点赞
Betrayer
1
篇文章
1
次点赞
回到
顶部
发布
问题
分享
好友
手机
浏览
扫码手机浏览
投诉
建议
回到
底部