This guide helps diagnose and fix common issues encountered when building Python extensions for BrightSign players.
Build Failed?
├─ Check Docker is running
├─ Permission error? → Run with --distclean
├─ "Nothing PROVIDES"? → Missing dependency
├─ "do_compile" error? → Check build logs
├─ "Files not shipped"? → Fix FILES definition
└─ "QA Issue"? → Add INSANE_SKIP flags
# Install Docker
sudo apt-get update
sudo apt-get install docker.io
sudo usermod -aG docker $USER
# Log out and back in# Start Docker service
sudo systemctl start docker
sudo systemctl enable docker# Build the Docker image
docker build --rm --build-arg USER_ID=$(id -u) --build-arg GROUP_ID=$(id -g) -t bsoe-build .# Clean everything and rebuild
./patch-n-build.sh --distclean python3-package
# If persists, check file ownership
ls -la brightsign-oe/build/
# Fix if needed
sudo chown -R $(id -u):$(id -g) brightsign-oe/# This is often transient, retry the build
./patch-n-build.sh python3-package
# If persistent, clean pseudo database
rm -rf brightsign-oe/build/tmp-glibc/cache/pseudo/
./patch-n-build.sh --clean python3-packageDiagnosis: Missing dependency recipe or typo in package name
# Search for correct package name
find bsoe-recipes -name "*xyz*.bb" -o -name "*XYZ*.bb"
# Check if it's a PyPI package
pip search xyz # or check pypi.org
# If found, create recipe
cp recipe-template.bb python3-xyz_1.0.0.bb
# Edit and add package detailsDiagnosis: Recipe file not found or syntax error
# Verify recipe exists
ls bsoe-recipes/meta-bs/recipes-devtools/python/python3-package*.bb
# Check recipe syntax
./check-recipe-syntax.py recipe.bbDiagnosis: Cross-compilation issue or missing build dependencies
# Find and read the compile log
find brightsign-oe/build/tmp-glibc/work -name "log.do_compile.*" | grep python3-package
cat [log file path]
# Common fixes:
# Missing headers: Add to DEPENDS
DEPENDS += "python3-numpy-native"
# Wrong architecture: Ensure cross-compilation
# Don't use pip install in recipes!Diagnosis: Package requires compilation but using wrong compiler
# For packages with C extensions, ensure proper toolchain
DEPENDS += "python3-setuptools-native python3-wheel-native"
inherit setuptools3
# Never use pip in cross-compilation!Diagnosis: FILES definition doesn't match installed files
# Find what was installed
find brightsign-oe/build/tmp-glibc/work/*/image -name "*package*"
# Update FILES definition
FILES:${PN} = " \
${PYTHON_SITEPACKAGES_DIR}/package_name \
${PYTHON_SITEPACKAGES_DIR}/package_name-${PV}.dist-info \
"Diagnosis: Empty or missing FILES definition
# Ensure FILES is defined
FILES:${PN} = "${PYTHON_SITEPACKAGES_DIR}/*"# Add to recipe:
INSANE_SKIP:${PN} += "already-stripped"# For binary packages:
INSANE_SKIP:${PN} += "arch textrel"# For packages with unmet dependencies:
INSANE_SKIP:${PN} += "file-rdeps"Diagnosis: Missing runtime dependencies
# Add to recipe:
RDEPENDS:${PN} += "python3-numpy python3-core"Diagnosis: Architecture mismatch
# Ensure target architecture
# Never use x86_64 wheels for ARM target!
# Use source packages with proper cross-compilation# Enable verbose logging
./patch-n-build.sh -v python3-package
# Or modify local.conf
echo 'BB_VERBOSE_LOGS = "1"' >> brightsign-oe/build/conf/local.conf# Enter build environment
docker run --rm -it -u "$(id -u):$(id -g)" \
-v "$(pwd)/brightsign-oe:/home/builder/bsoe" \
-v "$(pwd)/srv:/srv" \
-w /home/builder/bsoe/build \
bsoe-build bash
# Inside container
source oe-init-build-env
bitbake -c devshell python3-package# Generate dependency graph
docker run --rm -u "$(id -u):$(id -g)" \
-v "$(pwd)/brightsign-oe:/home/builder/bsoe" \
bsoe-build bash -c "cd /home/builder/bsoe/build && bitbake -g python3-package"
# View with graphviz
dot -Tpng pn-depends.dot -o dependencies.png-
Always validate recipes before building
./check-recipe-syntax.py recipe.bb
-
Test in order: syntax → individual → full
./check-recipe-syntax.py recipe.bb ./patch-n-build.sh python3-package ./patch-n-build.sh brightsign-sdk
-
Use the recipe template
cp recipe-template.bb python3-newpackage_1.0.bb
-
Check requirements first
# Verify package exists on PyPI pip search packagename # Check version compatibility
- Build logs:
brightsign-oe/build/tmp-glibc/work/*/temp/log.* - Console output: Redirect with
2>&1 | tee build.log - BitBake cache:
brightsign-oe/build/tmp-glibc/cache/
When asking for help, include:
- Exact error message
- Recipe file content
- Relevant log excerpts
- Build command used
- Recent changes made
If all else fails:
# Complete clean
rm -rf brightsign-oe/build/tmp-glibc
rm -rf brightsign-oe/sstate-cache
./patch-n-build.sh brightsign-sdk