Yocto构建自定义ARM板根文件系统时do_rootfs事务计算错误修复求助
Let's break down your issue and fix it step by step:
The Root Cause
The error no package provides libdl.so.2(GLIBC_2.0) occurs because libdl.so.2 is a core component of GLIBC, but your python3-pyinstaller recipe isn't explicitly declaring a dependency on GLIBC. While your target board already has GLIBC installed (which is why devtool deploy-target works), the Yocto build system requires explicit dependency declarations to ensure all required packages are included in the final root filesystem.
Step-by-Step Fixes
1. Add GLIBC to Recipe Dependencies
Update the RDEPENDS_${PN} line in your recipe to include glibc—the package that provides libdl.so.2:
RDEPENDS_${PN} = " python3-altgraph python3-macholib python3-pefile python3-future glibc"
This tells Yocto that python3-pyinstaller relies on GLIBC, so it will automatically include the necessary library files in the root filesystem.
2. (Optional) Verify GLIBC Provides the Required Symbol
If the error persists, confirm that your target's GLIBC package actually provides libdl.so.2(GLIBC_2.0) by running this command in your build environment:
bitbake -s glibc | grep -A5 -B5 "Provides"
You should see libdl.so.2(GLIBC_2.0) listed in the "Provides" section. If not, double-check your Yocto layer configuration to ensure you're using a GLIBC version compatible with your cortexa9hf_neon target.
3. (Optional) Correct Recipe Versioning (Avoid Confusion)
Your recipe uses S = "${WORKDIR}/PyInstaller-3.4" but the built package shows version 1.0-r0. To avoid version mismatches, add a PV line to your recipe:
PV = "3.4"
This ensures the package version matches the source code you're building.
Test the Fix
After updating the recipe, rebuild python3-pyinstaller and generate your root filesystem again:
bitbake python3-pyinstaller bitbake <your-image-recipe>
The dependency error should now be resolved.
内容的提问来源于stack exchange,提问作者parera riddle

