RDK S100离线镜像构建./pack_image.sh -l 报错

Traceback (most recent call last):
File “/usr/lib/python3.10/runpy.py”, line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File “/usr/lib/python3.10/runpy.py”, line 86, in _run_code
exec(code, run_globals)
File “/usr/local/lib/python3.10/dist-packages/auditwheel/main.py”, line 8, in
sys.exit(main())
File “/usr/local/lib/python3.10/dist-packages/auditwheel/main.py”, line 50, in main
result: int | None = args.func(args, p)
File “/usr/local/lib/python3.10/dist-packages/auditwheel/main_repair.py”, line 279, in execute
patcher = ElfPatcher.get_patcher(args.PATCHER, requested_policy.name)
File “/usr/local/lib/python3.10/dist-packages/auditwheel/patcher.py”, line 95, in get_patcher
return _Patchelf(variant=patcher, platform=platform)
File “/usr/local/lib/python3.10/dist-packages/auditwheel/patcher.py”, line 152, in init
self._patchelf_path = str(_verify_patchelf(variant))
File “/usr/local/lib/python3.10/dist-packages/auditwheel/patcher.py”, line 146, in _verify_patchelf
raise ValueError(msg)
ValueError: patchelf 0.14.3 found. auditwheel repair requires patchelf >= 0.14.5.
dpkg: error processing package hobot-dnn (–install):
installed hobot-dnn package post-installation script subprocess returned error exit status 1
Setting up hobot-firmware (4.0.5-20260507202525) …
Setting up hobot-miniboot (4.0.5-20260402203050) …
Setting up hobot-models-basic (4.0.6) …
Setting up hobot-multimedia (4.0.5-20260211103855) …
dpkg: dependency problems prevent configuration of hobot-spdev:
hobot-spdev depends on hobot-dnn; however:
Package hobot-dnn is not configured yet.

dpkg: error processing package hobot-spdev (–install):
dependency problems - leaving unconfigured
Setting up hobot-utils (4.0.5-20260211104941) …
Setting up hobot-wifi (4.0.5-20260211103824) …
Synchronizing state of hobot-wifi.service with SysV service script with /lib/systemd/systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install enable hobot-wifi
Created symlink /etc/systemd/system/multi-user.target.wants/hobot-wifi.service → /lib/systemd/system/hobot-wifi.service.
Synchronizing state of hobot-bluetooth.service with SysV service script with /lib/systemd/systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install enable hobot-bluetooth
Created symlink /etc/systemd/system/multi-user.target.wants/hobot-bluetooth.service → /lib/systemd/system/hobot-bluetooth.service.
Setting up libteec1:arm64 (3.19.0-1.drobotic1) …
Setting up linux-headers-6.1.158-rt58 (6.1.158-rt58-DR-4.0.5-2605072025-g7bb74b-gd7fa6f-1) …
Setting up linux-image-rdk-s100 (6.1.158-rt58-DR-4.0.5-2605072025-g7bb74b-gd7fa6f-1) …
update-initramfs: Generating /boot/initrd.img-6.1.158-rt58-DR-4.0.5-2605072025-g7bb74b-gd7fa6f
Setting up tee-supplicant (3.19.0-2.drobotic1) …
Created symlink /etc/systemd/system/multi-user.target.wants/tee-supplicant.service → /lib/systemd/system/tee-supplicant.service.
Setting up hobot-configs (4.0.5-20260211104956) …
hobot-rc.service is not a native service, redirecting to systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install enable hobot-rc
usbsel.service is not a native service, redirecting to systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install enable usbsel
hobot-resizefs.service is not a native service, redirecting to systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install enable hobot-resizefs
hobot-firstrun.service is not a native service, redirecting to systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install enable hobot-firstrun
Created symlink /etc/systemd/system/multi-user.target.wants/hobot-set_led_status.service → /lib/systemd/system/hobot-set_led_status.service.
Created symlink /etc/systemd/system/getty.target.wants/serial-getty@ttyS0.service → /lib/systemd/system/serial-getty@.service.
hobot-cpu-config.service is not a native service, redirecting to systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install enable hobot-cpu-config
dpkg-query: package ‘lightdm’ is not installed and no information is available
Use dpkg --info (= dpkg-deb --info) to examine archive files.
/usr/sbin/dpkg-reconfigure: lightdm is not installed
Running in chroot, ignoring command ‘daemon-reload’
sudo: unable to resolve host 3a5dbbe3dce3: Name or service not known
Removed /etc/systemd/system/dbus-fi.w1.wpa_supplicant1.service.
Removed /etc/systemd/system/multi-user.target.wants/wpa_supplicant.service.
Failed to disable unit, unit sysstat.service does not exist.
start load ko service …
Created symlink /etc/systemd/system/sysinit.target.wants/hobot-loadko.service → /lib/systemd/system/hobot-loadko.service.
start mount service …
Created symlink /etc/systemd/system/sysinit.target.wants/hobot-mount.service → /lib/systemd/system/hobot-mount.service.
start defaultip service …
Created symlink /etc/systemd/system/sysinit.target.wants/hobot-defaultip.service → /lib/systemd/system/hobot-defaultip.service.
start powerinit service …
Created symlink /etc/systemd/system/sysinit.target.wants/hobot-powerinit.service → /lib/systemd/system/hobot-powerinit.service.
start ota tool service …
Created symlink /etc/systemd/system/sysinit.target.wants/hobot-otatool.service → /lib/systemd/system/hobot-otatool.service.
start adbd service …
Created symlink /etc/systemd/system/multi-user.target.wants/hobot-adbd.service → /lib/systemd/system/hobot-adbd.service.
start log daemon service …
Created symlink /etc/systemd/system/basic.target.wants/hobot-log-daemon.service → /lib/systemd/system/hobot-log-daemon.service.
Created symlink /etc/systemd/system/basic.target.wants/hobot-log-klogd.service → /lib/systemd/system/hobot-log-klogd.service.
Created symlink /etc/systemd/system/basic.target.wants/hobot-log-syslogd.service → /lib/systemd/system/hobot-log-syslogd.service.
Created symlink /etc/systemd/system/basic.target.wants/hobot-log-logcat.service → /lib/systemd/system/hobot-log-logcat.service.
Created symlink /etc/systemd/system/basic.target.wants/hobot-log-bl31.service → /lib/systemd/system/hobot-log-bl31.service.
Created symlink /etc/systemd/system/basic.target.wants/hobot-log-optee.service → /lib/systemd/system/hobot-log-optee.service.
Created symlink /etc/systemd/system/basic.target.wants/hobot-log-dsp0.service → /lib/systemd/system/hobot-log-dsp0.service.
Created symlink /etc/systemd/system/basic.target.wants/hobot-log-bpu0.service → /lib/systemd/system/hobot-log-bpu0.service.
Created symlink /etc/systemd/system/basic.target.wants/hobot-log-mcu.service → /lib/systemd/system/hobot-log-mcu.service.
Created symlink /etc/systemd/system/basic.target.wants/hobot-log-hsm.service → /lib/systemd/system/hobot-log-hsm.service.
Created symlink /etc/systemd/system/basic.target.wants/hobot-log-rename.service → /lib/systemd/system/hobot-log-rename.service.
/usr/bin/cat: /sys/class/boardinfo/soc_name: No such file or directory
Created symlink /etc/systemd/system/basic.target.wants/hobot-log-lantin.service → /lib/systemd/system/hobot-log-lantin.service.
Created symlink /etc/systemd/system/basic.target.wants/hobot-lantin-vptp.service → /lib/systemd/system/hobot-lantin-vptp.service.
start stackdump service …
Created symlink /etc/systemd/system/basic.target.wants/hobot-stackdump.service → /lib/systemd/system/hobot-stackdump.service.
start minidump service …
Created symlink /etc/systemd/system/basic.target.wants/hobot-minidump.service → /lib/systemd/system/hobot-minidump.service.
start hobot crypttab service …
Created symlink /etc/systemd/system/multi-user.target.wants/hobot-crypttab.service → /lib/systemd/system/hobot-crypttab.service.
start bl31 log timesync service …
Created symlink /etc/systemd/system/basic.target.wants/hobot-log-bl31-timesync.service → /lib/systemd/system/hobot-log-bl31-timesync.service.
start qga service …
Created symlink /etc/systemd/system/basic.target.wants/hobot-qemu-guest-agent.service → /lib/systemd/system/hobot-qemu-guest-agent.service.
start hobot-reboot service …
Created symlink /etc/systemd/system/shutdown.target.wants/hobot-reboot.service → /lib/systemd/system/hobot-reboot.service.
Created symlink /etc/systemd/system/reboot.target.wants/hobot-reboot.service → /lib/systemd/system/hobot-reboot.service.
Created symlink /etc/systemd/system/halt.target.wants/hobot-reboot.service → /lib/systemd/system/hobot-reboot.service.
start power management service …
Created symlink /etc/systemd/system/multi-user.target.wants/hobot_pms.service → /lib/systemd/system/hobot_pms.service.
/usr/bin/cp: cannot stat ‘/tmp/netplan_update_bak/*’: No such file or directory
Updating udev hwdb and reloading rules …
Running in chroot, ignoring request.
Running in chroot, ignoring request.
Setting up hobot-ethercat (4.0.5-20260507210125) …
In host build stage, wouldn’t run below hobot-ethercat.postinstlogic…
Setting up hobot-multimedia-dev (4.0.5-20260317191728) …
Setting up hobot-multimedia-samples (4.0.5-20260211104018) …
dpkg: dependency problems prevent configuration of hobot-sp-samples:
hobot-sp-samples depends on hobot-spdev; however:
Package hobot-spdev is not configured yet.

dpkg: error processing package hobot-sp-samples (–install):
dependency problems - leaving unconfigured
Setting up hobot-io (4.0.5-20260211104955) …
Building extension…
running build_ext
building ‘pyhbipchal’ extension
creating build
creating build/temp.linux-aarch64-3.10
aarch64-linux-gnu-gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/local/lib/python3.10/dist-packages/pybind11/include -I/usr/hobot/include/ -I/usr/include/python3.10 -c bindings.cpp -o build/temp.linux-aarch64-3.10/bindings.o
creating build/lib.linux-aarch64-3.10
aarch64-linux-gnu-g++ -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -g -fwrapv -O2 -Wl,-Bsymbolic-functions -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 build/temp.linux-aarch64-3.10/bindings.o -L/usr/hobot/lib/ -lhbipcfhal -o build/lib.linux-aarch64-3.10/pyhbipchal.cpython-310-aarch64-linux-gnu.so
copying build/lib.linux-aarch64-3.10/pyhbipchal.cpython-310-aarch64-linux-gnu.so →
Build complete.
Installing package…
running install
/usr/lib/python3/dist-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
warnings.warn(
/usr/lib/python3/dist-packages/setuptools/command/easy_install.py:158: EasyInstallDeprecationWarning: easy_install command is deprecated. Use build and pip and other standards-based tools.
warnings.warn(
running bdist_egg
running egg_info
creating pyhbipchal.egg-info
writing pyhbipchal.egg-info/PKG-INFO
writing dependency_links to pyhbipchal.egg-info/dependency_links.txt
writing top-level names to pyhbipchal.egg-info/top_level.txt
writing manifest file ‘pyhbipchal.egg-info/SOURCES.txt’
reading manifest file ‘pyhbipchal.egg-info/SOURCES.txt’
writing manifest file ‘pyhbipchal.egg-info/SOURCES.txt’
installing library code to build/bdist.linux-aarch64/egg
running install_lib
running build_ext
creating build/bdist.linux-aarch64
creating build/bdist.linux-aarch64/egg
copying build/lib.linux-aarch64-3.10/pyhbipchal.cpython-310-aarch64-linux-gnu.so → build/bdist.linux-aarch64/egg
creating stub loader for pyhbipchal.cpython-310-aarch64-linux-gnu.so
byte-compiling build/bdist.linux-aarch64/egg/pyhbipchal.py to pyhbipchal.cpython-310.pyc
creating build/bdist.linux-aarch64/egg/EGG-INFO
copying pyhbipchal.egg-info/PKG-INFO → build/bdist.linux-aarch64/egg/EGG-INFO
copying pyhbipchal.egg-info/SOURCES.txt → build/bdist.linux-aarch64/egg/EGG-INFO
copying pyhbipchal.egg-info/dependency_links.txt → build/bdist.linux-aarch64/egg/EGG-INFO
copying pyhbipchal.egg-info/top_level.txt → build/bdist.linux-aarch64/egg/EGG-INFO
writing build/bdist.linux-aarch64/egg/EGG-INFO/native_libs.txt
zip_safe flag not set; analyzing archive contents…
pycache.pyhbipchal.cpython-310: module references file
creating dist
creating ‘dist/pyhbipchal-0.0.1-py3.10-linux-aarch64.egg’ and adding ‘build/bdist.linux-aarch64/egg’ to it
removing ‘build/bdist.linux-aarch64/egg’ (and everything under it)
Processing pyhbipchal-0.0.1-py3.10-linux-aarch64.egg
creating /usr/local/lib/python3.10/dist-packages/pyhbipchal-0.0.1-py3.10-linux-aarch64.egg
Extracting pyhbipchal-0.0.1-py3.10-linux-aarch64.egg to /usr/local/lib/python3.10/dist-packages
Adding pyhbipchal 0.0.1 to easy-install.pth file

Installed /usr/local/lib/python3.10/dist-packages/pyhbipchal-0.0.1-py3.10-linux-aarch64.egg
Processing dependencies for pyhbipchal==0.0.1
Finished processing dependencies for pyhbipchal==0.0.1
Installation complete.
Cleaning up…
running clean
removing ‘build/temp.linux-aarch64-3.10’ (and everything under it)
removing ‘build/lib.linux-aarch64-3.10’ (and everything under it)
removing ‘build/bdist.linux-aarch64’ (and everything under it)
‘build/scripts-3.10’ does not exist – can’t clean it
removing ‘build’
Cleanup complete.
Setting up hobot-io-samples (4.0.5-20260211104955) …
Processing triggers for mailcap (3.70+nmu1ubuntu1.22.04.1) …
Processing triggers for gnome-menus (3.36.0-1ubuntu3) …
Processing triggers for desktop-file-utils (0.26-1ubuntu3) …
Processing triggers for libc-bin (2.35-0ubuntu3.15) …
Processing triggers for man-db (2.10.2-1) …
Errors were encountered while processing:
hobot-dnn
hobot-spdev
hobot-sp-samples

报错根因很明确:rootfs 里的 auditwheel 版本较新,强制要求 patchelf >= 0.14.5,而 Ubuntu 22.04 源里默认是 0.14.3,导致 hobot-dnn 的 postinst(跑 auditwheel repair)失败;后面 hobot-spdev 报错只是依赖连带,不用管。

解决思路:把 chroot 根文件系统里的 patchelf 升到 ≥0.14.5 即可。

  1. 升级 rootfs 内的 patchelf(pip 版自带新二进制,最省事):
sudo chroot out/deploy/rootfs /bin/bash
pip3 install -U patchelf
patchelf --version   # 确认 >= 0.14.5
exit

离线环境的话,在能上网的机器上 pip3 download patchelf(或从 GitHub release 下 aarch64 二进制),拷进 out/deploy/rootfs/usr/local/bin/chmod +x

  1. 重新打包:
sudo ./pack_image.sh -l

两点注意:

  • 如果这个根文件系统是你自己用 samplefs/make_ubuntu_samplefs.sh 构建的,大概率是 pip 装 requirements 时把 auditwheel 拉到了新版;也可以反向操作,在 chroot 里把 auditwheel 降级到不检查 patchelf 版本的旧版(如 pip3 install auditwheel==5.4.0),二选一。
  • 用官方预编译的 out/product/rootfs_packages 一般不会踩到这个,建议核对下 rootfs 来源。

离线构建流程可参考官方文档:7.6 构建系统开发指南 | RDK S100/S600 DOC

这段日志的直接失败点是 patchelf 0.14.3 不满足当前 auditwheel repair 要求的 >= 0.14.5,导致 hobot-dnn 的安装后脚本退出;hobot-spdevhobot-sp-samples 是随后发生的依赖配置失败。

官方构建指南-l 使用本地 deb 和预编译根文件系统,安装发生在 chroot 内,因此只升级电脑宿主机的 patchelf 不一定有效。建议先确认 SDK 版本、out/product/rootfs_packages 中根文件系统包的来源(官方配套包还是自行生成),优先使用同一发布版本的官方配套材料重新构建。

若构建目录仍保留 out/deploy/rootfs,可在 SDK 根目录、原构建环境中做以下只读检查:

sudo chroot out/deploy/rootfs /bin/sh -c 'command -v patchelf; patchelf --version; python3 -m pip show auditwheel'

如果是自行生成的根文件系统,需要在其构建依赖中配齐兼容的工具组合,确保实际调用的 patchelf 满足上述版本要求,且为目标 ARM64 环境可执行的程序,再重新构建;不要混装其他 Ubuntu 发行版的软件源,也不要跳过 hobot-dnn 的安装后脚本。若官方原版配套材料也出现该错误,请补充 SDK 和根文件系统包的完整文件名,便于核查官方依赖配套。修复验收应以三个包均配置成功、打包正常退出为准,目前尚未在你的构建环境验证。

版本检查机制可参见 auditwheel 上游源码

完整链接:
https://developer.d-robotics.cc/rdk_s_doc/Advanced_development/rdk_gen
https://github.com/pypa/auditwheel/blob/main/src/auditwheel/patcher.py

1 个赞

我使用官方SDK中提供的make_ubuntu_samplefs.sh构建的文件系统,然后离线打包镜像。没有修改文件系统构建的脚本。输出的根文件系统包为samplefs_desktop_jammy-v4.0.4.tar.gz

没改脚本反而印证了根因:构建 samplefs 时 pip 按 requirements 拉到了新版 auditwheel(强制要求 patchelf ≥ 0.14.5),而 jammy 源里 patchelf 只有 0.14.3,于是 hobot-dnn 的 postinst 失败,后面 spdev/sp-samples 只是依赖连带。

修复要落进 rootfs 包本身(-l 打包时根文件系统是从 tar 包重新展开的,只改 out/deploy/rootfs 会被覆盖):

mkdir -p /tmp/rootfs
tar -xzf samplefs_desktop_jammy-v4.0.4.tar.gz -C /tmp/rootfs
sudo chroot /tmp/rootfs /bin/bash -c "pip3 install -U patchelf; patchelf --version"
# 确认输出 >= 0.14.5 后重新打包(按 tar 包内实际目录结构调整),替换 out/product/rootfs_packages/ 下的旧包
cd /tmp/rootfs && sudo tar -czf ../samplefs_desktop_jammy-v4.0.4.tar.gz .

不想动 patchelf 也可以反向操作:chroot 里 pip3 install auditwheel==5.4.0 降到不检查 patchelf 版本的旧版,再重新打包,二选一。

另外两点:

  • 你日志里的 deb 包是 4.0.5(hobot-firmware 4.0.5、linux-image DR-4.0.5),rootfs 包却是 v4.0.4,建议核对 SDK 与文件系统版本是否配套;
  • 如果不需要定制 rootfs,直接用 SDK 自带 out/product/rootfs_packages 里的官方预编译包最稳,不会踩到这个坑。

改完重新打包:

sudo ./pack_image.sh -l

离线构建流程参考:7.6 构建系统开发指南

收到,make_ubuntu_samplefs.sh 本身就是官方文档提供的根文件系统构建流程,你确认没有修改脚本,这里应继续核查构建依赖的配套,不能因为根文件系统是自己生成的就认定为二次开发问题。

目前日志能确定的是 auditwheelpatchelf 的版本不兼容;是否为构建时下载的依赖版本变化引起,还需核对。请补充 SDK 压缩包完整文件名、上一楼检查命令的输出,以及 samplefs/configs/pip-requirements.list 中 auditwheel/patchelf 相关行(没有也请说明)。samplefs_desktop_jammy-v4.0.4.tar.gz 的名字本身不足以判断它与日志中的 4.0.5 deb 不配套。

如果 SDK 附带原始预编译 rootfs 包,可保留现有构建目录,在另一份干净的同版 SDK 中使用该包和原配 deb,按官方 sudo ./pack_image.sh -l 流程做对照。若原配包正常而原脚本新生成的包失败,就能进一步缩小到 samplefs 构建依赖;具体应升级 patchelf 还是固定 auditwheel,需要结合上述版本信息确定,不建议直接盲目降级或跳过安装后脚本。这个阶段不需要 S100 上电,也不需要刷机。目前尚未验证完整打包修复。

完整链接:
https://developer.d-robotics.cc/rdk_s_doc/Advanced_development/rdk_gen

SDK压缩包为platform_source_code_20260513145949.tar.gz

检查命令输出如下:

/usr/bin/patchelf
patchelf 0.14.3
Name: auditwheel
Version: 6.8.2
Summary: Cross-distribution Linux wheels
Home-page:
Author:
Author-email: “Robert T. McGibbon” rmcgibbo@gmail.com
License: MIT
Location: /usr/local/lib/python3.10/dist-packages
Requires: packaging, pyelftools
Required-by:

**samplefs/configs/pip-requirements.list**中有一行auditwheel 无patchelf
输出的文件系统包为4.0.4是因为samplefs下的VERSION中是4.0.4

你补充的信息正好把根因坐实了:pip-requirements.list 里 auditwheel 没锁版本 → 构建 rootfs 时 pip 拉到最新的 6.8.2 → 新版 auditwheel repair 强制要求 patchelf ≥ 0.14.5 → 而 Ubuntu 22.04 apt 源里的 patchelf 只有 0.14.3 → hobot-dnn postinst 失败(后面 spdev/sp-samples 都是依赖连带)。samplefs 的 VERSION 4.0.4 只是 rootfs 包的版本标签,和这个报错无关。

两种修法,二选一:

1. 不重建 rootfs,直接改现有 chroot(快)

sudo chroot out/deploy/rootfs /bin/bash
pip3 install -U patchelf        # 或反向:pip3 install auditwheel==5.4.0
patchelf --version              # 确认 >= 0.14.5
exit
sudo ./pack_image.sh -l

离线环境就在能上网的机器 pip3 download patchelf,把 wheel 拷进 rootfs 再装。

2. 从源头改(以后重建不再踩):在 samplefs/configs/pip-requirements.list 里把 auditwheel 锁版本(如 auditwheel==5.4.0),或加一行 patchelf 让 pip 带新版二进制进去,然后 sudo ./make_ubuntu_samplefs.sh 重建 rootfs 再打包。

两个注意点:

  • 你查的 /usr/bin/patchelf 和宿主机的 auditwheel 不是报错现场——报错发生在 chroot(out/deploy/rootfs)里面,版本确认要在 chroot 内做。
  • SDK 是 20260513 的,-l 离线构建设计上依赖 out/product/rootfs_packages 里的官方预编译 rootfs;自己用 samplefs 构建时 pip 包不锁版本就容易踩这类问题,能用官方预编译包就优先用。

构建流程参考:7.6 构建系统开发指南

信息齐了,谢谢补充。现在可以明确:当前根文件系统里的 auditwheel 6.8.2 要求 patchelf >= 0.14.5,实际命中 /usr/bin/patchelf 0.14.3,因此报错。requirements 中的 auditwheel 没锁版本,构建结果会受下载时可用版本影响。4.0.4 来自 SDK 的 VERSION 文件,这一点无需再改,也不能据此判断混装。

建议先在另一份干净的同版 SDK中验证下面这组依赖修正,保留原目录和原包:把 samplefs/configs/pip-requirements.list 原来的单独一行 auditwheel 替换为以下两行,其他依赖不动:

auditwheel==6.8.2
patchelf==0.17.2.4

这里保留当前 auditwheel,仅补齐 patchelf 并固定版本。该 patchelf 发布版提供 Linux ARM64 的 manylinux wheel,满足当前 auditwheel 的版本检查要求;这是针对本次报错的验证方案,不是已完成整包验证的官方版本组合。

然后按官方构建流程,在新 SDK 的 samplefs 目录重新生成根文件系统:

sudo ./make_ubuntu_samplefs.sh

这一步需要可用的 APT/PyPI 下载源。确认构建成功,并让 out/product/rootfs_packages 中本次打包选中的包确实是新产物,不能继续用旧 tar 包。随后在 SDK 根目录执行:

sudo ./pack_image.sh -l

若仍报原来的版本错误,在 SDK 根目录检查此次展开的环境:

sudo chroot out/deploy/rootfs /bin/sh -c 'command -v patchelf; patchelf --version; python3 -m pip show auditwheel patchelf'

实际执行的 patchelf 必须达到 0.14.5 以上;pip 显示已安装并不等于 PATH 已选中新程序。若仍命中旧版,先核对新 rootfs 是否被使用及 PATH,不要删除 /usr/bin/patchelf 或跳过安装后脚本。最终以 hobot-dnnhobot-spdevhobot-sp-samples 均配置成功且打包正常退出为准。

这个问题发生在电脑上的构建环境,不需要 S100 上电。目前未在这份 SDK 上完成整包复现;若修正后出现不同错误,请保留新的首个报错及其前后日志,不再按旧的版本错误处理。

完整链接:

谢谢,已解决。

中间pack_image.sh -l还出现了个错误:

usage: scikit-build [-h] {build,builder,file-api,init} …
scikit-build: error: argument {build,builder,file-api,init}: invalid choice: ‘clean’ (choose from ‘build’, ‘builder’, ‘file-api’, ‘init’)
dpkg: error processing package hobot-dnn (–install):
installed hobot-dnn package post-installation script subprocess returned error exit status 2
我把hobot-dnn的deb包中有关clean的代码注释掉,暂时解决了

楼主这个判断没问题,根因是构建环境里的 scikit-build 版本太新:新版 CLI 只保留了 build/builder/file-api/initclean 子命令已被移除,而 hobot-dnn 的 postinst 还在调 scikit-build clean,于是 dpkg 配置失败。

注释掉那段是可行的临时方案(clean 只是清理构建缓存,不影响安装结果)。更干净的做法是把 chroot/构建环境里的 scikit-build 降到旧版,不用动 deb 包:

pip install "scikit-build==0.16.7"

然后重新执行 ./pack_image.sh -l 即可。

这类离线构建脚本和系统包版本不匹配的问题,建议在论坛单独发帖反馈给官方,后续版本的 hobot-dnn postinst 修正后就不用再手动绕了。