野火电子论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 1727|回复: 1

鲁班猫2N编译openwrt失败求助

[复制链接]
发表于 2023-7-25 23:59:53 | 显示全部楼层 |阅读模式

虚拟机用的1804的,直接按照4. 编译镜像 — [野火]OpenWrt用户手册—基于LubanCat-RK系列板卡 文档 (embedfire.com)这个教程里面说的,都是正常的,唯一就是使用./mk-fire.sh的时候提示python版本不对,需要大于等于3.7的,因此更新了一下python版本(具体就是下了一个3.8的,然后更新了python3的软链接),之后更新dl也是正常的,make menuconfig选择2N的板卡后直接退出,编译报错如下:
野火论坛202307252355458173..png


使用make V=s -j1详细报错如下:(感觉还都是这个包的问题,有人知道可以如何解决吗?)


patchelf.cc: In instantiation of 'void ElfFile<Elf_Ehdr, Elf_Phdr, Elf_Shdr, Elf_Addr, Elf_Off, Elf_Dyn, Elf_Sym, Elf_Versym, Elf_Verdef, Elf_Verdaux, Elf_Verneed, Elf_Vernaux, Elf_Rel, Elf_Rela, ElfClass>::rebuildGnuHashTable(span<char>, span<Elf_Sym>) [with Elf_Ehdr = Elf64_Ehdr; Elf_Phdr = Elf64_Phdr; Elf_Shdr = Elf64_Shdr; Elf_Addr = long unsigned int; Elf_Off = long unsigned int; Elf_Dyn = Elf64_Dyn; Elf_Sym = Elf64_Sym; Elf_Versym = short unsigned int; Elf_Verdef = Elf64_Verdef; Elf_Verdaux = Elf64_Verdaux; Elf_Verneed = Elf64_Verneed; Elf_Vernaux = Elf64_Vernaux; Elf_Rel = Elf64_Rel; Elf_Rela = Elf64_Rela; unsigned int ElfClass = 64]':
patchelf.cc:2208:28:   required from 'void ElfFile<Elf_Ehdr, Elf_Phdr, Elf_Shdr, Elf_Addr, Elf_Off, Elf_Dyn, Elf_Sym, Elf_Versym, Elf_Verdef, Elf_Verdaux, Elf_Verneed, Elf_Vernaux, Elf_Rel, Elf_Rela, ElfClass>::renameDynamicSymbols(const std::unordered_map<std::basic_string_view<char>, std::__cxx11::basic_string<char> >&) [with Elf_Ehdr = Elf64_Ehdr; Elf_Phdr = Elf64_Phdr; Elf_Shdr = Elf64_Shdr; Elf_Addr = long unsigned int; Elf_Off = long unsigned int; Elf_Dyn = Elf64_Dyn; Elf_Sym = Elf64_Sym; Elf_Versym = short unsigned int; Elf_Verdef = Elf64_Verdef; Elf_Verdaux = Elf64_Verdaux; Elf_Verneed = Elf64_Verneed; Elf_Vernaux = Elf64_Vernaux; Elf_Rel = Elf64_Rel; Elf_Rela = Elf64_Rela; unsigned int ElfClass = 64]'
patchelf.cc:2442:9:   required from 'void patchElf2(ElfFile&&, const FileContents&, const string&) [with ElfFile = ElfFile<Elf64_Ehdr, Elf64_Phdr, Elf64_Shdr, long unsigned int, long unsigned int, Elf64_Dyn, Elf64_Sym, short unsigned int, Elf64_Verdef, Elf64_Verdaux, Elf64_Verneed, Elf64_Vernaux, Elf64_Rel, Elf64_Rela, 64>; FileContents = std::shared_ptr<std::vector<unsigned char> >; std::__cxx11::string = std::__cxx11::basic_string<char>]'
patchelf.cc:2465:256:   required from here
patchelf.cc:2102:37: error: use of 'auto span<T>::size() const [with T = long unsigned int]' before deduction of 'auto'
         size_t idx = (h / ElfClass) % ght.m_bloomFilters.size();
In file included from patchelf.cc:47:0:
patchelf.h:226:10: error: 'void ElfFile<Elf_Ehdr, Elf_Phdr, Elf_Shdr, Elf_Addr, Elf_Off, Elf_Dyn, Elf_Sym, Elf_Versym, Elf_Verdef, Elf_Verdaux, Elf_Verneed, Elf_Vernaux, Elf_Rel, Elf_Rela, ElfClass>::changeRelocTableSymIds(const Elf_Shdr&, RemapFn&&) [with ElfRelType = Elf32_Rel; RemapFn = ElfFile<Elf_Ehdr, Elf_Phdr, Elf_Shdr, Elf_Addr, Elf_Off, Elf_Dyn, Elf_Sym, Elf_Versym, Elf_Verdef, Elf_Verdaux, Elf_Verneed, Elf_Vernaux, Elf_Rel, Elf_Rela, ElfClass>::rebuildGnuHashTable(span<char>, span<Elf_Sym>) [with Elf_Ehdr = Elf32_Ehdr; Elf_Phdr = Elf32_Phdr; Elf_Shdr = Elf32_Shdr; Elf_Addr = unsigned int; Elf_Off = unsigned int; Elf_Dyn = Elf32_Dyn; Elf_Sym = Elf32_Sym; Elf_Versym = short unsigned int; Elf_Verdef = Elf32_Verdef; Elf_Verdaux = Elf32_Verdaux; Elf_Verneed = Elf32_Verneed; Elf_Vernaux = Elf32_Vernaux; Elf_Rel = Elf32_Rel; Elf_Rela = Elf32_Rela; unsigned int ElfClass = 32]::<lambda(auto:7&)>&; Elf_Ehdr = Elf32_Ehdr; Elf_Phdr = Elf32_Phdr; Elf_Shdr = Elf32_Shdr; Elf_Addr = unsigned int; Elf_Off = unsigned int; Elf_Dyn = Elf32_Dyn; Elf_Sym = Elf32_Sym; Elf_Versym = short unsigned int; Elf_Verdef = Elf32_Verdef; Elf_Verdaux = Elf32_Verdaux; Elf_Verneed = Elf32_Verneed; Elf_Vernaux = Elf32_Vernaux; Elf_Rel = Elf32_Rel; Elf_Rela = Elf32_Rela; unsigned int ElfClass = 32]', declared using local type 'ElfFile<Elf_Ehdr, Elf_Phdr, Elf_Shdr, Elf_Addr, Elf_Off, Elf_Dyn, Elf_Sym, Elf_Versym, Elf_Verdef, Elf_Verdaux, Elf_Verneed, Elf_Vernaux, Elf_Rel, Elf_Rela, ElfClass>::rebuildGnuHashTable(span<char>, span<Elf_Sym>) [with Elf_Ehdr = Elf32_Ehdr; Elf_Phdr = Elf32_Phdr; Elf_Shdr = Elf32_Shdr; Elf_Addr = unsigned int; Elf_Off = unsigned int; Elf_Dyn = Elf32_Dyn; Elf_Sym = Elf32_Sym; Elf_Versym = short unsigned int; Elf_Verdef = Elf32_Verdef; Elf_Verdaux = Elf32_Verdaux; Elf_Verneed = Elf32_Verneed; Elf_Vernaux = Elf32_Vernaux; Elf_Rel = Elf32_Rel; Elf_Rela = Elf32_Rela; unsigned int ElfClass = 32]::<lambda(auto:7&)>', is used but never defined [-fpermissive]
     void changeRelocTableSymIds(const Elf_Shdr& shdr, RemapFn&& old2newSymId)
          ^~~~~~~~~~~~~~~~~~~~~~
patchelf.h:226:10: error: 'void ElfFile<Elf_Ehdr, Elf_Phdr, Elf_Shdr, Elf_Addr, Elf_Off, Elf_Dyn, Elf_Sym, Elf_Versym, Elf_Verdef, Elf_Verdaux, Elf_Verneed, Elf_Vernaux, Elf_Rel, Elf_Rela, ElfClass>::changeRelocTableSymIds(const Elf_Shdr&, RemapFn&&) [with ElfRelType = Elf32_Rela; RemapFn = ElfFile<Elf_Ehdr, Elf_Phdr, Elf_Shdr, Elf_Addr, Elf_Off, Elf_Dyn, Elf_Sym, Elf_Versym, Elf_Verdef, Elf_Verdaux, Elf_Verneed, Elf_Vernaux, Elf_Rel, Elf_Rela, ElfClass>::rebuildGnuHashTable(span<char>, span<Elf_Sym>) [with Elf_Ehdr = Elf32_Ehdr; Elf_Phdr = Elf32_Phdr; Elf_Shdr = Elf32_Shdr; Elf_Addr = unsigned int; Elf_Off = unsigned int; Elf_Dyn = Elf32_Dyn; Elf_Sym = Elf32_Sym; Elf_Versym = short unsigned int; Elf_Verdef = Elf32_Verdef; Elf_Verdaux = Elf32_Verdaux; Elf_Verneed = Elf32_Verneed; Elf_Vernaux = Elf32_Vernaux; Elf_Rel = Elf32_Rel; Elf_Rela = Elf32_Rela; unsigned int ElfClass = 32]::<lambda(auto:7&)>&; Elf_Ehdr = Elf32_Ehdr; Elf_Phdr = Elf32_Phdr; Elf_Shdr = Elf32_Shdr; Elf_Addr = unsigned int; Elf_Off = unsigned int; Elf_Dyn = Elf32_Dyn; Elf_Sym = Elf32_Sym; Elf_Versym = short unsigned int; Elf_Verdef = Elf32_Verdef; Elf_Verdaux = Elf32_Verdaux; Elf_Verneed = Elf32_Verneed; Elf_Vernaux = Elf32_Vernaux; Elf_Rel = Elf32_Rel; Elf_Rela = Elf32_Rela; unsigned int ElfClass = 32]', declared using local type 'ElfFile<Elf_Ehdr, Elf_Phdr, Elf_Shdr, Elf_Addr, Elf_Off, Elf_Dyn, Elf_Sym, Elf_Versym, Elf_Verdef, Elf_Verdaux, Elf_Verneed, Elf_Vernaux, Elf_Rel, Elf_Rela, ElfClass>::rebuildGnuHashTable(span<char>, span<Elf_Sym>) [with Elf_Ehdr = Elf32_Ehdr; Elf_Phdr = Elf32_Phdr; Elf_Shdr = Elf32_Shdr; Elf_Addr = unsigned int; Elf_Off = unsigned int; Elf_Dyn = Elf32_Dyn; Elf_Sym = Elf32_Sym; Elf_Versym = short unsigned int; Elf_Verdef = Elf32_Verdef; Elf_Verdaux = Elf32_Verdaux; Elf_Verneed = Elf32_Verneed; Elf_Vernaux = Elf32_Vernaux; Elf_Rel = Elf32_Rel; Elf_Rela = Elf32_Rela; unsigned int ElfClass = 32]::<lambda(auto:7&)>', is used but never defined [-fpermissive]
patchelf.h:226:10: error: 'void ElfFile<Elf_Ehdr, Elf_Phdr, Elf_Shdr, Elf_Addr, Elf_Off, Elf_Dyn, Elf_Sym, Elf_Versym, Elf_Verdef, Elf_Verdaux, Elf_Verneed, Elf_Vernaux, Elf_Rel, Elf_Rela, ElfClass>::changeRelocTableSymIds(const Elf_Shdr&, RemapFn&&) [with ElfRelType = Elf64_Rel; RemapFn = ElfFile<Elf_Ehdr, Elf_Phdr, Elf_Shdr, Elf_Addr, Elf_Off, Elf_Dyn, Elf_Sym, Elf_Versym, Elf_Verdef, Elf_Verdaux, Elf_Verneed, Elf_Vernaux, Elf_Rel, Elf_Rela, ElfClass>::rebuildGnuHashTable(span<char>, span<Elf_Sym>) [with Elf_Ehdr = Elf64_Ehdr; Elf_Phdr = Elf64_Phdr; Elf_Shdr = Elf64_Shdr; Elf_Addr = long unsigned int; Elf_Off = long unsigned int; Elf_Dyn = Elf64_Dyn; Elf_Sym = Elf64_Sym; Elf_Versym = short unsigned int; Elf_Verdef = Elf64_Verdef; Elf_Verdaux = Elf64_Verdaux; Elf_Verneed = Elf64_Verneed; Elf_Vernaux = Elf64_Vernaux; Elf_Rel = Elf64_Rel; Elf_Rela = Elf64_Rela; unsigned int ElfClass = 64]::<lambda(auto:7&)>&; Elf_Ehdr = Elf64_Ehdr; Elf_Phdr = Elf64_Phdr; Elf_Shdr = Elf64_Shdr; Elf_Addr = long unsigned int; Elf_Off = long unsigned int; Elf_Dyn = Elf64_Dyn; Elf_Sym = Elf64_Sym; Elf_Versym = short unsigned int; Elf_Verdef = Elf64_Verdef; Elf_Verdaux = Elf64_Verdaux; Elf_Verneed = Elf64_Verneed; Elf_Vernaux = Elf64_Vernaux; Elf_Rel = Elf64_Rel; Elf_Rela = Elf64_Rela; unsigned int ElfClass = 64]', declared using local type 'ElfFile<Elf_Ehdr, Elf_Phdr, Elf_Shdr, Elf_Addr, Elf_Off, Elf_Dyn, Elf_Sym, Elf_Versym, Elf_Verdef, Elf_Verdaux, Elf_Verneed, Elf_Vernaux, Elf_Rel, Elf_Rela, ElfClass>::rebuildGnuHashTable(span<char>, span<Elf_Sym>) [with Elf_Ehdr = Elf64_Ehdr; Elf_Phdr = Elf64_Phdr; Elf_Shdr = Elf64_Shdr; Elf_Addr = long unsigned int; Elf_Off = long unsigned int; Elf_Dyn = Elf64_Dyn; Elf_Sym = Elf64_Sym; Elf_Versym = short unsigned int; Elf_Verdef = Elf64_Verdef; Elf_Verdaux = Elf64_Verdaux; Elf_Verneed = Elf64_Verneed; Elf_Vernaux = Elf64_Vernaux; Elf_Rel = Elf64_Rel; Elf_Rela = Elf64_Rela; unsigned int ElfClass = 64]::<lambda(auto:7&)>', is used but never defined [-fpermissive]
patchelf.h:226:10: error: 'void ElfFile<Elf_Ehdr, Elf_Phdr, Elf_Shdr, Elf_Addr, Elf_Off, Elf_Dyn, Elf_Sym, Elf_Versym, Elf_Verdef, Elf_Verdaux, Elf_Verneed, Elf_Vernaux, Elf_Rel, Elf_Rela, ElfClass>::changeRelocTableSymIds(const Elf_Shdr&, RemapFn&&) [with ElfRelType = Elf64_Rela; RemapFn = ElfFile<Elf_Ehdr, Elf_Phdr, Elf_Shdr, Elf_Addr, Elf_Off, Elf_Dyn, Elf_Sym, Elf_Versym, Elf_Verdef, Elf_Verdaux, Elf_Verneed, Elf_Vernaux, Elf_Rel, Elf_Rela, ElfClass>::rebuildGnuHashTable(span<char>, span<Elf_Sym>) [with Elf_Ehdr = Elf64_Ehdr; Elf_Phdr = Elf64_Phdr; Elf_Shdr = Elf64_Shdr; Elf_Addr = long unsigned int; Elf_Off = long unsigned int; Elf_Dyn = Elf64_Dyn; Elf_Sym = Elf64_Sym; Elf_Versym = short unsigned int; Elf_Verdef = Elf64_Verdef; Elf_Verdaux = Elf64_Verdaux; Elf_Verneed = Elf64_Verneed; Elf_Vernaux = Elf64_Vernaux; Elf_Rel = Elf64_Rel; Elf_Rela = Elf64_Rela; unsigned int ElfClass = 64]::<lambda(auto:7&)>&; Elf_Ehdr = Elf64_Ehdr; Elf_Phdr = Elf64_Phdr; Elf_Shdr = Elf64_Shdr; Elf_Addr = long unsigned int; Elf_Off = long unsigned int; Elf_Dyn = Elf64_Dyn; Elf_Sym = Elf64_Sym; Elf_Versym = short unsigned int; Elf_Verdef = Elf64_Verdef; Elf_Verdaux = Elf64_Verdaux; Elf_Verneed = Elf64_Verneed; Elf_Vernaux = Elf64_Vernaux; Elf_Rel = Elf64_Rel; Elf_Rela = Elf64_Rela; unsigned int ElfClass = 64]', declared using local type 'ElfFile<Elf_Ehdr, Elf_Phdr, Elf_Shdr, Elf_Addr, Elf_Off, Elf_Dyn, Elf_Sym, Elf_Versym, Elf_Verdef, Elf_Verdaux, Elf_Verneed, Elf_Vernaux, Elf_Rel, Elf_Rela, ElfClass>::rebuildGnuHashTable(span<char>, span<Elf_Sym>) [with Elf_Ehdr = Elf64_Ehdr; Elf_Phdr = Elf64_Phdr; Elf_Shdr = Elf64_Shdr; Elf_Addr = long unsigned int; Elf_Off = long unsigned int; Elf_Dyn = Elf64_Dyn; Elf_Sym = Elf64_Sym; Elf_Versym = short unsigned int; Elf_Verdef = Elf64_Verdef; Elf_Verdaux = Elf64_Verdaux; Elf_Verneed = Elf64_Verneed; Elf_Vernaux = Elf64_Vernaux; Elf_Rel = Elf64_Rel; Elf_Rela = Elf64_Rela; unsigned int ElfClass = 64]::<lambda(auto:7&)>', is used but never defined [-fpermissive]
Makefile:380: recipe for target 'patchelf.o' failed
make[5]: *** [patchelf.o] Error 1
make[5]: Leaving directory '/home/lx/LubanCatWrt/build_dir/host/patchelf-0.18.0/src'
Makefile:472: recipe for target 'all-recursive' failed
make[4]: *** [all-recursive] Error 1
make[4]: Leaving directory '/home/lx/LubanCatWrt/build_dir/host/patchelf-0.18.0'
Makefile:30: recipe for target '/home/lx/LubanCatWrt/build_dir/host/patchelf-0.18.0/.built' failed
make[3]: *** [/home/lx/LubanCatWrt/build_dir/host/patchelf-0.18.0/.built] Error 2
make[3]: Leaving directory '/home/lx/LubanCatWrt/tools/patchelf'
time: tools/patchelf/compile#0.82#0.15#1.00
    ERROR: tools/patchelf failed to build.
tools/Makefile:224: recipe for target 'tools/patchelf/compile' failed
make[2]: *** [tools/patchelf/compile] Error 1
make[2]: Leaving directory '/home/lx/LubanCatWrt'
tools/Makefile:222: recipe for target '/home/lx/LubanCatWrt/staging_dir/host/stamp/.tools_compile_nyyynyynnnyyynynyyyyyyynyyynnynyynnynnyyyyyyyyyyyyyyyyynynnyyyyyyy' failed
make[1]: *** [/home/lx/LubanCatWrt/staging_dir/host/stamp/.tools_compile_nyyynyynnnyyynynyyyyyyynyyynnynyynnynnyyyyyyyyyyyyyyyyynynnyyyyyyy] Error 2
make[1]: Leaving directory '/home/lx/LubanCatWrt'


回复

使用道具 举报

发表于 2023-7-28 09:00:17 | 显示全部楼层
下载代码
git clone https://github.com/LubanCat/LubanCatWrt

执行
./scripts/feeds update -a
./scripts/feeds install -a

配置menuconfig
cat config/lubancat_defconfig > .config
make menuconfig

下载dl
make -j8 download

执行编译
make -j$(($(nproc) + 1))
最后看看是不是可以编译过。

回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

联系站长|手机版|野火电子官网|野火淘宝店铺|野火电子论坛 ( 粤ICP备14069197号 ) 大学生ARM嵌入式2群

GMT+8, 2024-11-23 02:16 , Processed in 0.057055 second(s), 27 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表