coolsnowwolf / lede

Lean's LEDE source
Other
29.87k stars 19.54k forks source link

尝试自定义插件 编译固件遇到此类 error: redefinition of typedef '__be64' is a C11 feature [-Werror,-Wtypedef-redefinition] #12072

Closed zhEdward closed 7 months ago

zhEdward commented 7 months ago

详细叙述

其他概要:MacOS 11, bash-3.2,xcode13.2.1

1、拉取代码,照着 README 步骤来,什么都不改动,多线程编译可以正常生成x86_64固件。

2、之后我试着自定义,先make clean ,再make menuconfig 添加 adbybyunblock musicttyduhttpd等一些插件,再编译就报如下7个error,无论单线程还是多线程都报这种错误。贴到issues里面没找到,是我macos平台太老旧,不适合那些插件编译吗

重复 issue

具体型号

x86_64

详细日志

make[6]: Leaving directory '/Volumes/untitled/lede/build_dir/target-x86_64_musl/linux-x86_64/linux-6.1.85' make[6]: Entering directory '/Volumes/untitled/lede/build_dir/target-x86_64_musl/linux-x86_64/linux-6.1.85/tools' DESCEND objtool error: unknown warning option '-Wstrict-aliasing=3'; did you mean '-Wstring-plus-int'? [-Werror,-Wunknown-warning-option] In file included from exec-cmd.c:2: In file included from /Volumes/untitled/lede/build_dir/target-x86_64_musl/linux-x86_64/linux-6.1.85/tools/include/linux/compiler.h:105: /Volumes/untitled/lede/build_dir/target-x86_64_musl/linux-x86_64/linux-6.1.85/tools/include/linux/types.h:58:9: error: '__cold' macro redefined [-Werror,-Wmacro-redefined]

define __cold

    ^

/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/cdefs.h:180:9: note: previous definition is here

define cold attribute((cold__))

    ^

In file included from exec-cmd.c:2: In file included from /Volumes/untitled/lede/build_dir/target-x86_64_musl/linux-x86_64/linux-6.1.85/tools/include/linux/compiler.h:105: /Volumes/untitled/lede/build_dir/target-x86_64_musl/linux-x86_64/linux-6.1.85/tools/include/linux/types.h:60:25: error: redefinition of typedef 'le16' is a C11 feature [-Werror,-Wtypedef-redefinition] typedef u16 bitwise le16; ^ /Volumes/untitled/lede/build_dir/target-x86_64_musl/linux-x86_64/linux-6.1.85/tools/include/tools/linux_types.h:14:18: note: previous definition is here typedef uint16_t le16; ^ In file included from exec-cmd.c:2: In file included from /Volumes/untitled/lede/build_dir/target-x86_64_musl/linux-x86_64/linux-6.1.85/tools/include/linux/compiler.h:105: /Volumes/untitled/lede/build_dir/target-x86_64_musl/linux-x86_64/linux-6.1.85/tools/include/linux/types.h:61:25: error: redefinition of typedef 'be16' is a C11 feature [-Werror,-Wtypedef-redefinition] typedef u16 bitwise be16; ^ /Volumes/untitled/lede/build_dir/target-x86_64_musl/linux-x86_64/linux-6.1.85/tools/include/tools/linux_types.h:13:18: note: previous definition is here typedef uint16_t be16; ^ In file included from exec-cmd.c:2: In file included from /Volumes/untitled/lede/build_dir/target-x86_64_musl/linux-x86_64/linux-6.1.85/tools/include/linux/compiler.h:105: /Volumes/untitled/lede/build_dir/target-x86_64_musl/linux-x86_64/linux-6.1.85/tools/include/linux/types.h:62:25: error: redefinition of typedef 'le32' is a C11 feature [-Werror,-Wtypedef-redefinition] typedef u32 bitwise le32; ^ /Volumes/untitled/lede/build_dir/target-x86_64_musl/linux-x86_64/linux-6.1.85/tools/include/tools/linux_types.h:19:18: note: previous definition is here typedef uint32_t le32; ^ In file included from exec-cmd.c:2: In file included from /Volumes/untitled/lede/build_dir/target-x86_64_musl/linux-x86_64/linux-6.1.85/tools/include/linux/compiler.h:105: /Volumes/untitled/lede/build_dir/target-x86_64_musl/linux-x86_64/linux-6.1.85/tools/include/linux/types.h:63:25: error: redefinition of typedef 'be32' is a C11 feature [-Werror,-Wtypedef-redefinition] typedef u32 bitwise be32; ^ /Volumes/untitled/lede/build_dir/target-x86_64_musl/linux-x86_64/linux-6.1.85/tools/include/tools/linux_types.h:18:18: note: previous definition is here typedef uint32_t be32; ^ In file included from exec-cmd.c:2: In file included from /Volumes/untitled/lede/build_dir/target-x86_64_musl/linux-x86_64/linux-6.1.85/tools/include/linux/compiler.h:105: /Volumes/untitled/lede/build_dir/target-x86_64_musl/linux-x86_64/linux-6.1.85/tools/include/linux/types.h:64:25: error: redefinition of typedef 'le64' is a C11 feature [-Werror,-Wtypedef-redefinition] typedef u64 bitwise le64; ^ /Volumes/untitled/lede/build_dir/target-x86_64_musl/linux-x86_64/linux-6.1.85/tools/include/tools/linux_types.h:24:18: note: previous definition is here typedef uint64_t le64; ^ In file included from exec-cmd.c:2: In file included from /Volumes/untitled/lede/build_dir/target-x86_64_musl/linux-x86_64/linux-6.1.85/tools/include/linux/compiler.h:105: /Volumes/untitled/lede/build_dir/target-x86_64_musl/linux-x86_64/linux-6.1.85/tools/include/linux/types.h:65:25: error: redefinition of typedef 'be64' is a C11 feature [-Werror,-Wtypedef-redefinition] typedef u64 bitwise be64; ^ /Volumes/untitled/lede/build_dir/target-x86_64_musl/linux-x86_64/linux-6.1.85/tools/include/tools/linux_types.h:23:18: note: previous definition is here typedef uint64_t be64; ^ 7 errors generated.

coolsnowwolf commented 7 months ago

工具链 gcc 的版本太老了,请用 gcc11 或者以上