02-13-2019 03:36 PM
When running petalinux-build for a Zynq project, all the SetScene tasks fail with messages like:
WARNING: Setscene task (/opt/xilinx/petalinux/components/yocto/source/arm/layers/core/meta/recipes-support/db/db_5.3.28.bb:do_package_qa_setscene) failed with exit code '1' - real task will be run instead
(and many others with similar wording)
This causes the build to take really long time, as presumably it has to re-build all these resources. Previously, on PetaLinux 2018.2, the SetScene tasks all worked fine, and the build process only took about 20 minutes. Now, it takes closer to 1.5 hours. The problem does not appear when building for a ZynqMP project; only Zynq-7000.
Why might the process fail on one machine and not the other?
Notes:
Steps to Reproduce:
$ cd /data/petalinux_projects $ umask 022 $ petalinux-create -t project --template zynq -n ExampleProject $ cd ExampleProject/ $ petalinux-config --get-hw-description=/path/to/ZYNQ_HDF_FOLDER/
## In the petalinux-config MenuConfig, set the following settings:
## * Yocto Settings:
## * Add pre-mirror url => file:///data/sstate-rel-v2018.3/downloads
## * Local sstate feeds settings => local sstate feeds url => file:///data/sstate-rel-v2018.3
## * Network sstate feeds URL => (set to blank)
$ petalinux-build
The following messages get displayed:
[INFO] building project [INFO] sourcing bitbake INFO: bitbake petalinux-user-image Parsing recipes: 100% |###############################################################################| Time: 0:01:02 Parsing of 2569 .bb files complete (0 cached, 2569 parsed). 3445 targets, 149 skipped, 0 masked, 0 errors. NOTE: Resolving any missing task queue dependencies Initialising tasks: 100% |############################################################################| Time: 0:00:06 Checking sstate mirror object availability: 100% |####################################################| Time: 0:00:02 NOTE: Executing SetScene Tasks WARNING: Logfile for failed setscene task is /data/petalinux_projects/ExampleProject/build/tmp/work/cortexa9hf-neon-xilinx-linux-gnueabi/db/1_5.3.28-r1/temp/log.do_package_qa_setscene.82609 WARNING: Setscene task (/opt/xilinx/petalinux/components/yocto/source/arm/layers/core/meta/recipes-support/db/db_5.3.28.bb:do_package_qa_setscene) failed with exit code '1' - real task will be run instead WARNING: Logfile for failed setscene task is /data/petalinux_projects/ExampleProject/build/tmp/work/cortexa9hf-neon-xilinx-linux-gnueabi/dbus-test/1.10.20-r0/temp/log.do_package_qa_setscene.82610 WARNING: Logfile for failed setscene task is /data/petalinux_projects/ExampleProject/build/tmp/work/cortexa9hf-neon-xilinx-linux-gnueabi/gawk/4.1.4-r0/temp/log.do_populate_sysroot_setscene.82611 WARNING: Setscene task (/opt/xilinx/petalinux/components/yocto/source/arm/layers/core/meta/recipes-core/dbus/dbus-test_1.10.20.bb:do_package_qa_setscene) failed with exit code '1' - real task will be run instead WARNING: Setscene task (/opt/xilinx/petalinux/components/yocto/source/arm/layers/core/meta/recipes-extended/gawk/gawk_4.1.4.bb:do_populate_sysroot_setscene) failed with exit code '1' - real task will be run instead WARNING: Logfile for failed setscene task is /data/petalinux_projects/ExampleProject/build/tmp/work/cortexa9hf-neon-xilinx-linux-gnueabi/bash/4.4-r0/temp/log.do_package_qa_setscene.82612 (This goes on for some time) .... Summary: There were 12 WARNING messages shown. INFO: Copying Images from deploy to images INFO: Creating images/linux directory NOTE: Failed to copy built images to tftp dir: /tftpboot [INFO] successfully built project
Correct Behavior
I ran the same steps to reproduce on our other derelict server that was configured to use PetaLinux 2018.2 (using an older HDF file, and 2018.2 sstate cache). The following, correct output resulted, and the build was much quicker.
[INFO] building project [INFO] sourcing bitbake INFO: bitbake petalinux-user-image Parsing recipes: 100% |##########################################################################################################################################| Time: 0:01:02 Parsing of 2552 .bb files complete (0 cached, 2552 parsed). 3425 targets, 148 skipped, 0 masked, 0 errors. NOTE: Resolving any missing task queue dependencies Initialising tasks: 100% |#######################################################################################################################################| Time: 0:00:06 Checking sstate mirror object availability: 100% |###############################################################################################################| Time: 0:00:03 NOTE: Executing SetScene Tasks NOTE: Executing RunQueue Tasks NOTE: fsbl: compiling from external source tree /opt/xilinx/petalinux/tools/hsm/data/embeddedsw WARNING: petalinux-user-image-1.0-r0 do_rootfs: The postinstall intercept hook 'update_icon_cache' failed, details in log.do_rootfs WARNING: petalinux-user-image-1.0-r0 do_rootfs: The postinstall intercept hook 'update_pixbuf_cache' failed, details in log.do_rootfs WARNING: petalinux-user-image-1.0-r0 do_rootfs: The postinstall intercept hook 'update_gio_module_cache' failed, details in log.do_rootfs WARNING: petalinux-user-image-1.0-r0 do_rootfs: The postinstall intercept hook 'update_font_cache' failed, details in log.do_rootfs WARNING: petalinux-user-image-1.0-r0 do_rootfs: [log_check] petalinux-user-image: found 1 warning message in the logfile: [log_check] warning: %post(sysvinit-inittab-2.88dsf-r10.plnx_zynq7) scriptlet failed, exit status 1 NOTE: Tasks Summary: Attempted 3065 tasks of which 2246 didn't need to be rerun and all succeeded. Summary: There were 5 WARNING messages shown. INFO: Copying Images from deploy to images INFO: Creating images/linux directory NOTE: Failed to copy built images to tftp dir: /tftpboot [INFO] successfully built project
02-15-2019 03:27 AM
I seem to have got it working now. The solution appears to be: my user should not have permission to write to the petalinux installation directory.
Suppose:
Then:
# cd /opt/xilinx # chown -R root:users petalinux # chmod -R 755 petalinux ## (previously it was 775)
Now my build takes 15 minutes instead of an hour. I'm surprised because usually we run into problems when we don't have enough permissions, not when we have too many.
02-15-2019 03:27 AM
I seem to have got it working now. The solution appears to be: my user should not have permission to write to the petalinux installation directory.
Suppose:
Then:
# cd /opt/xilinx # chown -R root:users petalinux # chmod -R 755 petalinux ## (previously it was 775)
Now my build takes 15 minutes instead of an hour. I'm surprised because usually we run into problems when we don't have enough permissions, not when we have too many.