Toggle navigation
首页
问答
文章
积分商城
专家
专区
更多专区...
文档中心
返回主站
搜索
提问
会员
中心
登录
注册
RT-Thread一般讨论
gnu GCC【9-2019-q4-major】编译rtt工程出错
发布于 2020-05-26 14:57:54 浏览:1600
订阅该版
1,操作系统版本:RT-Thread 3.0.4 2,`arm-none-eabi-gcc (GNU Tools for ARM Embedded Processors) 5.4.1 20160919 (release) [ARM/embedded-5-branch revision 240496]` 这个版本编译rtt工程成功; 3,`arm-none-eabi-gcc (GNU Tools for Arm Embedded Processors 9-2019-q4-major) 9.2.1 20191025 (release) [ARM/arm-9-branch revision 277599]` 这个版本编译rtt工程,出现很多错误。细节如下: ``` scons: Building targets ... scons: building associated VariantDir targets: build CC build\applications\main.o CC build\applications\msh_evm.o CC build\applications omfs.o In file included from rt-thread\include/libc/libc_signal.h:81, from rt-thread\include/rtlibc.h:35, from rt-thread\include/rtdef.h:1068, from rt-thread\include/rtthread.h:37, from applications\main.c:25: d:\360downloads\tools\env_rtt\tools\gnu_gcc\arm_gcc\mingw\arm-none-eabi\include\sys\signal.h:42:7: error: redefinition of 'union sigval' 42 | union sigval { | ^~~~~~ In file included from rt-thread\include/rtlibc.h:35, from rt-thread\include/rtdef.h:1068, from rt-thread\include/rtthread.h:37, from applications\main.c:25: rt-thread\include/libc/libc_signal.h:41:7: note: originally defined here 41 | union sigval | ^~~~~~ In file included from rt-thread\include/libc/libc_signal.h:81, from rt-thread\include/rtlibc.h:35, from rt-thread\include/rtdef.h:1068, from rt-thread\include/rtthread.h:37, from applications\main.c:25: d:\360downloads\tools\env_rtt\tools\gnu_gcc\arm_gcc\mingw\arm-none-eabi\include\sys\signal.h:47:8: error: redefinition of 'struct sigevent' 47 | struct sigevent { | ^~~~~~~~ In file included from rt-thread\include/rtlibc.h:35, from rt-thread\include/rtdef.h:1068, from rt-thread\include/rtthread.h:37, from applications\main.c:25: rt-thread\include/libc/libc_signal.h:49:8: note: originally defined here 49 | struct sigevent | ^~~~~~~~ In file included from rt-thread\include/libc/libc_signal.h:81, from rt-thread\include/rtlibc.h:35, from rt-thread\include/rtdef.h:1068, from rt-thread\include/rtthread.h:37, from applications\main.c:25: d:\360downloads\tools\env_rtt\tools\gnu_gcc\arm_gcc\mingw\arm-none-eabi\include\sys\signal.h:72:3: error: conflicting types for 'siginfo_t' 72 | } siginfo_t; | ^~~~~~~~~ In file included from rt-thread\include/rtlibc.h:35, from rt-thread\include/rtdef.h:1068, from rt-thread\include/rtthread.h:37, from applications\main.c:25: rt-thread\include/libc/libc_signal.h:68:24: note: previous declaration of 'siginfo_t' was here 68 | typedef struct siginfo siginfo_t; | ^~~~~~~~~ In file included from rt-thread\include/libc/libc_signal.h:81, from rt-thread\include/rtlibc.h:35, from rt-thread\include/rtdef.h:1068, from rt-thread\include/rtthread.h:37, from applications\msh_evm.c:25: d:\360downloads\tools\env_rtt\tools\gnu_gcc\arm_gcc\mingw\arm-none-eabi\include\sys\signal.h:42:7: error: redefinition of 'union sigval' 42 | union sigval { | ^~~~~~ In file included from rt-thread\include/rtlibc.h:35, from rt-thread\include/rtdef.h:1068, from rt-thread\include/rtthread.h:37, from applications\msh_evm.c:25: rt-thread\include/libc/libc_signal.h:41:7: note: originally defined here 41 | union sigval | ^~~~~~ In file included from rt-thread\include/libc/libc_signal.h:81, from rt-thread\include/rtlibc.h:35, from rt-thread\include/rtdef.h:1068, from rt-thread\include/rtthread.h:37, from applications\msh_evm.c:25: d:\360downloads\tools\env_rtt\tools\gnu_gcc\arm_gcc\mingw\arm-none-eabi\include\sys\signal.h:47:8: error: redefinition of 'struct sigevent' 47 | struct sigevent { | ^~~~~~~~ In file included from rt-thread\include/rtlibc.h:35, from rt-thread\include/rtdef.h:1068, from rt-thread\include/rtthread.h:37, from applications\msh_evm.c:25: rt-thread\include/libc/libc_signal.h:49:8: note: originally defined here 49 | struct sigevent | ^~~~~~~~ In file included from rt-thread\include/libc/libc_signal.h:81, from rt-thread\include/rtlibc.h:35, from rt-thread\include/rtdef.h:1068, from rt-thread\include/rtthread.h:37, from applications\msh_evm.c:25: d:\360downloads\tools\env_rtt\tools\gnu_gcc\arm_gcc\mingw\arm-none-eabi\include\sys\signal.h:72:3: error: conflicting types for 'siginfo_t' 72 | } siginfo_t; | ^~~~~~~~~ In file included from rt-thread\include/rtlibc.h:35, from rt-thread\include/rtdef.h:1068, from rt-thread\include/rtthread.h:37, from applications\msh_evm.c:25: rt-thread\include/libc/libc_signal.h:68:24: note: previous declaration of 'siginfo_t' was here 68 | typedef struct siginfo siginfo_t; | ^~~~~~~~~ In file included from rt-thread\include/libc/libc_signal.h:81, from rt-thread\include/rtlibc.h:35, from rt-thread\include/rtdef.h:1068, from rt-thread\include/rtthread.h:37, from applications omfs.c:2: d:\360downloads\tools\env_rtt\tools\gnu_gcc\arm_gcc\mingw\arm-none-eabi\include\sys\signal.h:42:7: error: redefinition of 'union sigval' ```
查看更多
7
个回答
默认排序
按发布时间排序
baili_shanghai
2020-05-26
这家伙很懒,什么也没写!
编译log续: ``` 42 | union sigval { | ^~~~~~ In file included from rt-thread\include/rtlibc.h:35, from rt-thread\include/rtdef.h:1068, from rt-thread\include/rtthread.h:37, from applications\romfs.c:2: rt-thread\include/libc/libc_signal.h:41:7: note: originally defined here 41 | union sigval | ^~~~~~ In file included from rt-thread\include/libc/libc_signal.h:81, from rt-thread\include/rtlibc.h:35, from rt-thread\include/rtdef.h:1068, from rt-thread\include/rtthread.h:37, from applications\romfs.c:2: d:\360downloads\tools\env_rtt\tools\gnu_gcc\arm_gcc\mingw\arm-none-eabi\include\sys\signal.h:47:8: error: redefinition of 'struct sigevent' 47 | struct sigevent { | ^~~~~~~~ In file included from rt-thread\include/rtlibc.h:35, from rt-thread\include/rtdef.h:1068, from rt-thread\include/rtthread.h:37, from applications\romfs.c:2: rt-thread\include/libc/libc_signal.h:49:8: note: originally defined here 49 | struct sigevent | ^~~~~~~~ In file included from rt-thread\include/libc/libc_signal.h:81, from rt-thread\include/rtlibc.h:35, from rt-thread\include/rtdef.h:1068, from rt-thread\include/rtthread.h:37, from applications\romfs.c:2: d:\360downloads\tools\env_rtt\tools\gnu_gcc\arm_gcc\mingw\arm-none-eabi\include\sys\signal.h:72:3: error: conflicting types for 'siginfo_t' 72 | } siginfo_t; | ^~~~~~~~~ In file included from rt-thread\include/rtlibc.h:35, from rt-thread\include/rtdef.h:1068, from rt-thread\include/rtthread.h:37, from applications\romfs.c:2: rt-thread\include/libc/libc_signal.h:68:24: note: previous declaration of 'siginfo_t' was here 68 | typedef struct siginfo siginfo_t; | ^~~~~~~~~ scons: *** [build\applications\romfs.o] Error 1 CC build\beken378\app\app.o applications\main.c: In function 'main': applications\main.c:99:5: warning: implicit declaration of function 'player_codec_helixmp3_register' [-Wimplicit-function-declaration] 99 | player_codec_helixmp3_register(); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ applications\main.c:100:5: warning: implicit declaration of function 'player_codec_beken_aac_register' [-Wimplicit-function-declaration] 100 | player_codec_beken_aac_register(); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ applications\main.c:101:5: warning: implicit declaration of function 'player_codec_beken_m4a_register' [-Wimplicit-function-declaration] 101 | player_codec_beken_m4a_register(); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~s cons: *** [build\applications\msh_evm.o] Error 1 applications\main.c:102:5: warning: implicit declaration of function 'player_codec_opencore_amr_register' [-Wimplicit-function-declaration] 102 | player_codec_opencore_amr_register(); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ applications\main.c:108:2: warning: implicit declaration of function 'rt_hw_wdg_start' [-Wimplicit-function-declaration] 108 | rt_hw_wdg_start(0,NULL); | ^~~~~~~~~~~~~~~ scons: *** [build\applications\main.o] Error 1 In file included from rt-thread\include/libc/libc_signal.h:81, from rt-thread\include/rtlibc.h:35, from rt-thread\include/rtdef.h:1068, from rt-thread\include/rtthread.h:37, from rt-thread\include/rthw.h:32, from beken378\driver\entry/arch.h:45, from beken378\common/include.h:9, from beken378\app\app.c:11: d:\360downloads\tools\env_rtt\tools\gnu_gcc\arm_gcc\mingw\arm-none-eabi\include\sys\signal.h:42:7: error: redefinition of 'union sigval' 42 | union sigval { | ^~~~~~ In file included from rt-thread\include/rtlibc.h:35, from rt-thread\include/rtdef.h:1068, from rt-thread\include/rtthread.h:37, from rt-thread\include/rthw.h:32, from beken378\driver\entry/arch.h:45, from beken378\common/include.h:9, from beken378\app\app.c:11: rt-thread\include/libc/libc_signal.h:41:7: note: originally defined here 41 | union sigval | ^~~~~~ In file included from rt-thread\include/libc/libc_signal.h:81, from rt-thread\include/rtlibc.h:35, from rt-thread\include/rtdef.h:1068, from rt-thread\include/rtthread.h:37, from rt-thread\include/rthw.h:32, from beken378\driver\entry/arch.h:45, from beken378\common/include.h:9, from beken378\app\app.c:11: d:\360downloads\tools\env_rtt\tools\gnu_gcc\arm_gcc\mingw\arm-none-eabi\include\sys\signal.h:47:8: error: redefinition of 'struct sigevent' 47 | struct sigevent { | ^~~~~~~~ In file included from rt-thread\include/rtlibc.h:35, from rt-thread\include/rtdef.h:1068, from rt-thread\include/rtthread.h:37, from rt-thread\include/rthw.h:32, from beken378\driver\entry/arch.h:45, from beken378\common/include.h:9, from beken378\app\app.c:11: rt-thread\include/libc/libc_signal.h:49:8: note: originally defined here 49 | struct sigevent | ^~~~~~~~ In file included from rt-thread\include/libc/libc_signal.h:81, from rt-thread\include/rtlibc.h:35, from rt-thread\include/rtdef.h:1068, from rt-thread\include/rtthread.h:37, from rt-thread\include/rthw.h:32, from beken378\driver\entry/arch.h:45, from beken378\common/include.h:9, from beken378\app\app.c:11: d:\360downloads\tools\env_rtt\tools\gnu_gcc\arm_gcc\mingw\arm-none-eabi\include\sys\signal.h:72:3: error: conflicting types for 'siginfo_t' 72 | } siginfo_t; | ^~~~~~~~~ In file included from rt-thread\include/rtlibc.h:35, from rt-thread\include/rtdef.h:1068, from rt-thread\include/rtthread.h:37, from rt-thread\include/rthw.h:32, from beken378\driver\entry/arch.h:45, from beken378\common/include.h:9, from beken378\app\app.c:11: rt-thread\include/libc/libc_signal.h:68:24: note: previous declaration of 'siginfo_t' was here 68 | typedef struct siginfo siginfo_t; | ^~~~~~~~~ scons: *** [build\beken378\app\app.o] Error 1 scons: building terminated because of errors. ```
aozima
2020-05-26
调网络不抓包,调I2C等时序不上逻辑分析仪,就像电工不用万用表!多用整理的好的文字,比截图更省流量,还能在整理过程中思考。
把 cconfig.h 删除一下。 另外,对出错的文件,输出一下预编译结果 。
aozima
2020-05-26
调网络不抓包,调I2C等时序不上逻辑分析仪,就像电工不用万用表!多用整理的好的文字,比截图更省流量,还能在整理过程中思考。
2019 版本还没有试过。
baili_shanghai
2020-06-08
这家伙很懒,什么也没写!
>把 cconfig.h 删除一下。 > >另外,对出错的文件,输出一下预编译结果 。 --- 1, 删除cconfig.h; 重新生成的cconfig.h如下: ```c #ifndef CCONFIG_H__ #define CCONFIG_H__ /* Automatically generated file; DO NOT EDIT. */ /* compiler configure file for RT-Thread in GCC*/ #define HAVE_NEWLIB_H 1 #define LIBC_VERSION "newlib 3.1.0" #define HAVE_SYS_SIGNAL_H 1 #define HAVE_SYS_SELECT_H 1 #define HAVE_PTHREAD_H 1 #define HAVE_FDSET 1 #define HAVE_SIGACTION 1 #define HAVE_SIGEVENT 1 #define HAVE_SIGINFO 1 #define HAVE_SIGVAL 1 #define GCC_VERSION "9.2.1 20191025 (release) [ARM/arm-9-branch revision 277599]" #define STDC "2011" #endif ``` 2, 编译错误: ``` CC build\kernel\components\dfs\filesystems\devfs\devfs.o CC build\kernel\components\dfs\filesystems\elmfat\dfs_elm.o CC build\kernel\components\dfs\filesystems\elmfat\ff.o drivers\wlan\net.c: In function 'net_sock_to_interface': drivers\wlan\net.c:307:5: warning: implicit declaration of function 'getpeername'; did you mean 'lwip_getpeername'? [-Wimplicit-function-declaration] 307 | getpeername(sock, (struct sockaddr *)&peer, &peerlen); | ^~~~~~~~~~~ | lwip_getpeername CC build\kernel\components\dfs\filesystems\net\dfs_net.o CC build\kernel\components\dfs\filesystems\net\net_netdb.o CC build\kernel\components\dfs\filesystems\net\net_sockets.o In file included from rt-thread\components\dfs\filesystems\net\dfs_net.c:31: rt-thread\components\dfs\include/dfs_posix.h:59:37: error: expected ')' before '(' token 59 | _READ_WRITE_RETURN_TYPE _EXFUN(read, (int __fd, void *__buf, size_t __nbyte)); | ^~ | ) rt-thread\components\dfs\include/dfs_posix.h:60:38: error: expected ')' before '(' token 60 | _READ_WRITE_RETURN_TYPE _EXFUN(write, (int __fd, const void *__buf, size_t __nbyte)); | ^~ | ) scons: *** [build\kernel\components\dfs\filesystems\net\dfs_net.o] Error 1 In file included from rt-thread\components\dfs\filesystems\net\net_sockets.c:26: rt-thread\components\dfs\include/dfs_posix.h:59:37: error: expected ')' before '(' token 59 | _READ_WRITE_RETURN_TYPE _EXFUN(read, (int __fd, void *__buf, size_t __nbyte)); | ^~ | ) rt-thread\components\dfs\include/dfs_posix.h:60:38: error: expected ')' before '(' token 60 | _READ_WRITE_RETURN_TYPE _EXFUN(write, (int __fd, const void *__buf, size_t __nbyte)); | ^~ | ) scons: *** [build\kernel\components\dfs\filesystems\net\net_sockets.o] Error 1 scons: building terminated because of errors. ```
baili_shanghai
2020-06-08
这家伙很懒,什么也没写!
>2019 版本还没有试过。 --- 对出错的文件,输出一下预编译结果。scons哪个参数,怎么弄. thx
tingle1314
2020-10-19
这家伙很懒,什么也没写!
**我遇到此问题的解决办法:** 1. scons -c 清理一遍 2. scons 重新编译即可
李肯陪你玩赚嵌入式
认证专家
2021-10-10
2022年度和2023年度RT-Thread社区优秀开源布道师,COC深圳城市开发者社区主理人,专注于嵌入式物联网的架构设计
初步看,应该是使用了太新的gcc版本,RRT编译还未支持这么新的编译器,难免会遇到一些兼容性的问题。
撰写答案
登录
注册新账号
关注者
0
被浏览
1.6k
关于作者
baili_shanghai
这家伙很懒,什么也没写!
提问
1
回答
7
被采纳
0
关注TA
发私信
相关问题
1
有关动态模块加载的一篇论文
2
最近的调程序总结
3
晕掉了,这么久都不见layer2的踪影啊
4
继续K9ii的历程
5
[GUI相关] FreeType 2
6
[GUI相关]嵌入式系统中文输入法的设计
7
20081101 RT-Thread开发者聚会总结
8
嵌入式系统基础
9
linux2.4.19在at91rm9200 上的寄存器设置
10
[转]基于嵌入式Linux的通用触摸屏校准程序
推荐文章
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
如何在master上的BSP中添加配置yml文件
2
使用百度AI助手辅助编写一个rt-thread下的ONVIF设备发现功能的功能代码
3
RT-Thread 发布 EtherKit开源以太网硬件!
4
rt-thread使用cherryusb实现虚拟串口
5
《C++20 图形界面程序:速度与渲染效率的双重优化秘籍》
热门标签
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
UART
ota在线升级
PWM
cubemx
freemodbus
flash
packages_软件包
BSP
潘多拉开发板_Pandora
定时器
ADC
GD32
flashDB
socket
中断
Debug
编译报错
msh
SFUD
keil_MDK
rt_mq_消息队列_msg_queue
ulog
C++_cpp
at_device
本月问答贡献
踩姑娘的小蘑菇
7
个答案
3
次被采纳
a1012112796
13
个答案
2
次被采纳
张世争
9
个答案
2
次被采纳
rv666
5
个答案
2
次被采纳
用户名由3_15位
11
个答案
1
次被采纳
本月文章贡献
程序员阿伟
9
篇文章
2
次点赞
hhart
3
篇文章
4
次点赞
大龄码农
1
篇文章
5
次点赞
RTT_逍遥
1
篇文章
2
次点赞
ThinkCode
1
篇文章
1
次点赞
回到
顶部
发布
问题
分享
好友
手机
浏览
扫码手机浏览
投诉
建议
回到
底部