I had this problem when COMPILING it

In file included from defs.h:36,
                 from gdb.c:19:
../bfd/config.h:7:4: error: #error config.h must be #included before system headers
    7 | #  error config.h must be #included before system headers
      |    ^~~~~
../bfd/config.h:401: warning: "VERSION" redefined
  401 | #define VERSION "2.35.50"
      | 
In file included from ./../gdbsupport/common-defs.h:23,
                 from defs.h:28,
                 from gdb.c:19:
./../gdbsupport/config.h:393: note: this is the location of the previous definition
  393 | #define VERSION "1.0"
      | 
make[6]: *** [Makefile:1614: gdb.o] Error 1
make[6]: Leaving directory '/home/ustar/leanopenwrt/lede/build_dir/toolchain-x86_64_gcc-8.4.0_musl/gdb-10.1/gdb'
make[5]: *** [Makefile:9732: all-gdb] Error 2
make[5]: Leaving directory '/home/ustar/leanopenwrt/lede/build_dir/toolchain-x86_64_gcc-8.4.0_musl/gdb-10.1'
make[4]: *** [Makefile:854: all] Error 2
make[4]: Leaving directory '/home/ustar/leanopenwrt/lede/build_dir/toolchain-x86_64_gcc-8.4.0_musl/gdb-10.1'
make[3]: *** [Makefile:71: /home/ustar/leanopenwrt/lede/build_dir/toolchain-x86_64_gcc-8.4.0_musl/gdb-10.1/.built] Error 2
make[3]: Leaving directory '/home/ustar/leanopenwrt/lede/toolchain/gdb'
time: toolchain/gdb/compile#0.73#0.31#1.48
    ERROR: toolchain/gdb failed to build.
make[2]: *** [toolchain/Makefile:97: toolchain/gdb/compile] Error 1
make[2]: Leaving directory '/home/ustar/leanopenwrt/lede'
make[1]: *** [toolchain/Makefile:93: /home/ustar/leanopenwrt/lede/staging_dir/toolchain-x86_64_gcc-8.4.0_musl/stamp/.toolchain_compile] Error 2
make[1]: Leaving directory '/home/ustar/leanopenwrt/lede'
make: *** [/home/ustar/leanopenwrt/lede/include/toplevel.mk:230:world] 错误 2
ustar@ustar-vmr:~/leanopenwrt/lede$ uname -a
Linux ustar-vmr 5.11.0-25-generic #27~20.04.1-Ubuntu SMP Tue Jul 13 17:41:23 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
ustar@ustar-vmr:~/leanopenwrt/lede$

And the context is the sources from the official OpenWrt repo, or a private version patched by somebody?

Google search with leanopenwrt and you using old "lede" makes me to suspect that you are not using the official sources. In that case please ask the author of that version for help.

2 Likes

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.