Bug 15174

Summary: The postinstall intercept hook 'update_font_cache' failed
Product: [Build System, Metadata & Runtime] BitBake Reporter: zhang.bocheng
Component: bitbakeAssignee: Anuj Mittal <anuj.mittal>
Status: RESOLVED NOTABUG QA Contact:
Severity: normal    
Priority: Medium+ CC: poky.bs.watcher, poky.watcher, randy.macleod
Version: unspecified   
Target Milestone: 4.0.13   
Hardware: x86   
OS: x86_64   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: Don't know
Attachments:
Description Flags
logs file none

Description zhang.bocheng 2023-08-02 09:09:49 UTC
Created attachment 4966 [details]
logs file

I try to make a rootfs as following steps in WSL2 Ubuntu 20.04

git clone -b kirkstone https://git.yoctoproject.org/poky
git clone -b kirkstone https://git.yoctoproject.org/meta-intel-fpga
source poky/oe-init-build-env ./build
echo 'MACHINE = "cyclone5"' >> conf/local.conf
echo 'BBLAYERS += " ${TOPDIR}/../meta-intel-fpga "' >> conf/bblayers.conf
bitbake core-image-minimal


bitbake core-image-minimal
Loading cache: 100% |#############################################################################################| Time: 0:00:00
Loaded 1658 entries from dependency cache.
Parsing recipes: 100% |###########################################################################################| Time: 0:00:00
Parsing of 905 .bb files complete (897 cached, 8 parsed). 1666 targets, 74 skipped, 0 masked, 0 errors.
NOTE: Resolving any missing task queue dependencies

Build Configuration:
BB_VERSION           = "2.0.0"
BUILD_SYS            = "x86_64-linux"
NATIVELSBSTRING      = "universal"
TARGET_SYS           = "arm-poky-linux-gnueabi"
MACHINE              = "cyclone5"
DISTRO               = "poky"
DISTRO_VERSION       = "4.0.11"
TUNE_FEATURES        = "arm vfp cortexa9 neon thumb callconvention-hard"
TARGET_FPU           = "hard"
meta
meta-poky
meta-yocto-bsp
meta-intel-fpga      = "<unknown>:<unknown>"

Initialising tasks: 100% |########################################################################################| Time: 0:00:01
Sstate summary: Wanted 2 Local 0 Mirrors 0 Missed 2 Current 1154 (0% match, 99% complete)
NOTE: Executing Tasks
ERROR: core-image-minimal-1.0-r0 do_rootfs: The postinstall intercept hook 'update_font_cache' failed, details in /cv/build/tmp/w
ork/cyclone5-poky-linux-gnueabi/core-image-minimal/1.0-r0/temp/log.do_rootfs
ERROR: Logfile of failure stored in: /cv/build/tmp/work/cyclone5-poky-linux-gnueabi/core-image-minimal/1.0-r0/temp/log.do_rootfs.
21266
ERROR: Task (/cv/poky/meta/recipes-core/images/core-image-minimal.bb:do_rootfs) failed with exit code '1'
NOTE: Tasks Summary: Attempted 3006 tasks of which 3005 didn't need to be rerun and 1 failed.

Summary: 1 task failed:
  /cv/poky/meta/recipes-core/images/core-image-minimal.bb:do_rootfs
Summary: There was 1 ERROR message, returning a non-zero exit code.
Comment 1 zhang.bocheng 2023-08-03 05:45:55 UTC
System is WSL2 Ubuntu 22.04
Comment 2 Randy MacLeod 2023-08-03 14:41:46 UTC
Anuj, Can you take a look at this issue please? -- YP bug triage
Comment 3 zhang.bocheng 2023-08-08 05:45:45 UTC
This bug may cause by mode or owner problems, I solve this problem by run all commands at as non-root user.

I use root to clone and run others as a non-root user, it comes some right or owner problems and I use chmod/chown to make other commands can run and then get this bug.
My WSL default start up user is root, so I do  
git clone -b kirkstone https://git.yoctoproject.org/poky
git clone -b kirkstone https://git.yoctoproject.org/meta-intel-fpga
source poky/oe-init-build-env ./build
echo 'MACHINE = "cyclone5"' >> conf/local.conf
echo 'BBLAYERS += " ${TOPDIR}/../meta-intel-fpga "' >> conf/bblayers.conf

as root and found 
bitbake core-image-minimal
can be run as a non-root only, so change to a non-root:test to run 
chmod -R 777 /cv chown -R test /cv
sudo -s source poky/oe-init-build-env ./build
export PATH=/cv/poky/bitbake/bin/: $PATH
bitbake core-image-minimal

and then get this problem