找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
广告投放联系QQ68610888
查看: 1598|回复: 18

小白求助lede编译报错

[复制链接]
悬赏5恩山币已解决
本帖最后由 jiangteng00 于 2023-2-11 20:12 编辑

系统是ubuntu20.04 LTS虚拟机,编译LEAN大佬的LEDE固件,没有对menuconfig做任何修改,互联网畅通(有运行老版本的openwrt软路由支持),前面的步骤一切顺利,但在编译过程种报错,然后我就转而去编译immortalwrt,结果还是遇到一样的错误,错误如下:

  1. Dependency bash-completion skipped: feature build-bash-completion disabled
  2. WARNING: You should add the boolean check kwarg to the run_command call.
  3.          It currently defaults to false,
  4.          but it will default to true in future releases of meson.
  5.          See also: https://github.com/mesonbuild/meson/issues/9300
  6. Checking if "wchar_t support" compiles: YES
  7. Library m found: YES
  8. Dependency tinfo skipped: feature tinfo disabled
  9. Found pkg-config: /home/jungle/桌面/openwrt/immortalwrt/staging_dir/host/bin/pkg-config (1.9.4)
  10. Traceback (most recent call last):
  11.   File "/home/jungle/桌面/openwrt/immortalwrt/staging_dir/host/bin/meson.py/mesonbuild/mesonmain.py", line 148, in run
  12.     return options.run_func(options)
  13.   File "/home/jungle/桌面/openwrt/immortalwrt/staging_dir/host/bin/meson.py/mesonbuild/msetup.py", line 294, in run
  14.     app.generate()
  15.   File "/home/jungle/桌面/openwrt/immortalwrt/staging_dir/host/bin/meson.py/mesonbuild/msetup.py", line 185, in generate
  16.     self._generate(env)
  17.   File "/home/jungle/桌面/openwrt/immortalwrt/staging_dir/host/bin/meson.py/mesonbuild/msetup.py", line 229, in _generate
  18.     intr.run()
  19.   File "/home/jungle/桌面/openwrt/immortalwrt/staging_dir/host/bin/meson.py/mesonbuild/interpreter/interpreter.py", line 2554, in run
  20.     super().run()
  21.   File "/home/jungle/桌面/openwrt/immortalwrt/staging_dir/host/bin/meson.py/mesonbuild/interpreterbase/interpreterbase.py", line 148, in run
  22.     self.evaluate_codeblock(self.ast, start=1)
  23.   File "/home/jungle/桌面/openwrt/immortalwrt/staging_dir/host/bin/meson.py/mesonbuild/interpreterbase/interpreterbase.py", line 173, in evaluate_codeblock
  24.     raise e
  25.   File "/home/jungle/桌面/openwrt/immortalwrt/staging_dir/host/bin/meson.py/mesonbuild/interpreterbase/interpreterbase.py", line 166, in evaluate_codeblock
  26.     self.evaluate_statement(cur)
  27.   File "/home/jungle/桌面/openwrt/immortalwrt/staging_dir/host/bin/meson.py/mesonbuild/interpreterbase/interpreterbase.py", line 181, in evaluate_statement
  28.     self.assignment(cur)
  29.   File "/home/jungle/桌面/openwrt/immortalwrt/staging_dir/host/bin/meson.py/mesonbuild/interpreterbase/interpreterbase.py", line 566, in assignment
  30.     value = self.evaluate_statement(node.value)
  31.   File "/home/jungle/桌面/openwrt/immortalwrt/staging_dir/host/bin/meson.py/mesonbuild/interpreterbase/interpreterbase.py", line 179, in evaluate_statement
  32.     return self.function_call(cur)
  33.   File "/home/jungle/桌面/openwrt/immortalwrt/staging_dir/host/bin/meson.py/mesonbuild/interpreterbase/interpreterbase.py", line 454, in function_call
  34.     res = func(node, func_args, kwargs)
  35.   File "/home/jungle/桌面/openwrt/immortalwrt/staging_dir/host/bin/meson.py/mesonbuild/interpreterbase/decorators.py", line 768, in wrapped
  36.     return f(*wrapped_args, **wrapped_kwargs)
  37.   File "/home/jungle/桌面/openwrt/immortalwrt/staging_dir/host/bin/meson.py/mesonbuild/interpreterbase/decorators.py", line 768, in wrapped
  38.     return f(*wrapped_args, **wrapped_kwargs)
  39.   File "/home/jungle/桌面/openwrt/immortalwrt/staging_dir/host/bin/meson.py/mesonbuild/interpreterbase/decorators.py", line 768, in wrapped
  40.     return f(*wrapped_args, **wrapped_kwargs)
  41.   [Previous line repeated 5 more times]
  42.   File "/home/jungle/桌面/openwrt/immortalwrt/staging_dir/host/bin/meson.py/mesonbuild/interpreterbase/decorators.py", line 96, in wrapped
  43.     ret = f(*wrapped_args, **wrapped_kwargs)
  44.   File "/home/jungle/桌面/openwrt/immortalwrt/staging_dir/host/bin/meson.py/mesonbuild/interpreterbase/decorators.py", line 115, in wrapped
  45.     return f(*wrapped_args, **wrapped_kwargs)
  46.   File "/home/jungle/桌面/openwrt/immortalwrt/staging_dir/host/bin/meson.py/mesonbuild/interpreterbase/decorators.py", line 276, in wrapper
  47.     return f(*nargs, **wrapped_kwargs)
  48.   File "/home/jungle/桌面/openwrt/immortalwrt/staging_dir/host/bin/meson.py/mesonbuild/interpreter/interpreter.py", line 1577, in func_dependency
  49.     d = df.lookup(kwargs)
  50.   File "/home/jungle/桌面/openwrt/immortalwrt/staging_dir/host/bin/meson.py/mesonbuild/interpreter/dependencyfallbacks.py", line 347, in lookup
  51.     dep = func(kwargs, func_args, func_kwargs)
  52.   File "/home/jungle/桌面/openwrt/immortalwrt/staging_dir/host/bin/meson.py/mesonbuild/interpreter/dependencyfallbacks.py", line 90, in _do_dependency
  53.     dep = dependencies.find_external_dependency(name, self.environment, kwargs)
  54.   File "/home/jungle/桌面/openwrt/immortalwrt/staging_dir/host/bin/meson.py/mesonbuild/dependencies/detect.py", line 114, in find_external_dependency
  55.     d = c()
  56.   File "/home/jungle/桌面/openwrt/immortalwrt/staging_dir/host/bin/meson.py/mesonbuild/dependencies/pkgconfig.py", line 96, in __init__
  57.     self._set_libs()
  58.   File "/home/jungle/桌面/openwrt/immortalwrt/staging_dir/host/bin/meson.py/mesonbuild/dependencies/pkgconfig.py", line 372, in _set_libs
  59.     ret, out, err = self._call_pkgbin(libcmd, env=env)
  60.   File "/home/jungle/桌面/openwrt/immortalwrt/staging_dir/host/bin/meson.py/mesonbuild/dependencies/pkgconfig.py", line 157, in _call_pkgbin
  61.     cache[(self.pkgbin, targs, fenv)] = self._call_pkgbin_real(args, env)
  62.   File "/home/jungle/桌面/openwrt/immortalwrt/staging_dir/host/bin/meson.py/mesonbuild/dependencies/pkgconfig.py", line 115, in _call_pkgbin_real
  63.     p, out, err = Popen_safe(cmd, env=env)
  64.   File "/home/jungle/桌面/openwrt/immortalwrt/staging_dir/host/bin/meson.py/mesonbuild/mesonlib/universal.py", line 1397, in Popen_safe
  65.     o, e = p.communicate(write)
  66.   File "/usr/lib/python3.8/subprocess.py", line 1028, in communicate
  67.     stdout, stderr = self._communicate(input, endtime, timeout)
  68.   File "/usr/lib/python3.8/subprocess.py", line 1906, in _communicate
  69.     stdout = self._translate_newlines(stdout,
  70.   File "/usr/lib/python3.8/subprocess.py", line 905, in _translate_newlines
  71.     data = data.decode(encoding, errors)
  72. UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe6 in position 16: invalid continuation byte

  73. ../../../build_dir/target-x86_64_musl/util-linux-2.38.1/meson.build:214:0: ERROR: Unhandled python exception

  74.     This is a Meson bug and should be reported!
  75. make[3]: *** [Makefile:878: /home/jungle/桌面/openwrt/immortalwrt/build_dir/target-x86_64_musl/util-linux-2.38.1/.configured_68b329da9893e34099c7d8ad5cb9c940] Error 2
  76. make[3]: Leaving directory '/home/jungle/桌面/openwrt/immortalwrt/package/utils/util-linux'
  77. time: package/utils/util-linux/compile#0.95#0.12#1.13
  78.     ERROR: package/utils/util-linux failed to build.
  79. make[2]: *** [package/Makefile:116: package/utils/util-linux/compile] Error 1
  80. make[2]: Leaving directory '/home/jungle/桌面/openwrt/immortalwrt'
  81. make[1]: *** [package/Makefile:110: /home/jungle/桌面/openwrt/immortalwrt/staging_dir/target-x86_64_musl/stamp/.package_compile] Error 2
  82. make[1]: Leaving directory '/home/jungle/桌面/openwrt/immortalwrt'
  83. make: *** [/home/jungle/桌面/openwrt/immortalwrt/include/toplevel.mk:231:world] 错误 2
复制代码

可以看到和meson这个组件以及python3.8的编码有关,但我谷歌很久没能找到解决方法,搞了一整天了,很痛苦,求大佬指点。

最佳答案

查看完整内容

你這路徑有中文了肯定有問題,ubuntu直接裝服務器版的不要中文環境自己SSH進去編譯保證成功
我的恩山、我的无线 The best wifi forum is right here.
你這路徑有中文了肯定有問題,ubuntu直接裝服務器版的不要中文環境自己SSH進去編譯保證成功

点评

确实是中文路径的问题,,重新装了ubuntu desktop不装中文支持就可以编译完成了,谢谢大佬。  详情 回复 发表于 2023-2-17 11:13
好的大佬,我再试试!!  详情 回复 发表于 2023-2-13 19:26
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

本帖最后由 KK2019es 于 2023-2-11 14:02 编辑

感觉还是梯子不够顺畅造成的报错。


全删除了,
编译前,
make download 多几次试试看。

点评

make download没有任何报错  详情 回复 发表于 2023-2-11 15:01
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

没有图呃
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

自己的编译环境很容易出问题、之前我也按教程一步一步来、都会失败、最终放弃
后来用github action还能成功

点评

是的,绝望了,不过action要怎么用啊,有没有教程  详情 回复 发表于 2023-2-11 15:02
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

 楼主| | 显示全部楼层
KK2019es 发表于 2023-2-11 14:00
感觉还是梯子不够顺畅造成的报错。

make download没有任何报错
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

 楼主| | 显示全部楼层
jasonandzs 发表于 2023-2-11 14:57
自己的编译环境很容易出问题、之前我也按教程一步一步来、都会失败、最终放弃
后来用github action还能成功 ...

是的,绝望了,不过action要怎么用啊,有没有教程
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

jiangteng00 发表于 2023-2-11 15:02
是的,绝望了,不过action要怎么用啊,有没有教程

油管上搜搜   bigdongdong、esir、他俩的教程
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

来自手机 | 显示全部楼层
我自己本机编译也是这样,每次的错误都不一样搞得心态崩了,不想弄了

点评

我是每次编译都这个错误,在报错之前已经编译了一个小时了,我感觉能解决这个应该就快完成了,不知道是不是新版本的bug  详情 回复 发表于 2023-2-11 19:45
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

 楼主| | 显示全部楼层
kover 发表于 2023-2-11 17:41
我自己本机编译也是这样,每次的错误都不一样搞得心态崩了,不想弄了

我是每次编译都这个错误,在报错之前已经编译了一个小时了,我感觉能解决这个应该就快完成了,不知道是不是新版本的bug

点评

才编译一个小时?我都编译了12小时,报错功亏一篑,白努力浪费电了。我用国外的主机编译也一样有错,真怀疑源代码有问题  详情 回复 发表于 2023-2-11 21:19
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

jiangteng00 发表于 2023-2-11 19:45
我是每次编译都这个错误,在报错之前已经编译了一个小时了,我感觉能解决这个应该就快完成了,不知道是不 ...

才编译一个小时?我都编译了12小时,报错功亏一篑,白努力浪费电了。我用国外的主机编译也一样有错,真怀疑源代码有问题

点评

但是用github的actions脚本编译同一个仓库又确实没问题。。。估计本地环境和github云端搭建的环境还是有差异,大概率就是这个python3的问题  详情 回复 发表于 2023-2-13 09:23
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

来自手机 | 显示全部楼层
用SDK编译ipk功能包,用imagebuilder集成打包(已编译好的ipk)编译固件吧,云编译也是imagebuilder方式,
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

无解,用官方openwrt编译一定没错
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

官方可以用这个快速编译,https://firmware-selector.openwrt.org/

点评

N1要选哪个型号?里面没有N1这个啊  详情 回复 发表于 2023-2-13 16:02
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

 楼主| | 显示全部楼层
kover 发表于 2023-2-11 21:19
才编译一个小时?我都编译了12小时,报错功亏一篑,白努力浪费电了。我用国外的主机编译也一样有错,真怀 ...

但是用github的actions脚本编译同一个仓库又确实没问题。。。估计本地环境和github云端搭建的环境还是有差异,大概率就是这个python3的问题
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

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

本版积分规则

有疑问请添加管理员QQ86788181|手机版|小黑屋|Archiver|恩山无线论坛(常州市恩山计算机开发有限公司版权所有) ( 苏ICP备05084872号 )

GMT+8, 2024-4-27 15:06

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

| 江苏省互联网有害信息举报中心 举报信箱:js12377 | @jischina.com.cn 举报电话:025-88802724 本站不良内容举报信箱:68610888@qq.com 举报电话:0519-86695797

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