【openwrt】openwrt编译错误解决经验总结 前言 openwrt开发环境搭建请参阅:【openwrt学习笔记一】从搭建编译环境到编译openwrt全过程-谷动谷力 (sunsili.com) 直接多线程编译 make -j10 ERROR: package/feeds/packages/glib2 failed to build. ERROR: package/feeds/packages/gnutls failed to build. 不出错话,这样最好最快,编译日志少。 单线程编译 出错话,编译日志信息太少 改用: make V=s (单线程,多线程简单出错,不知道哪里出错了) 编译会出现 库(模块)下载失败 例: curl: (28) Connection timed out after 20001 milliseconds Download failed. + curl -f --connect-timeout 20 --retry 5 --location --insecure https://sources.cdn.openwrt.org/gnutls-3.7.1.tar.xz 下载gnutls-3.7.1.tar.xz失败 手动下载 参看GnuTLS-3.7.1 (linuxfromscratch.org) cd dl wget https://www.gnupg.org/ftp/gcrypt/gnutls/v3.7/gnutls-3.7.1.tar.xz 警告当错误不能通过 /home/fan/openwrt_21.02.0_mt76x8_jotale_source/staging_dir/toolchain-mipsel_24kc_gcc-8.4.0_musl/include/fortify/stdio.h: In function 'snprintf': /home/fan/openwrt_21.02.0_mt76x8_jotale_source/staging_dir/toolchain-mipsel_24kc_gcc-8.4.0_musl/include/fortify/stdio.h:101:2: error: format not a string literal, argument types not checked [-Werror=format-nonliteral] return __orig_snprintf(__s, __n, __f, __builtin_va_arg_pack()); ^~~~~~ /home/fan/openwrt_21.02.0_mt76x8_jotale_source/staging_dir/toolchain-mipsel_24kc_gcc-8.4.0_musl/include/fortify/stdio.h: In function 'sprintf': /home/fan/openwrt_21.02.0_mt76x8_jotale_source/staging_dir/toolchain-mipsel_24kc_gcc-8.4.0_musl/include/fortify/stdio.h:110:3: error: format not a string literal, argument types not checked [-Werror=format-nonliteral] __r = __orig_snprintf(__s, __b, __f, __builtin_va_arg_pack()); ^~~ /home/fan/openwrt_21.02.0_mt76x8_jotale_source/staging_dir/toolchain-mipsel_24kc_gcc-8.4.0_musl/include/fortify/stdio.h:114:3: error: format not a string literal, argument types not checked [-Werror=format-nonliteral] __r = __orig_sprintf(__s, __f, __builtin_va_arg_pack()); ^~~ cc1: some warnings being treated as errors [3/449] Compiling C object glib/pcre/libpcre.a.p/pcre_chartables.c.o FAILED: glib/pcre/libpcre.a.p/pcre_chartables.c.o mipsel-openwrt-linux-musl-gcc -Iglib/pcre/libpcre.a.p -Iglib/pcre -I../glib/pcre -I. -I.. -Iglib -I../glib -I/home/fan/openwrt_21.02.0_mt76x8_jotale_source/staging_dir/target-mipsel_24kc_musl/usr/lib/libiconv-stub/include -I/home/fan/openwrt_21.02.0_mt76x8_jotale_source/staging_dir/target-mipsel_24kc_musl/usr/lib/libintl-stub/include -I/home/fan/openwrt_21.02.0_mt76x8_jotale_source/staging_dir/toolchain-mipsel_24kc_gcc-8.4.0_musl/usr/include -I/home/fan/openwrt_21.02.0_mt76x8_jotale_source/staging_dir/toolchain-mipsel_24kc_gcc-8.4.0_musl/include/fortify -I/home/fan/openwrt_21.02.0_mt76x8_jotale_source/staging_dir/toolchain-mipsel_24kc_gcc-8.4.0_musl/include -flto -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -std=gnu99 -D_GNU_SOURCE -fno-strict-aliasing -DG_DISABLE_ASSERT -DG_DISABLE_CHECKS -Wduplicated-branches -Wimplicit-fallthrough -Wmisleading-indentation -Wstrict-prototypes -Wunused -Wno-unused-parameter -Wno-bad-function-cast -Wno-cast-function-type -Wno-pedantic -Wno-format-zero-length -Werror=declaration-after-statement -Werror=format=2 -Werror=implicit-function-declaration -Werror=init-self -Werror=missing-include-dirs -Werror=missing-prototypes -Werror=pointer-arith -Os -mno-branch-likely -mips32r2 -mtune=24kc -fno-caller-saves -fno-plt -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -msoft-float -mips16 -minterlink-mips16 -fmacro-prefix-map=/home/fan/openwrt_21.02.0_mt76x8_jotale_source/build_dir/target-mipsel_24kc_musl/glib-2.66.4=glib-2.66.4 -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro -ffunction-sections -fdata-sections -fPIC '-DG_LOG_DOMAIN="GLib-GRegex"' -DHAVE_MEMMOVE -DSUPPORT_UCP -DSUPPORT_UTF -DSUPPORT_UTF8 -DNEWLINE=-1 -DMATCH_LIMIT=10000000 -DMATCH_LIMIT_RECURSION=8192 -DMAX_NAME_SIZE=32 -DMAX_NAME_COUNT=10000 -DMAX_DUPLENGTH=30000 -DLINK_SIZE=2 -DPOSIX_MALLOC_THRESHOLD=10 -DPCRE_STATIC -UBSR_ANYCRLF -UEBCDIC -DGLIB_COMPILATION -fvisibility=hidden -MD -MQ glib/pcre/libpcre.a.p/pcre_chartables.c.o -MF glib/pcre/libpcre.a.p/pcre_chartables.c.o.d -o glib/pcre/libpcre.a.p/pcre_chartables.c.o -c ../glib/pcre/pcre_chartables.c In file included from ../glib/pcre/pcre_internal.h:110, from ../glib/pcre/pcre_chartables.c:25: /home/fan/openwrt_21.02.0_mt76x8_jotale_source/staging_dir/toolchain-mipsel_24kc_gcc-8.4.0_musl/include/fortify/stdio.h: In function 'snprintf': /home/fan/openwrt_21.02.0_mt76x8_jotale_source/staging_dir/toolchain-mipsel_24kc_gcc-8.4.0_musl/include/fortify/stdio.h:101:2: error: format not a string literal, argument types not checked [-Werror=format-nonliteral] return __orig_snprintf(__s, __n, __f, __builtin_va_arg_pack()); ^~~~~~ /home/fan/openwrt_21.02.0_mt76x8_jotale_source/staging_dir/toolchain-mipsel_24kc_gcc-8.4.0_musl/include/fortify/stdio.h: In function 'sprintf': /home/fan/openwrt_21.02.0_mt76x8_jotale_source/staging_dir/toolchain-mipsel_24kc_gcc-8.4.0_musl/include/fortify/stdio.h:110:3: error: format not a string literal, argument types not checked [-Werror=format-nonliteral] __r = __orig_snprintf(__s, __b, __f, __builtin_va_arg_pack()); ^~~ /home/fan/openwrt_21.02.0_mt76x8_jotale_source/staging_dir/toolchain-mipsel_24kc_gcc-8.4.0_musl/include/fortify/stdio.h:114:3: error: format not a string literal, argument types not checked [-Werror=format-nonliteral] __r = __orig_sprintf(__s, __f, __builtin_va_arg_pack()); ^~~ cc1: some warnings being treated as errors [4/449] Compiling C object glib/pcre/libpcre.a.p/pcre_config.c.o FAILED: glib/pcre/libpcre.a.p/pcre_config.c.o mipsel-openwrt-linux-musl-gcc -Iglib/pcre/libpcre.a.p -Iglib/pcre -I../glib/pcre -I. -I.. -Iglib -I../glib -I/home/fan/openwrt_21.02.0_mt76x8_jotale_source/staging_dir/target-mipsel_24kc_musl/usr/lib/libiconv-stub/include -I/home/fan/openwrt_21.02.0_mt76x8_jotale_source/staging_dir/target-mipsel_24kc_musl/usr/lib/libintl-stub/include -I/home/fan/openwrt_21.02.0_mt76x8_jotale_source/staging_dir/toolchain-mipsel_24kc_gcc-8.4.0_musl/usr/include -I/home/fan/openwrt_21.02.0_mt76x8_jotale_source/staging_dir/toolchain-mipsel_24kc_gcc-8.4.0_musl/include/fortify -I/home/fan/openwrt_21.02.0_mt76x8_jotale_source/staging_dir/toolchain-mipsel_24kc_gcc-8.4.0_musl/include -flto -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -std=gnu99 -D_GNU_SOURCE -fno-strict-aliasing -DG_DISABLE_ASSERT -DG_DISABLE_CHECKS -Wduplicated-branches -Wimplicit-fallthrough -Wmisleading-indentation -Wstrict-prototypes -Wunused -Wno-unused-parameter -Wno-bad-function-cast -Wno-cast-function-type -Wno-pedantic -Wno-format-zero-length -Werror=declaration-after-statement -Werror=format=2 -Werror=implicit-function-declaration -Werror=init-self -Werror=missing-include-dirs -Werror=missing-prototypes -Werror=pointer-arith -Os -mno-branch-likely -mips32r2 -mtune=24kc -fno-caller-saves -fno-plt -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -msoft-float -mips16 -minterlink-mips16 -fmacro-prefix-map=/home/fan/openwrt_21.02.0_mt76x8_jotale_source/build_dir/target-mipsel_24kc_musl/glib-2.66.4=glib-2.66.4 -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro -ffunction-sections -fdata-sections -fPIC '-DG_LOG_DOMAIN="GLib-GRegex"' -DHAVE_MEMMOVE -DSUPPORT_UCP -DSUPPORT_UTF -DSUPPORT_UTF8 -DNEWLINE=-1 -DMATCH_LIMIT=10000000 -DMATCH_LIMIT_RECURSION=8192 -DMAX_NAME_SIZE=32 -DMAX_NAME_COUNT=10000 -DMAX_DUPLENGTH=30000 -DLINK_SIZE=2 -DPOSIX_MALLOC_THRESHOLD=10 -DPCRE_STATIC -UBSR_ANYCRLF -UEBCDIC -DGLIB_COMPILATION -fvisibility=hidden -MD -MQ glib/pcre/libpcre.a.p/pcre_config.c.o -MF glib/pcre/libpcre.a.p/pcre_config.c.o.d -o glib/pcre/libpcre.a.p/pcre_config.c.o -c ../glib/pcre/pcre_config.c In file included from ../glib/pcre/pcre_internal.h:110, from ../glib/pcre/pcre_config.c:49: /home/fan/openwrt_21.02.0_mt76x8_jotale_source/staging_dir/toolchain-mipsel_24kc_gcc-8.4.0_musl/include/fortify/stdio.h: In function 'snprintf': /home/fan/openwrt_21.02.0_mt76x8_jotale_source/staging_dir/toolchain-mipsel_24kc_gcc-8.4.0_musl/include/fortify/stdio.h:101:2: error: format not a string literal, argument types not checked [-Werror=format-nonliteral] return __orig_snprintf(__s, __n, __f, __builtin_va_arg_pack()); ^~~~~~ /home/fan/openwrt_21.02.0_mt76x8_jotale_source/staging_dir/toolchain-mipsel_24kc_gcc-8.4.0_musl/include/fortify/stdio.h: In function 'sprintf': /home/fan/openwrt_21.02.0_mt76x8_jotale_source/staging_dir/toolchain-mipsel_24kc_gcc-8.4.0_musl/include/fortify/stdio.h:110:3: error: format not a string literal, argument types not checked [-Werror=format-nonliteral] __r = __orig_snprintf(__s, __b, __f, __builtin_va_arg_pack()); ^~~ /home/fan/openwrt_21.02.0_mt76x8_jotale_source/staging_dir/toolchain-mipsel_24kc_gcc-8.4.0_musl/include/fortify/stdio.h:114:3: error: format not a string literal, argument types not checked [-Werror=format-nonliteral] __r = __orig_sprintf(__s, __f, __builtin_va_arg_pack()); ^~~ cc1: some warnings being treated as errors [5/449] Compiling C object glib/pcre/libpcre.a.p/pcre_fullinfo.c.o FAILED: glib/pcre/libpcre.a.p/pcre_fullinfo.c.o mipsel-openwrt-linux-musl-gcc -Iglib/pcre/libpcre.a.p -Iglib/pcre -I../glib/pcre -I. -I.. -Iglib -I../glib -I/home/fan/openwrt_21.02.0_mt76x8_jotale_source/staging_dir/target-mipsel_24kc_musl/usr/lib/libiconv-stub/include -I/home/fan/openwrt_21.02.0_mt76x8_jotale_source/staging_dir/target-mipsel_24kc_musl/usr/lib/libintl-stub/include -I/home/fan/openwrt_21.02.0_mt76x8_jotale_source/staging_dir/toolchain-mipsel_24kc_gcc-8.4.0_musl/usr/include -I/home/fan/openwrt_21.02.0_mt76x8_jotale_source/staging_dir/toolchain-mipsel_24kc_gcc-8.4.0_musl/include/fortify -I/home/fan/openwrt_21.02.0_mt76x8_jotale_source/staging_dir/toolchain-mipsel_24kc_gcc-8.4.0_musl/include -flto -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -std=gnu99 -D_GNU_SOURCE -fno-strict-aliasing -DG_DISABLE_ASSERT -DG_DISABLE_CHECKS -Wduplicated-branches -Wimplicit-fallthrough -Wmisleading-indentation -Wstrict-prototypes -Wunused -Wno-unused-parameter -Wno-bad-function-cast -Wno-cast-function-type -Wno-pedantic -Wno-format-zero-length -Werror=declaration-after-statement -Werror=format=2 -Werror=implicit-function-declaration -Werror=init-self -Werror=missing-include-dirs -Werror=missing-prototypes -Werror=pointer-arith -Os -mno-branch-likely -mips32r2 -mtune=24kc -fno-caller-saves -fno-plt -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -msoft-float -mips16 -minterlink-mips16 -fmacro-prefix-map=/home/fan/openwrt_21.02.0_mt76x8_jotale_source/build_dir/target-mipsel_24kc_musl/glib-2.66.4=glib-2.66.4 -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro -ffunction-sections -fdata-sections -fPIC '-DG_LOG_DOMAIN="GLib-GRegex"' -DHAVE_MEMMOVE -DSUPPORT_UCP -DSUPPORT_UTF -DSUPPORT_UTF8 -DNEWLINE=-1 -DMATCH_LIMIT=10000000 -DMATCH_LIMIT_RECURSION=8192 -DMAX_NAME_SIZE=32 -DMAX_NAME_COUNT=10000 -DMAX_DUPLENGTH=30000 -DLINK_SIZE=2 -DPOSIX_MALLOC_THRESHOLD=10 -DPCRE_STATIC -UBSR_ANYCRLF -UEBCDIC -DGLIB_COMPILATION -fvisibility=hidden -MD -MQ glib/pcre/libpcre.a.p/pcre_fullinfo.c.o -MF glib/pcre/libpcre.a.p/pcre_fullinfo.c.o.d -o glib/pcre/libpcre.a.p/pcre_fullinfo.c.o -c ../glib/pcre/pcre_fullinfo.c In file included from ../glib/pcre/pcre_internal.h:110, from ../glib/pcre/pcre_fullinfo.c:47: /home/fan/openwrt_21.02.0_mt76x8_jotale_source/staging_dir/toolchain-mipsel_24kc_gcc-8.4.0_musl/include/fortify/stdio.h: In function 'snprintf': /home/fan/openwrt_21.02.0_mt76x8_jotale_source/staging_dir/toolchain-mipsel_24kc_gcc-8.4.0_musl/include/fortify/stdio.h:101:2: error: format not a string literal, argument types not checked [-Werror=format-nonliteral] return __orig_snprintf(__s, __n, __f, __builtin_va_arg_pack()); ^~~~~~ /home/fan/openwrt_21.02.0_mt76x8_jotale_source/staging_dir/toolchain-mipsel_24kc_gcc-8.4.0_musl/include/fortify/stdio.h: In function 'sprintf': /home/fan/openwrt_21.02.0_mt76x8_jotale_source/staging_dir/toolchain-mipsel_24kc_gcc-8.4.0_musl/include/fortify/stdio.h:110:3: error: format not a string literal, argument types not checked [-Werror=format-nonliteral] __r = __orig_snprintf(__s, __b, __f, __builtin_va_arg_pack()); ^~~ /home/fan/openwrt_21.02.0_mt76x8_jotale_source/staging_dir/toolchain-mipsel_24kc_gcc-8.4.0_musl/include/fortify/stdio.h:114:3: error: format not a string literal, argument types not checked [-Werror=format-nonliteral] __r = __orig_sprintf(__s, __f, __builtin_va_arg_pack()); ^~~ cc1: some warnings being treated as errors echo "libwolfssl" >> /home/fan/openwrt_21.02.0_mt76x8_jotale_source/staging_dir/target-mipsel_24kc_musl/pkginfo/wolfssl.default.install [6/449] Compiling C object glib/pcre/libpcre.a.p/pcre_jit_compile.c.o FAILED: glib/pcre/libpcre.a.p/pcre_jit_compile.c.o mipsel-openwrt-linux-musl-gcc -Iglib/pcre/libpcre.a.p -Iglib/pcre -I../glib/pcre -I. -I.. -Iglib -I../glib -I/home/fan/openwrt_21.02.0_mt76x8_jotale_source/staging_dir/target-mipsel_24kc_musl/usr/lib/libiconv-stub/include -I/home/fan/openwrt_21.02.0_mt76x8_jotale_source/staging_dir/target-mipsel_24kc_musl/usr/lib/libintl-stub/include -I/home/fan/openwrt_21.02.0_mt76x8_jotale_source/staging_dir/toolchain-mipsel_24kc_gcc-8.4.0_musl/usr/include -I/home/fan/openwrt_21.02.0_mt76x8_jotale_source/staging_dir/toolchain-mipsel_24kc_gcc-8.4.0_musl/include/fortify -I/home/fan/openwrt_21.02.0_mt76x8_jotale_source/staging_dir/toolchain-mipsel_24kc_gcc-8.4.0_musl/include -flto -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -std=gnu99 -D_GNU_SOURCE -fno-strict-aliasing -DG_DISABLE_ASSERT -DG_DISABLE_CHECKS -Wduplicated-branches -Wimplicit-fallthrough -Wmisleading-indentation -Wstrict-prototypes -Wunused -Wno-unused-parameter -Wno-bad-function-cast -Wno-cast-function-type -Wno-pedantic -Wno-format-zero-length -Werror=declaration-after-statement -Werror=format=2 -Werror=implicit-function-declaration -Werror=init-self -Werror=missing-include-dirs -Werror=missing-prototypes -Werror=pointer-arith -Os -mno-branch-likely -mips32r2 -mtune=24kc -fno-caller-saves -fno-plt -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -msoft-float -mips16 -minterlink-mips16 -fmacro-prefix-map=/home/fan/openwrt_21.02.0_mt76x8_jotale_source/build_dir/target-mipsel_24kc_musl/glib-2.66.4=glib-2.66.4 -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro -ffunction-sections -fdata-sections -fPIC '-DG_LOG_DOMAIN="GLib-GRegex"' -DHAVE_MEMMOVE -DSUPPORT_UCP -DSUPPORT_UTF -DSUPPORT_UTF8 -DNEWLINE=-1 -DMATCH_LIMIT=10000000 -DMATCH_LIMIT_RECURSION=8192 -DMAX_NAME_SIZE=32 -DMAX_NAME_COUNT=10000 -DMAX_DUPLENGTH=30000 -DLINK_SIZE=2 -DPOSIX_MALLOC_THRESHOLD=10 -DPCRE_STATIC -UBSR_ANYCRLF -UEBCDIC -DGLIB_COMPILATION -fvisibility=hidden -MD -MQ glib/pcre/libpcre.a.p/pcre_jit_compile.c.o -MF glib/pcre/libpcre.a.p/pcre_jit_compile.c.o.d -o glib/pcre/libpcre.a.p/pcre_jit_compile.c.o -c ../glib/pcre/pcre_jit_compile.c In file included from ../glib/pcre/pcre_internal.h:110, from ../glib/pcre/pcre_jit_compile.c:45: /home/fan/openwrt_21.02.0_mt76x8_jotale_source/staging_dir/toolchain-mipsel_24kc_gcc-8.4.0_musl/include/fortify/stdio.h: In function 'snprintf': /home/fan/openwrt_21.02.0_mt76x8_jotale_source/staging_dir/toolchain-mipsel_24kc_gcc-8.4.0_musl/include/fortify/stdio.h:101:2: error: format not a string literal, argument types not checked [-Werror=format-nonliteral] return __orig_snprintf(__s, __n, __f, __builtin_va_arg_pack()); ^~~~~~ /home/fan/openwrt_21.02.0_mt76x8_jotale_source/staging_dir/toolchain-mipsel_24kc_gcc-8.4.0_musl/include/fortify/stdio.h: In function 'sprintf': /home/fan/openwrt_21.02.0_mt76x8_jotale_source/staging_dir/toolchain-mipsel_24kc_gcc-8.4.0_musl/include/fortify/stdio.h:110:3: error: format not a string literal, argument types not checked [-Werror=format-nonliteral] __r = __orig_snprintf(__s, __b, __f, __builtin_va_arg_pack()); ^~~ /home/fan/openwrt_21.02.0_mt76x8_jotale_source/staging_dir/toolchain-mipsel_24kc_gcc-8.4.0_musl/include/fortify/stdio.h:114:3: error: format not a string literal, argument types not checked [-Werror=format-nonliteral] __r = __orig_sprintf(__s, __f, __builtin_va_arg_pack()); ^~~ cc1: some warnings being treated as errors make[3]: Leaving directory '/home/fan/openwrt_21.02.0_mt76x8_jotale_source/package/libs/wolfssl' time: package/libs/wolfssl/compile#0.27#0.05#0.38 [7/449] Compiling C object glib/pcre/libpcre.a.p/pcre_newline.c.o FAILED: glib/pcre/libpcre.a.p/pcre_newline.c.o mipsel-openwrt-linux-musl-gcc -Iglib/pcre/libpcre.a.p -Iglib/pcre -I../glib/pcre -I. -I.. -Iglib -I../glib -I/home/fan/openwrt_21.02.0_mt76x8_jotale_source/staging_dir/target-mipsel_24kc_musl/usr/lib/libiconv-stub/include -I/home/fan/openwrt_21.02.0_mt76x8_jotale_source/staging_dir/target-mipsel_24kc_musl/usr/lib/libintl-stub/include -I/home/fan/openwrt_21.02.0_mt76x8_jotale_source/staging_dir/toolchain-mipsel_24kc_gcc-8.4.0_musl/usr/include -I/home/fan/openwrt_21.02.0_mt76x8_jotale_source/staging_dir/toolchain-mipsel_24kc_gcc-8.4.0_musl/include/fortify -I/home/fan/openwrt_21.02.0_mt76x8_jotale_source/staging_dir/toolchain-mipsel_24kc_gcc-8.4.0_musl/include -flto -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -std=gnu99 -D_GNU_SOURCE -fno-strict-aliasing -DG_DISABLE_ASSERT -DG_DISABLE_CHECKS -Wduplicated-branches -Wimplicit-fallthrough -Wmisleading-indentation -Wstrict-prototypes -Wunused -Wno-unused-parameter -Wno-bad-function-cast -Wno-cast-function-type -Wno-pedantic -Wno-format-zero-length -Werror=declaration-after-statement -Werror=format=2 -Werror=implicit-function-declaration -Werror=init-self -Werror=missing-include-dirs -Werror=missing-prototypes -Werror=pointer-arith -Os -mno-branch-likely -mips32r2 -mtune=24kc -fno-caller-saves -fno-plt -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -msoft-float -mips16 -minterlink-mips16 -fmacro-prefix-map=/home/fan/openwrt_21.02.0_mt76x8_jotale_source/build_dir/target-mipsel_24kc_musl/glib-2.66.4=glib-2.66.4 -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro -ffunction-sections -fdata-sections -fPIC '-DG_LOG_DOMAIN="GLib-GRegex"' -DHAVE_MEMMOVE -DSUPPORT_UCP -DSUPPORT_UTF -DSUPPORT_UTF8 -DNEWLINE=-1 -DMATCH_LIMIT=10000000 -DMATCH_LIMIT_RECURSION=8192 -DMAX_NAME_SIZE=32 -DMAX_NAME_COUNT=10000 -DMAX_DUPLENGTH=30000 -DLINK_SIZE=2 -DPOSIX_MALLOC_THRESHOLD=10 -DPCRE_STATIC -UBSR_ANYCRLF -UEBCDIC -DGLIB_COMPILATION -fvisibility=hidden -MD -MQ glib/pcre/libpcre.a.p/pcre_newline.c.o -MF glib/pcre/libpcre.a.p/pcre_newline.c.o.d -o glib/pcre/libpcre.a.p/pcre_newline.c.o -c ../glib/pcre/pcre_newline.c In file included from ../glib/pcre/pcre_internal.h:110, from ../glib/pcre/pcre_newline.c:52: /home/fan/openwrt_21.02.0_mt76x8_jotale_source/staging_dir/toolchain-mipsel_24kc_gcc-8.4.0_musl/include/fortify/stdio.h: In function 'snprintf': /home/fan/openwrt_21.02.0_mt76x8_jotale_source/staging_dir/toolchain-mipsel_24kc_gcc-8.4.0_musl/include/fortify/stdio.h:101:2: error: format not a string literal, argument types not checked [-Werror=format-nonliteral] return __orig_snprintf(__s, __n, __f, __builtin_va_arg_pack()); ^~~~~~ /home/fan/openwrt_21.02.0_mt76x8_jotale_source/staging_dir/toolchain-mipsel_24kc_gcc-8.4.0_musl/include/fortify/stdio.h: In function 'sprintf': /home/fan/openwrt_21.02.0_mt76x8_jotale_source/staging_dir/toolchain-mipsel_24kc_gcc-8.4.0_musl/include/fortify/stdio.h:110:3: error: format not a string literal, argument types not checked [-Werror=format-nonliteral] __r = __orig_snprintf(__s, __b, __f, __builtin_va_arg_pack()); ^~~ /home/fan/openwrt_21.02.0_mt76x8_jotale_source/staging_dir/toolchain-mipsel_24kc_gcc-8.4.0_musl/include/fortify/stdio.h:114:3: error: format not a string literal, argument types not checked [-Werror=format-nonliteral] __r = __orig_sprintf(__s, __f, __builtin_va_arg_pack()); ^~~ cc1: some warnings being treated as errors [8/449] Compiling C object glib/pcre/libpcre.a.p/pcre_ord2utf8.c.o FAILED: glib/pcre/libpcre.a.p/pcre_ord2utf8.c.o mipsel-openwrt-linux-musl-gcc -Iglib/pcre/libpcre.a.p -Iglib/pcre -I../glib/pcre -I. -I.. -Iglib -I../glib -I/home/fan/openwrt_21.02.0_mt76x8_jotale_source/staging_dir/target-mipsel_24kc_musl/usr/lib/libiconv-stub/include -I/home/fan/openwrt_21.02.0_mt76x8_jotale_source/staging_dir/target-mipsel_24kc_musl/usr/lib/libintl-stub/include -I/home/fan/openwrt_21.02.0_mt76x8_jotale_source/staging_dir/toolchain-mipsel_24kc_gcc-8.4.0_musl/usr/include -I/home/fan/openwrt_21.02.0_mt76x8_jotale_source/staging_dir/toolchain-mipsel_24kc_gcc-8.4.0_musl/include/fortify -I/home/fan/openwrt_21.02.0_mt76x8_jotale_source/staging_dir/toolchain-mipsel_24kc_gcc-8.4.0_musl/include -flto -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -std=gnu99 -D_GNU_SOURCE -fno-strict-aliasing -DG_DISABLE_ASSERT -DG_DISABLE_CHECKS -Wduplicated-branches -Wimplicit-fallthrough -Wmisleading-indentation -Wstrict-prototypes -Wunused -Wno-unused-parameter -Wno-bad-function-cast -Wno-cast-function-type -Wno-pedantic -Wno-format-zero-length -Werror=declaration-after-statement -Werror=format=2 -Werror=implicit-function-declaration -Werror=init-self -Werror=missing-include-dirs -Werror=missing-prototypes -Werror=pointer-arith -Os -mno-branch-likely -mips32r2 -mtune=24kc -fno-caller-saves -fno-plt -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -msoft-float -mips16 -minterlink-mips16 -fmacro-prefix-map=/home/fan/openwrt_21.02.0_mt76x8_jotale_source/build_dir/target-mipsel_24kc_musl/glib-2.66.4=glib-2.66.4 -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro -ffunction-sections -fdata-sections -fPIC '-DG_LOG_DOMAIN="GLib-GRegex"' -DHAVE_MEMMOVE -DSUPPORT_UCP -DSUPPORT_UTF -DSUPPORT_UTF8 -DNEWLINE=-1 -DMATCH_LIMIT=10000000 -DMATCH_LIMIT_RECURSION=8192 -DMAX_NAME_SIZE=32 -DMAX_NAME_COUNT=10000 -DMAX_DUPLENGTH=30000 -DLINK_SIZE=2 -DPOSIX_MALLOC_THRESHOLD=10 -DPCRE_STATIC -UBSR_ANYCRLF -UEBCDIC -DGLIB_COMPILATION -fvisibility=hidden -MD -MQ glib/pcre/libpcre.a.p/pcre_ord2utf8.c.o -MF glib/pcre/libpcre.a.p/pcre_ord2utf8.c.o.d -o glib/pcre/libpcre.a.p/pcre_ord2utf8.c.o -c ../glib/pcre/pcre_ord2utf8.c In file included from ../glib/pcre/pcre_internal.h:110, from ../glib/pcre/pcre_ord2utf8.c:46: /home/fan/openwrt_21.02.0_mt76x8_jotale_source/staging_dir/toolchain-mipsel_24kc_gcc-8.4.0_musl/include/fortify/stdio.h: In function 'snprintf': /home/fan/openwrt_21.02.0_mt76x8_jotale_source/staging_dir/toolchain-mipsel_24kc_gcc-8.4.0_musl/include/fortify/stdio.h:101:2: error: format not a string literal, argument types not checked [-Werror=format-nonliteral] return __orig_snprintf(__s, __n, __f, __builtin_va_arg_pack()); ^~~~~~ /home/fan/openwrt_21.02.0_mt76x8_jotale_source/staging_dir/toolchain-mipsel_24kc_gcc-8.4.0_musl/include/fortify/stdio.h: In function 'sprintf': /home/fan/openwrt_21.02.0_mt76x8_jotale_source/staging_dir/toolchain-mipsel_24kc_gcc-8.4.0_musl/include/fortify/stdio.h:110:3: error: format not a string literal, argument types not checked [-Werror=format-nonliteral] __r = __orig_snprintf(__s, __b, __f, __builtin_va_arg_pack()); ^~~ /home/fan/openwrt_21.02.0_mt76x8_jotale_source/staging_dir/toolchain-mipsel_24kc_gcc-8.4.0_musl/include/fortify/stdio.h:114:3: error: format not a string literal, argument types not checked [-Werror=format-nonliteral] __r = __orig_sprintf(__s, __f, __builtin_va_arg_pack()); ^~~ cc1: some warnings being treated as errors [9/449] Compiling C object glib/pcre/libpcre.a.p/pcre_globals.c.o FAILED: glib/pcre/libpcre.a.p/pcre_globals.c.o mipsel-openwrt-linux-musl-gcc -Iglib/pcre/libpcre.a.p -Iglib/pcre -I../glib/pcre -I. -I.. -Iglib -I../glib -I/home/fan/openwrt_21.02.0_mt76x8_jotale_source/staging_dir/target-mipsel_24kc_musl/usr/lib/libiconv-stub/include -I/home/fan/openwrt_21.02.0_mt76x8_jotale_source/staging_dir/target-mipsel_24kc_musl/usr/lib/libintl-stub/include -I/home/fan/openwrt_21.02.0_mt76x8_jotale_source/staging_dir/toolchain-mipsel_24kc_gcc-8.4.0_musl/usr/include -I/home/fan/openwrt_21.02.0_mt76x8_jotale_source/staging_dir/toolchain-mipsel_24kc_gcc-8.4.0_musl/include/fortify -I/home/fan/openwrt_21.02.0_mt76x8_jotale_source/staging_dir/toolchain-mipsel_24kc_gcc-8.4.0_musl/include -flto -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -std=gnu99 -D_GNU_SOURCE -fno-strict-aliasing -DG_DISABLE_ASSERT -DG_DISABLE_CHECKS -Wduplicated-branches -Wimplicit-fallthrough -Wmisleading-indentation -Wstrict-prototypes -Wunused -Wno-unused-parameter -Wno-bad-function-cast -Wno-cast-function-type -Wno-pedantic -Wno-format-zero-length -Werror=declaration-after-statement -Werror=format=2 -Werror=implicit-function-declaration -Werror=init-self -Werror=missing-include-dirs -Werror=missing-prototypes -Werror=pointer-arith -Os -mno-branch-likely -mips32r2 -mtune=24kc -fno-caller-saves -fno-plt -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -msoft-float -mips16 -minterlink-mips16 -fmacro-prefix-map=/home/fan/openwrt_21.02.0_mt76x8_jotale_source/build_dir/target-mipsel_24kc_musl/glib-2.66.4=glib-2.66.4 -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro -ffunction-sections -fdata-sections -fPIC '-DG_LOG_DOMAIN="GLib-GRegex"' -DHAVE_MEMMOVE -DSUPPORT_UCP -DSUPPORT_UTF -DSUPPORT_UTF8 -DNEWLINE=-1 -DMATCH_LIMIT=10000000 -DMATCH_LIMIT_RECURSION=8192 -DMAX_NAME_SIZE=32 -DMAX_NAME_COUNT=10000 -DMAX_DUPLENGTH=30000 -DLINK_SIZE=2 -DPOSIX_MALLOC_THRESHOLD=10 -DPCRE_STATIC -UBSR_ANYCRLF -UEBCDIC -DGLIB_COMPILATION -fvisibility=hidden -MD -MQ glib/pcre/libpcre.a.p/pcre_globals.c.o -MF glib/pcre/libpcre.a.p/pcre_globals.c.o.d -o glib/pcre/libpcre.a.p/pcre_globals.c.o -c ../glib/pcre/pcre_globals.c In file included from ../glib/pcre/pcre_internal.h:110, from ../glib/pcre/pcre_globals.c:57: /home/fan/openwrt_21.02.0_mt76x8_jotale_source/staging_dir/toolchain-mipsel_24kc_gcc-8.4.0_musl/include/fortify/stdio.h: In function 'snprintf': /home/fan/openwrt_21.02.0_mt76x8_jotale_source/staging_dir/toolchain-mipsel_24kc_gcc-8.4.0_musl/include/fortify/stdio.h:101:2: error: format not a string literal, argument types not checked [-Werror=format-nonliteral] return __orig_snprintf(__s, __n, __f, __builtin_va_arg_pack()); ^~~~~~ /home/fan/openwrt_21.02.0_mt76x8_jotale_source/staging_dir/toolchain-mipsel_24kc_gcc-8.4.0_musl/include/fortify/stdio.h: In function 'sprintf': /home/fan/openwrt_21.02.0_mt76x8_jotale_source/staging_dir/toolchain-mipsel_24kc_gcc-8.4.0_musl/include/fortify/stdio.h:110:3: error: format not a string literal, argument types not checked [-Werror=format-nonliteral] __r = __orig_snprintf(__s, __b, __f, __builtin_va_arg_pack()); ^~~ /home/fan/openwrt_21.02.0_mt76x8_jotale_source/staging_dir/toolchain-mipsel_24kc_gcc-8.4.0_musl/include/fortify/stdio.h:114:3: error: format not a string literal, argument types not checked [-Werror=format-nonliteral] __r = __orig_sprintf(__s, __f, __builtin_va_arg_pack()); ^~~ cc1: some warnings being treated as errors [10/449] Compiling C object glib/pcre/libpcre.a.p/pcre_string_utils.c.o FAILED: glib/pcre/libpcre.a.p/pcre_string_utils.c.o mipsel-openwrt-linux-musl-gcc -Iglib/pcre/libpcre.a.p -Iglib/pcre -I../glib/pcre -I. -I.. -Iglib -I../glib -I/home/fan/openwrt_21.02.0_mt76x8_jotale_source/staging_dir/target-mipsel_24kc_musl/usr/lib/libiconv-stub/include -I/home/fan/openwrt_21.02.0_mt76x8_jotale_source/staging_dir/target-mipsel_24kc_musl/usr/lib/libintl-stub/include -I/home/fan/openwrt_21.02.0_mt76x8_jotale_source/staging_dir/toolchain-mipsel_24kc_gcc-8.4.0_musl/usr/include -I/home/fan/openwrt_21.02.0_mt76x8_jotale_source/staging_dir/toolchain-mipsel_24kc_gcc-8.4.0_musl/include/fortify -I/home/fan/openwrt_21.02.0_mt76x8_jotale_source/staging_dir/toolchain-mipsel_24kc_gcc-8.4.0_musl/include -flto -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -std=gnu99 -D_GNU_SOURCE -fno-strict-aliasing -DG_DISABLE_ASSERT -DG_DISABLE_CHECKS -Wduplicated-branches -Wimplicit-fallthrough -Wmisleading-indentation -Wstrict-prototypes -Wunused -Wno-unused-parameter -Wno-bad-function-cast -Wno-cast-function-type -Wno-pedantic -Wno-format-zero-length -Werror=declaration-after-statement -Werror=format=2 -Werror=implicit-function-declaration -Werror=init-self -Werror=missing-include-dirs -Werror=missing-prototypes -Werror=pointer-arith -Os -mno-branch-likely -mips32r2 -mtune=24kc -fno-caller-saves -fno-plt -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -msoft-float -mips16 -minterlink-mips16 -fmacro-prefix-map=/home/fan/openwrt_21.02.0_mt76x8_jotale_source/build_dir/target-mipsel_24kc_musl/glib-2.66.4=glib-2.66.4 -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro -ffunction-sections -fdata-sections -fPIC '-DG_LOG_DOMAIN="GLib-GRegex"' -DHAVE_MEMMOVE -DSUPPORT_UCP -DSUPPORT_UTF -DSUPPORT_UTF8 -DNEWLINE=-1 -DMATCH_LIMIT=10000000 -DMATCH_LIMIT_RECURSION=8192 -DMAX_NAME_SIZE=32 -DMAX_NAME_COUNT=10000 -DMAX_DUPLENGTH=30000 -DLINK_SIZE=2 -DPOSIX_MALLOC_THRESHOLD=10 -DPCRE_STATIC -UBSR_ANYCRLF -UEBCDIC -DGLIB_COMPILATION -fvisibility=hidden -MD -MQ glib/pcre/libpcre.a.p/pcre_string_utils.c.o -MF glib/pcre/libpcre.a.p/pcre_string_utils.c.o.d -o glib/pcre/libpcre.a.p/pcre_string_utils.c.o -c ../glib/pcre/pcre_string_utils.c In file included from ../glib/pcre/pcre_internal.h:110, from ../glib/pcre/pcre_string_utils.c:47: /home/fan/openwrt_21.02.0_mt76x8_jotale_source/staging_dir/toolchain-mipsel_24kc_gcc-8.4.0_musl/include/fortify/stdio.h: In function 'snprintf': /home/fan/openwrt_21.02.0_mt76x8_jotale_source/staging_dir/toolchain-mipsel_24kc_gcc-8.4.0_musl/include/fortify/stdio.h:101:2: error: format not a string literal, argument types not checked [-Werror=format-nonliteral] return __orig_snprintf(__s, __n, __f, __builtin_va_arg_pack()); ^~~~~~ /home/fan/openwrt_21.02.0_mt76x8_jotale_source/staging_dir/toolchain-mipsel_24kc_gcc-8.4.0_musl/include/fortify/stdio.h: In function 'sprintf': /home/fan/openwrt_21.02.0_mt76x8_jotale_source/staging_dir/toolchain-mipsel_24kc_gcc-8.4.0_musl/include/fortify/stdio.h:110:3: error: format not a string literal, argument types not checked [-Werror=format-nonliteral] __r = __orig_snprintf(__s, __b, __f, __builtin_va_arg_pack()); ^~~ /home/fan/openwrt_21.02.0_mt76x8_jotale_source/staging_dir/toolchain-mipsel_24kc_gcc-8.4.0_musl/include/fortify/stdio.h:114:3: error: format not a string literal, argument types not checked [-Werror=format-nonliteral] __r = __orig_sprintf(__s, __f, __builtin_va_arg_pack()); ^~~ cc1: some warnings being treated as errors [11/449] Compiling C object glib/pcre/libpcre.a.p/pcre_get.c.o 上面编译日志看 都是stdio.h(依日志找路径/staging_dir/toolchain-mipsel_24kc_gcc-8.4.0_musl/include/fortify/stdio.h) --some warnings being treated as errors 解决方法: 在stdio.h 文件里添加 #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wformat-nonliteral" #pragma GCC diagnostic pop toplevel.mk出错 最新版本 toplevel.mk 规则(语法)出错。 建议从旧复制过去替换掉,就能编译过去了。 WSL编译出错
linux子系统会自动添加 Win系统的 PATH路径,WSL编译命令: PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin make -j10 V=s 或用vmware里虚拟机就没这个错误了 文件权限问题 "\home\user\openwrt-sdk\package\argserver": Permission denied 如果从Windows系统更改了文件,并且保存了,编译的时候就会出现编译的权限问题,可以更改文件权限 chmod -R 777 package\argserver #更改目录权限,并迭代 前执行make clean && make down 编译时出现以下错误: checking whether mknod can create fifo without root privileges... configure: error: in /tmp/lede/build_dir/host/tar-1.29': configure: error: you should not run configure as root (set FORCE_UNSAFE_CONFIGURE=1 in environment to bypass this check) See config.log' for more details Makefile:30: recipe for target '/tmp/lede/build_dir/host/tar-1.29/.configured' failed make[3]: *** [/tmp/lede/build_dir/host/tar-1.29/.configured] Error 1 make[3]: Leaving directory '/tmp/lede/tools/tar' tools/Makefile:150: recipe for target 'tools/tar/compile' failed make[2]: *** [tools/tar/compile] Error 2 make[2]: Leaving directory '/tmp/lede' tools/Makefile:148: recipe for target '/tmp/lede/staging_dir/target-mips_24kc_musl/stamp/.tools_compile_yynyyyyynyyyyynyynnnyyyyyyyyyyyyyyyyyyyynnyynynyyyynny' failed make[1]: *** [/tmp/lede/staging_dir/target-mips_24kc_musl/stamp/.tools_compile_yynyyyyynyyyyynyynnnyyyyyyyyyyyyyyyyyyyynnyynynyyyynny] Error 2 make[1]: Leaving directory '/tmp/lede' /tmp/lede/include/toplevel.mk:207: recipe for target 'world' failed make: *** [world] Error 2 因为整个项目是从GitHub上克隆下来的,文件属主不是你,你需要为整个文件夹添加你的权限 sudo chown -R $USER(用户名) openwrt( 源码目录) 或者 sudo export FORCE_UNSAFE_CONFIGURE=1 然后就可以编译了。 编译版本问题 编译过程中 出现ld returned 1 exit status的问题解决方案 话说我出现这个错误是在编译安装osrm这个软件中出现的,预编译通过,make的时候出这个报错,ld returned 1 exit status。第一反应是动态链接库的问题,但百度一番后并没有发现任何有效的结果。 这个就很让人郁闷了,怎么办?突然想起这个版本的osrm是对gcc的版本有要求的,而我使用的gcc是偷懒方式安装的devtooset版本gcc6.3.1版本,并利用其自带脚本激活了gcc6,中间关闭了一次shell窗口,。此时,gcc -v输出为4.8.5,可见make的时候并没有使用gcc 6版本,因此,再次激活gcc6,重新编译 make &&make install,编译顺序通过。 如果报错ld returned 1 exit status,那么一般是gcc编译器在捣鬼,在使用的编译器版本和源码编译所需的gcc编译器版本有差距,首先,查询编译工作需要的gcc编译器版本,然后使用适当的编译器编译,问题一般都会迎刃而解的。 总结 成功路上总会有很绊脚石,当冲破乌云,直挂云帆,扶遥直上,发现之前挫折,也是那么的美好。 你编译openwrt还有哪些问题,欢迎评论区留言,我们如果知道会回答的。 |
|Archiver|手机版|深圳市光明谷科技有限公司|光明谷商城|Sunshine Silicon Corpporation ( 粤ICP备14060730号 ) |Sitemap
GMT+8, 2024-9-30 23:14 , Processed in 0.116391 second(s), 36 queries .
Powered by Discuz! X3.2 Licensed
© 2001-2013 Comsenz Inc.