Post install intercept hook "update-pixbuf_cache" fails on qemuppc while building core-image-sato: ...$MACHINE=qemuppc time bitbake core-image-sato Loading cache: 100% |########################################################################################################################################################################| ETA: 00:00:00 Loaded 1239 entries from dependency cache. NOTE: Resolving any missing task queue dependencies Build Configuration: BB_VERSION = "1.23.0" BUILD_SYS = "x86_64-linux" NATIVELSBSTRING = "Ubuntu-13.10" TARGET_SYS = "powerpc-poky-linux" MACHINE = "qemuppc" DISTRO = "poky" DISTRO_VERSION = "1.6+snapshot-20140414" TUNE_FEATURES = "m32 fpu-hard ppc7400 altivec" TARGET_FPU = "" meta-intel meta-fri2 = "master:db84acfc8d9ed8dccd4a79de39fee337bc729662" meta meta-yocto meta-yocto-bsp = "PUs:ea90bd054c449a8e19c474c8bfa8c289f692c33f" NOTE: Preparing runqueue NOTE: Executing SetScene Tasks NOTE: Executing RunQueue Tasks WARNING: The postinstall intercept hook 'update_pixbuf_cache' failed (exit code: 132)! See log for details! WARNING: The postinstalls for the following packages will be postponed for first boot: gdk-pixbuf-loader-png gdk-pixbuf-loader-gif gdk-pixbuf-loader-xpm gdk-pixbuf-loader-jpeg NOTE: Tasks Summary: Attempted 5251 tasks of which 5249 didn't need to be rerun and all succeeded. NOTE: Writing buildhistory Summary: There were 2 WARNING messages shown. 248.60user 141.06system 6:11.32elapsed 104%CPU (0avgtext+0avgdata 601028maxresident)k 2813200inputs+4896816outputs (274major+20193468minor)pagefaults 0swaps ...yoctoproject/build$
More details: NOTE: Running intercept scripts: NOTE: > Executing update_font_cache intercept ... NOTE: > Executing update_pixbuf_cache intercept ... Invalid instruction NIP 0fc7a44c LR 0fdcf364 CTR 00000000 XER 20000000 MSR 00006040 HID0 00000000 HF 00006000 idx 0 TB 00000000 00000000 GPR00 0000000000000020 00000000f6ffe160 00000000f67d14c0 00000000f6ffe210 GPR04 000000000000002f 00000000f6ffe228 0000000000000000 000000000fd8f0bc GPR08 00000000000000e0 0000000000000046 00000000000008d8 000000007f7f7f7f GPR12 0000000048002484 000000001001984c 0000000000000000 0000000000000000 GPR16 0000000000000000 00000000f6ffe228 0000000000000000 0000000000000000 GPR20 00000000f6ffe3a8 0000000000000000 0000000000000000 0000000000000000 GPR24 0000000000000000 0000000000000001 00000000f6ffe210 00000000f6ffe1f0 GPR28 0000000000000001 00000000f6ffe210 000000000fdcf364 00000000f6ffe160 CR 48002484 [ G L - - E G L G ] RES ffffffff FPR00 0000000000000000 0000000000000000 0000000000000000 0000000000000000 FPR04 0000000000000000 0000000000000000 0000000000000000 0000000000000000 FPR08 0000000000000000 0000000000000000 0000000000000000 0000000000000000 FPR12 0000000000000000 0000000000000000 0000000000000000 0000000000000000 FPR16 0000000000000000 0000000000000000 0000000000000000 0000000000000000 FPR20 0000000000000000 0000000000000000 0000000000000000 0000000000000000 FPR24 0000000000000000 0000000000000000 0000000000000000 0000000000000000 FPR28 0000000000000000 0000000000000000 0000000000000000 0000000000000000 FPSCR 00000000 qemu: uncaught target signal 4 (Illegal instruction) - core dumped Illegal instruction (core dumped) WARNING: The postinstall intercept hook 'update_pixbuf_cache' failed (exit code: 132)! See log for details! WARNING: The postinstalls for the following packages will be postponed for first boot: gdk-pixbuf-loader-png gdk-pixbuf-loader-gif gdk-pixbuf-loader-xpm gdk-pixbuf-loader-jpeg
Created attachment 1913 [details] do_rootfs full log
Tested with qemu 1.6.2 and 1.7.1 (beside 1.7.0). Issue is stil reproducible. Most probably issue is not caused be qemu.
We got bit by this at Mentor with our P4080DS builds using meta-fsl-ppc. It looks like it's due to our cpu specific optimizations. Setting DEFAULTTUNE="powerpc" results in builds without the warnings. So, it seems we're enabling use of instructions not supported by qemu's user emulation (though they might be by qemu system emulation, I'm guessing, which would explain why it fails for qemuppc too), which is pretty much what I expected. Ideally, there'd likely be a way to opt-out of do_rootfs-time qemu usage entirely for cases where it's expected that it will not succeed. I implemented a method locally to opt out of run_qemu_binary from qemu.bbclass, but that doesn't affect the postinst intercepts, which are separate scripts in poky/scripts/postinst-intercepts/. I could export the variable to disable it and modify the scripts to obey it, but that would affect the checksums of every shell function unless it gets added to the whitelist. Alternatively, we could make it get exported just by the rootfs code by overriding oe.rootfs, but that's not pretty either.
Another approach to this issue is to test with qemu 2.0.0 and see if the issue is still present. I already worked on qemu 2.0.0 upgrade, it is working ok on qemuppc, I will restest it. Please wait for my tests. Regards, Cristian
Issue still present even with qemu 2.0.0: $ date; MACHINE=qemuppc time bitbake core-image-sato; date Mon Apr 28 10:10:54 EEST 2014 Parsing recipes: 100% |######################################################################################################################################################################| ETA: 00:00:00 Parsing of 864 .bb files complete (0 cached, 864 parsed). 1225 targets, 42 skipped, 0 masked, 0 errors. NOTE: Resolving any missing task queue dependencies Build Configuration: BB_VERSION = "1.23.0" BUILD_SYS = "x86_64-linux" NATIVELSBSTRING = "Ubuntu-14.04" TARGET_SYS = "powerpc-poky-linux" MACHINE = "qemuppc" DISTRO = "poky" DISTRO_VERSION = "1.6+snapshot-20140428" TUNE_FEATURES = "m32 fpu-hard ppc7400 altivec" TARGET_FPU = "" meta meta-yocto meta-yocto-bsp = "qemu_upg_20:679755a75313dc47e9ab4a5a1430fab591137176" NOTE: Preparing runqueue NOTE: Executing SetScene Tasks NOTE: Executing RunQueue Tasks NOTE: validating kernel config, see log.do_kernel_configcheck for details WARNING: The postinstall intercept hook 'update_pixbuf_cache' failed (exit code: 132)! See log for details! WARNING: The postinstalls for the following packages will be postponed for first boot: gdk-pixbuf-loader-xpm gdk-pixbuf-loader-png gdk-pixbuf-loader-gif gdk-pixbuf-loader-jpeg NOTE: Tasks Summary: Attempted 5256 tasks of which 577 didn't need to be rerun and all succeeded. NOTE: Writing buildhistory Summary: There were 2 WARNING messages shown. 27554.21user 5499.94system 1:24:28elapsed 652%CPU (0avgtext+0avgdata 626576maxresident)k 20194960inputs+95984392outputs (80456major+1772962813minor)pagefaults 0swaps Mon Apr 28 11:35:23 EEST 2014
The problem is QEMU_OPTIONS. Initially I thought we were missing the one for qemuppc (which we are) it also turns out qemuwrapper-cross completely ignores them anyway. I've sent out patches to the mailing list to fix these issues and move them to qemu.bbclass where they belong and this fixes the issue for qemuppc. For any other machines, it should be a case of just adding the right QEMU_OPTIONS mapping (patches obviously welcome).
http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=0404123e2da7fb1d6345dfb515a167adbb968f28 and preceding commit