Xilinx / Vitis_Embedded_Platform_Source

115 stars 67 forks source link

PetaLinux build failure for "zcu104_vcu_ml" platform #17

Closed zohourih closed 4 years ago

zohourih commented 4 years ago

I am trying to build PetaLinux for the provided zcu104_vcu_ml v2019.2 in the repository. However, following the make instructions, whether I do make all or make petalinux_proj XSA_DIR= while pointing it to the pre-built XSA from here, the build fails with the following error:

Parsing of 2905 .bb files complete (2899 cached, 6 parsed). 3995 targets, 154 skipped, 0 masked, 0 errors.
Traceback (most recent call last):
  File "/home/xilinx/Petalinux/2019.2/components/yocto/source/aarch64/layers/core/scripts/devtool", line 347, in <module>
    ret = main()
  File "/home/xilinx/Petalinux/2019.2/components/yocto/source/aarch64/layers/core/scripts/devtool", line 334, in main
    ret = args.func(args, config, basepath, workspace)
  File "/home/xilinx/Petalinux/2019.2/components/yocto/source/aarch64/layers/core/scripts/lib/devtool/standard.py", line 808, in modify
    oe.path.copyhardlinktree(srcdir,srctree)
  File "/home/xilinx/Petalinux/2019.2/components/yocto/source/aarch64/layers/core/meta/lib/oe/path.py", line 115, in copyhardlinktree
    copytree(src, dst)
  File "/home/xilinx/Petalinux/2019.2/components/yocto/source/aarch64/layers/core/meta/lib/oe/path.py", line 90, in copytree
    subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT)
  File "/usr/lib64/python3.6/subprocess.py", line 356, in check_output
    **kwargs).stdout
  File "/usr/lib64/python3.6/subprocess.py", line 438, in run
    output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command 'tar --xattrs --xattrs-include='*' -cf - -S -C /tmp/xilinx-zcu104-2019.2-2019.11.13-23.18.47-gHH/work-shared/zcu104-zynqmp/kernel-source -p . | tar --xattrs --xattrs-include='*' -xf - -C /home/hamid/projects/Vitis_Embedded_Platform_Source/Xilinx_Official_Platforms/zcu104_vcu_ml/petalinux/components/plnx_workspace/sources/linux-xlnx' returned non-zero exit status 2.
ERROR: Failed to config kernel.
make[1]: *** [kernel_config] Error 255
make[1]: Leaving directory `/home/hamid/projects/Vitis_Embedded_Platform_Source/Xilinx_Official_Platforms/zcu104_vcu_ml/petalinux'
make: *** [petalinux_proj] Error 2

I cannot find any useful information in the logs as to why the build is failing.

On the other hand, I have successfully built the zcu104_base and the zcu104_smart_camera platforms in the exact same way on the exact same machine, so I am sure my environment is sane and my configuration is correct and the problem must be the configuration of the platform in the repository. Has anyone successfully built PetaLinux for the zcu104_vcu_ml from this repository?

zohourih commented 4 years ago

Apparently the problem is caused by wrong permission of files located/created inside the folder at /tmp/xilinx-zcu104-2019.2-2019.11.13-23.18.47-gHH/work-shared/zcu104-zynqmp/kernel-source/.git/objects which results in the tar command failing due to lack of permission to access that location. I am not sure why the build process is even accessing that location and the build still fails if the whole folder at /tmp/xilinx-zcu104-2019.2-2019.11.13-23.18.47-gHH/ is removed and building is repeated, but I can confirm doing a chmod -R 777 * inside the objects folder resolves the build issue after it fails once.

imrickysu commented 4 years ago

Thanks for the explanation.