Toggle navigation
首页
问答
文章
积分商城
专家
专区
更多专区...
文档中心
返回主站
搜索
提问
会员
中心
登录
注册
Linux
SCons
scons编译出错
linux 下 scons 报错
发布于 2024-01-03 02:21:04 浏览:779
订阅该版
[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
被浏览
779
关于作者
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
RT-thred的stm32h723对应bsp包CubeMX添加其他外设报错
2
RT-Thread中的time溢出问题,时间戳溢出,解决方法
3
ART-PI使用env驱动ETH网卡,pc和板子可以ping通
4
SystemView线程名字不显示
5
只用网页也能跑RT-Smart 无门槛腾讯Cloud studio + smart-build快速构建
热门标签
RT-Thread Studio
串口
Env
LWIP
SPI
AT
Bootloader
Hardfault
CAN总线
FinSH
ART-Pi
DMA
USB
文件系统
RT-Thread
SCons
RT-Thread Nano
线程
MQTT
STM32
RTC
rt-smart
FAL
I2C_IIC
UART
ESP8266
cubemx
WIZnet_W5500
ota在线升级
PWM
BSP
flash
freemodbus
packages_软件包
潘多拉开发板_Pandora
定时器
ADC
GD32
flashDB
socket
编译报错
中断
Debug
rt_mq_消息队列_msg_queue
keil_MDK
ulog
SFUD
msh
C++_cpp
MicroPython
本月问答贡献
RTT_逍遥
8
个答案
2
次被采纳
三世执戟
8
个答案
1
次被采纳
KunYi
8
个答案
1
次被采纳
winfeng
2
个答案
1
次被采纳
chenyaxing
2
个答案
1
次被采纳
本月文章贡献
catcatbing
2
篇文章
5
次点赞
swet123
1
篇文章
4
次点赞
Days
1
篇文章
4
次点赞
YZRD
1
篇文章
2
次点赞
阳光的掌控者
1
篇文章
1
次点赞
回到
顶部
发布
问题
分享
好友
手机
浏览
扫码手机浏览
投诉
建议
回到
底部