BSP

k210: redefinition of 'union sigval' 'struct sigevent'

发布于 2019-12-11 09:58:43
在编译bsp目录下的k210时碰到的这个问题,显示
f:\kendryte-toolchain\riscv64-unknown-elf\include\sys\signal.h:42:7: error: redefinition of 'union sigval'
union sigval {
^~~~~~

E:\rt-thread-v4.0.1\rt-thread\include/libc/libc_signal.h:27:7: note: originally defined here
union sigval
^~~~~~

f:\kendryte-toolchain\riscv64-unknown-elf\include\sys\signal.h:47:8: error: redefinition of 'struct sigevent'
struct sigevent {
^~~~~~~~

E:\rt-thread-v4.0.1\rt-thread\include/libc/libc_signal.h:35:8: note: originally defined here
struct sigevent
^~~~~~~~

f:\kendryte-toolchain\riscv64-unknown-elf\include\sys\signal.h:72:3: error: conflicting types for 'siginfo_t'
} siginfo_t;
^~~~~~~~~

E:\rt-thread-v4.0.1\rt-thread\include/libc/libc_signal.h:54:24: note: previous declaration of 'siginfo_t' was here
typedef struct siginfo siginfo_t;
然后尝试把 f:\kendryte-toolchain\riscv64-unknown-elf\include\sys目录下的signal.h删除掉,又会报错
E:\rt-thread-v4.0.1\rt-thread\include/libc/libc_signal.h:67:10: fatal error: sys/signal.h: No such file or directory
#include

查看更多

关注者
0
被浏览
1.1k
3 个回答
freedom195
freedom195 2020-01-22
scons -c 先,然后在scons ,看还会不会报错
SlytherinGe
SlytherinGe 2020-01-10
老哥,你后来编译成功了吗?
这个问题好像是因为rtthread自己有个libc和工具链里的libc内容冲突了
在menuconfig里关掉libc那个选项就可以了
不过这样后面编译有好多warming,也生成不了bin文件,很纠结

撰写答案

请登录后再发布答案,点击登录

发布
问题

分享
好友

手机
浏览

扫码手机浏览