Bug: can not download gcc & busybox on host(not docker env)
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 35/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- python
- Lĩnh vực
- build-system
Hướng nghiên cứu
Bắt đầu với meta-smart/recipes-devtools/toolchain/smart-gcc_0.1.bb tại do_install_toolchain và meta-smart/recipes-core/busybox/busybox_0.1.bb tại do_build_rootfs. Tái hiện bitbake smart -c build_all và so sánh hành vi của BitBake fetcher với các lệnh wget thủ công đã thực hiện thành công. Được coi là hoàn tất khi cả hai lượt tải xuống đều hoàn thành trong quá trình build mà không cần sao chép thủ công các archive.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 22.04.5 LTS
Release: 22.04
Codename: jammy
测试 MACHINE ??= "qemuriscv64"
运行 bitbake smart -c build_all 后遇到以下错误输出
##############################
****** Not find local or default toolchain, download and unpacked to: /home/u/ws/test-rtt/smart-build/build/toolchains
****** Begin downloading...
WARNING: smart-gcc-0.1-r0 do_install_toolchain: Failed to fetch URL https://download.rt-thread.org/download/rt-smart/toolchains/riscv64-linux-musleabi_for_x86_64-pc-linux-gnu_latest.tar.bz2, attempting MIRRORS if available
ERROR: smart-gcc-0.1-r0 do_install_toolchain: Fetcher failure: Fetch command export PSEUDO_DISABLED=1; export DBUS_SESSION_BUS_ADDRESS="unix:path=/run/user/1000/bus"; export PATH="/home/u/ws/test-rtt/smart-build/oe-core/scripts:/home/u/ws/test-rtt/smart-build/build/tmp/work/riscv64-oe-linux/smart-gcc/0.1/recipe-sysroot-native/usr/bin/riscv64-oe-linux:/home/u/ws/test-rtt/smart-build/build/tmp/work/riscv64-oe-linux/smart-gcc/0.1/recipe-sysroot/usr/bin/crossscripts:/home/u/ws/test-rtt/smart-build/build/tmp/work/riscv64-oe-linux/smart-gcc/0.1/recipe-sysroot-native/usr/sbin:/home/u/ws/test-rtt/smart-build/build/tmp/work/riscv64-oe-linux/smart-gcc/0.1/recipe-sysroot-native/usr/bin:/home/u/ws/test-rtt/smart-build/build/tmp/work/riscv64-oe-linux/smart-gcc/0.1/recipe-sysroot-native/sbin:/home/u/ws/test-rtt/smart-build/build/tmp/work/riscv64-oe-linux/smart-gcc/0.1/recipe-sysroot-native/bin:/home/u/ws/test-rtt/smart-build/bitbake/bin:/home/u/ws/test-rtt/smart-build/build/tmp/hosttools:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/home/u/ws/test-rtt/smart-build/build/toolchains/aarch64-linux-musleabi_for_x86_64-pc-linux-gnu/bin:/home/u/ws/test-rtt/smart-build/build/toolchains/aarch64-linux-musleabi_for_x86_64-pc-linux-gnu/aarch64-linux-musleabi/bin:/home/u/ws/test-rtt/smart-build/build/toolchains/riscv64-linux-musleabi_for_x86_64-pc-linux-gnu/bin:/home/u/ws/test-rtt/smart-build/build/toolchains/riscv64-linux-musleabi_for_x86_64-pc-linux-gnu/riscv64-linux-musleabi/bin"; export HOME="/home/u"; /usr/bin/env wget --tries=2 --timeout=100 --output-document=/home/u/ws/test-rtt/smart-build/build/downloads/riscv64-linux-musleabi_for_x86_64-pc-linux-gnu_latest.tar.bz2.tmp --continue --directory-prefix=/home/u/ws/test-rtt/smart-build/build/downloads 'https://download.rt-thread.org/download/rt-smart/toolchains/riscv64-linux-musleabi_for_x86_64-pc-linux-gnu_latest.tar.bz2' --progress=dot --verbose failed with exit code 4, see logfile for output
ERROR: smart-gcc-0.1-r0 do_install_toolchain: Error executing a python function in exec_func_python() autogenerated:
The stack trace of python calls that resulted in this exception/failure was:
File: 'exec_func_python() autogenerated', lineno: 2, function: <module>
0001:
*** 0002:do_install_toolchain(d)
0003:
File: '/home/u/ws/test-rtt/smart-build/meta-smart/recipes-devtools/toolchain/smart-gcc_0.1.bb', lineno: 50, function: do_install_toolchain
0046: bb.plain("****** Not find local or default toolchain, download and unpacked to: " + tpath)
0047: uri = tc_url.split()
0048: fetcher = bb.fetch2.Fetch(uri, d)
0049: bb.plain("****** Begin downloading...")
*** 0050: fetcher.download()
0051: bb.plain("****** Begin unpacking...")
0052: if not os.path.exists(tpath):
0053: os.makedirs(tpath)
0054: fetcher.unpack(tpath)
File: '/home/u/ws/test-rtt/smart-build/bitbake/lib/bb/fetch2/__init__.py', lineno: 1936, function: download
1932:
1933: if not done or not m.done(ud, d):
1934: if firsterr:
1935: logger.error(str(firsterr))
*** 1936: raise FetchError("Unable to fetch URL from any source.", u)
1937:
1938: m.update_donestamp(ud, d)
1939:
1940: except IOError as e:
Exception: bb.fetch2.FetchError: Fetcher failure for URL: 'https://download.rt-thread.org/download/rt-smart/toolchains/riscv64-linux-musleabi_for_x86_64-pc-linux-gnu_latest.tar.bz2'. Unable to fetch URL from any source.
ERROR: Logfile of failure stored in: /home/u/ws/test-rtt/smart-build/build/tmp/work/riscv64-oe-linux/smart-gcc/0.1/temp/log.do_install_toolchain.26329
ERROR: Task (/home/u/ws/test-rtt/smart-build/meta-smart/recipes-devtools/toolchain/smart-gcc_0.1.bb:do_install_toolchain) failed with exit code '1'
NOTE: Tasks Summary: Attempted 2 tasks of which 0 didn't need to be rerun and 1 failed.
Summary: 1 task failed:
/home/u/ws/test-rtt/smart-build/meta-smart/recipes-devtools/toolchain/smart-gcc_0.1.bb:do_install_toolchain
log: /home/u/ws/test-rtt/smart-build/build/tmp/work/riscv64-oe-linux/smart-gcc/0.1/temp/log.do_install_toolchain.26329
Summary: There was 1 WARNING message.
Summary: There were 2 ERROR messages, returning a non-zero exit code.
手动下载 gcc 可以成功,
$ wget https://download.rt-thread.org/download/rt-smart/toolchains/riscv64-linux-musleabi_for_x86_64-pc-linux-gnu_latest.tar.bz2
--2025-06-17 08:30:20-- https://download.rt-thread.org/download/rt-smart/toolchains/riscv64-linux-musleabi_for_x86_64-pc-linux-gnu_latest.tar.bz2
Resolving download.rt-thread.org (download.rt-thread.org)... 240e:978:306:3:3::3fa, 61.160.192.100
Connecting to download.rt-thread.org (download.rt-thread.org)|240e:978:306:3:3::3fa|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 67832946 (65M) [application/x-bzip2]
Saving to: ‘riscv64-linux-musleabi_for_x86_64-pc-linux-gnu_latest.tar.bz2’
riscv64-linux-musleabi_for_x86_64- 100%[=============================================================>] 64.69M 10.6MB/s in 6.1s
2025-06-17 08:30:27 (10.6 MB/s) - ‘riscv64-linux-musleabi_for_x86_64-pc-linux-gnu_latest.tar.bz2’ saved [67832946/67832946]
copy 到 smart-build/build/downloads 下然后再次运行 bitbake smart -c build_all 报错:
##############################
****** Begin downloading busybox...
WARNING: busybox-0.1-r0 do_build_rootfs: Failed to fetch URL https://www.busybox.net/downloads/busybox-1.35.0.tar.bz2;md5sum=585949b1dd4292b604b7d199866e9913, attempting MIRRORS if available
ERROR: busybox-0.1-r0 do_build_rootfs: Fetcher failure: Fetch command export PSEUDO_DISABLED=1; export DBUS_SESSION_BUS_ADDRESS="unix:path=/run/user/1000/bus"; export PATH="/home/u/ws/test-rtt/smart-build/oe-core/scripts:/home/u/ws/test-rtt/smart-build/build/tmp/work/riscv64-oe-linux/busybox/0.1/recipe-sysroot-native/usr/bin/riscv64-oe-linux:/home/u/ws/test-rtt/smart-build/build/tmp/work/riscv64-oe-linux/busybox/0.1/recipe-sysroot/usr/bin/crossscripts:/home/u/ws/test-rtt/smart-build/build/tmp/work/riscv64-oe-linux/busybox/0.1/recipe-sysroot-native/usr/sbin:/home/u/ws/test-rtt/smart-build/build/tmp/work/riscv64-oe-linux/busybox/0.1/recipe-sysroot-native/usr/bin:/home/u/ws/test-rtt/smart-build/build/tmp/work/riscv64-oe-linux/busybox/0.1/recipe-sysroot-native/sbin:/home/u/ws/test-rtt/smart-build/build/tmp/work/riscv64-oe-linux/busybox/0.1/recipe-sysroot-native/bin:/home/u/ws/test-rtt/smart-build/bitbake/bin:/home/u/ws/test-rtt/smart-build/build/tmp/hosttools:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/home/u/ws/test-rtt/smart-build/build/toolchains/aarch64-linux-musleabi_for_x86_64-pc-linux-gnu/bin:/home/u/ws/test-rtt/smart-build/build/toolchains/aarch64-linux-musleabi_for_x86_64-pc-linux-gnu/aarch64-linux-musleabi/bin:/home/u/ws/test-rtt/smart-build/build/toolchains/riscv64-linux-musleabi_for_x86_64-pc-linux-gnu/bin:/home/u/ws/test-rtt/smart-build/build/toolchains/riscv64-linux-musleabi_for_x86_64-pc-linux-gnu/riscv64-linux-musleabi/bin"; export HOME="/home/u"; /usr/bin/env wget --tries=2 --timeout=100 --output-document=/home/u/ws/test-rtt/smart-build/build/downloads/busybox-1.35.0.tar.bz2.tmp --continue --directory-prefix=/home/u/ws/test-rtt/smart-build/build/downloads 'https://www.busybox.net/downloads/busybox-1.35.0.tar.bz2' --progress=dot --verbose failed with exit code 4, see logfile for output
ERROR: busybox-0.1-r0 do_build_rootfs: Error executing a python function in exec_func_python() autogenerated:
The stack trace of python calls that resulted in this exception/failure was:
File: 'exec_func_python() autogenerated', lineno: 2, function: <module>
0001:
*** 0002:do_build_rootfs(d)
0003:
File: '/home/u/ws/test-rtt/smart-build/meta-smart/recipes-core/busybox/busybox_0.1.bb', lineno: 22, function: do_build_rootfs
0018: bb.plain("##############################")
0019: uri = d.getVar('SRC_URI').split()
0020: fetcher = bb.fetch2.Fetch(uri, d)
0021: bb.plain("****** Begin downloading busybox...")
*** 0022: fetcher.download()
0023: bb.plain("****** Begin unpacking busybox...")
0024: fetcher.unpack(d.getVar('WORKDIR'))
0025: bb.plain("****** Finished downloading busybox.")
0026: bb.build.exec_func('do_compile', d)
File: '/home/u/ws/test-rtt/smart-build/bitbake/lib/bb/fetch2/__init__.py', lineno: 1936, function: download
1932:
1933: if not done or not m.done(ud, d):
1934: if firsterr:
1935: logger.error(str(firsterr))
*** 1936: raise FetchError("Unable to fetch URL from any source.", u)
1937:
1938: m.update_donestamp(ud, d)
1939:
1940: except IOError as e:
Exception: bb.fetch2.FetchError: Fetcher failure for URL: 'https://www.busybox.net/downloads/busybox-1.35.0.tar.bz2;md5sum=585949b1dd4292b604b7d199866e9913'. Unable to fetch URL from any source.
ERROR: Logfile of failure stored in: /home/u/ws/test-rtt/smart-build/build/tmp/work/riscv64-oe-linux/busybox/0.1/temp/log.do_build_rootfs.26508
ERROR: Task (/home/u/ws/test-rtt/smart-build/meta-smart/recipes-core/busybox/busybox_0.1.bb:do_build_rootfs) failed with exit code '1'
NOTE: Tasks Summary: Attempted 4 tasks of which 1 didn't need to be rerun and 1 failed.
Summary: 1 task failed:
/home/u/ws/test-rtt/smart-build/meta-smart/recipes-core/busybox/busybox_0.1.bb:do_build_rootfs
log: /home/u/ws/test-rtt/smart-build/build/tmp/work/riscv64-oe-linux/busybox/0.1/temp/log.do_build_rootfs.26508
Summary: There were 3 WARNING messages.
Summary: There were 2 ERROR messages, returning a non-zero exit code.
再次手动下载 busybox 可以成功,
$ wget https://www.busybox.net/downloads/busybox-1.35.0.tar.bz2
--2025-06-17 08:29:28-- https://www.busybox.net/downloads/busybox-1.35.0.tar.bz2
Resolving www.busybox.net (www.busybox.net)... 140.211.167.122
Connecting to www.busybox.net (www.busybox.net)|140.211.167.122|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 2480624 (2.4M) [application/x-bzip2]
Saving to: ‘busybox-1.35.0.tar.bz2’
busybox-1.35.0.tar.bz2 100%[=============================================================>] 2.37M 664KB/s in 3.7s
2025-06-17 08:29:46 (664 KB/s) - ‘busybox-1.35.0.tar.bz2’ saved [2480624/2480624]
copy 到 smart-build/build/downloads 下然后再次运行 bitbake smart -c build_all 完成!
- Ngôn ngữ chính
- Python
- Star
- 1
- Fork
- 9
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của RT-Thread/smart-build
-
持续更新... [需求]Đang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 15/100
RT-Thread/smart-build#29 · 4 bình luận ·
-
smart的工具链下载地址Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 35/100
RT-Thread/smart-build#19 ·
-
使用OpenEmbedded的情况Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 45/100
RT-Thread/smart-build#14 · 1 bình luận ·
-
评估OpenEmbedded构建工具Đang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 15/100
RT-Thread/smart-build#11 · 3 bình luận ·
Tất cả issue của RT-Thread/smart-build
Issue tương tự
-
bug server
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
sportsdataverse/sportsdataverse-py#641 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
googleapis/google-cloud-python#18532 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày