Closed liangyongxiang closed 1 year ago
这次的问题我没有什么头绪,我初步判断可能跟你系统的python环境有关,你用下面的步骤调试一下看看: 1、进入构建模式环境: tools/enter_package_env.sh cross-tools 2、进入rust源码目录 3、执行配置脚本 python3 src/bootstrap/configure.py --target=${CROSS_TARGET},$(echo ${CROSS_HOST} | sed 's@cross@unknown@g') \ --prefix=${CROSSTOOLS_DIR} --sysconfdir=${SYSROOT_DIR}/etc \ --local-rust-root=${CROSSTOOLS_DIR}/rust/usr/local \ --enable-extended --enable-vendor --release-channel=stable \ --disable-codegen-tests --experimental-targets="" 看一下是否还是报错
按照上面的步骤复现问题后,我在出错前的代码里print
python3 src/bootstrap/configure.py --target=${CROSS_TARGET},$(echo ${CROSS_HOST} | sed 's@cross@unknown@g') --prefix=${CROSSTOOLS_DIR} --sysconfdir=${SYSROOT_DIR}/etc --local-rust-root=${CROSSTOOLS_DIR}/rust/usr/local --enable-extended --enable-vendor --release-channel=stable --disable-codegen-tests --experimental-targets=""
configure: processing command line
configure:
configure: build.configure-args := ['--target=loongarch64-unknown-linux-gnu,x86_6 ...
b'Linux x86_64 AMD Ryzen 9 5950X 16-Core Processor'
Linux x86_64 AMD Ryzen 9 5950X 16-Core Processor
['Linux', 'x86_64', 'AMD', 'Ryzen', '9', '5950X', '16-Core', 'Processor']
Traceback (most recent call last):
File "/home/yongxiang/work/loong/Yongbao/loongarch64/workbase/build/rustc-1.72.0-src/src/bootstrap/configure.py", line 557, in <module>
section_order, sections, targets = parse_args(sys.argv[1:])
^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/yongxiang/work/loong/Yongbao/loongarch64/workbase/build/rustc-1.72.0-src/src/bootstrap/configure.py", line 284, in parse_args
apply_args(known_args, option_checking, config)
File "/home/yongxiang/work/loong/Yongbao/loongarch64/workbase/build/rustc-1.72.0-src/src/bootstrap/configure.py", line 346, in apply_args
build_triple = build(known_args)
^^^^^^^^^^^^^^^^^
File "/home/yongxiang/work/loong/Yongbao/loongarch64/workbase/build/rustc-1.72.0-src/src/bootstrap/configure.py", line 291, in build
return bootstrap.default_build_triple(verbose=False)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/yongxiang/work/loong/Yongbao/loongarch64/workbase/build/rustc-1.72.0-src/src/bootstrap/bootstrap.py", line 263, in default_build_triple
kernel, cputype, processor = uname.decode(default_encoding).split()
^^^^^^^^^^^^^^^^^^^^^^^^^^
ValueError: too many values to unpack (expected 3)
那我加个补丁。
已更新,可同步一下。
测试可以编译了。
rustc_cross-tools_00023.log:https://gist.github.com/liangyongxiang/c6dc9d3a2bcd6d5e3ef28e42e68a707b
raw log file: https://gist.githubusercontent.com/liangyongxiang/c6dc9d3a2bcd6d5e3ef28e42e68a707b/raw/3deba07c76cfee0a98a1bb56bf7e2e89095a3cfb/homeyongxiangworkloongYongbaoloongarch64workbaselogsrustc_cross-tools_00023.log