kraj / meta-clang

Clang C/C++ cross compiler and runtime for OpenEmbedded/Yocto Project
MIT License
155 stars 198 forks source link

Building cross SDK with CLANGSDK fails due to overwriting of existing files in a shared area #996

Open fidelski opened 1 month ago

fidelski commented 1 month ago

Describe the bug When trying to build the SDK with Clang for my ppc64 build I get the following error:

ERROR: clang-crosssdk-x86_64-18.1.8-r0 do_populate_sysroot: Recipe clang-crosssdk-x86_64 is trying to install files into a shared area when those files already exist. The files and the manifests listing them are
:
  /mnt/data/yocto/bf133/build/tmp/sysroots-components/x86_64/clang-crosssdk-x86_64/sysroot-providers/clang-crosssdk-x86_64
    (matched in manifest-x86_64_x86_64_linux-clang-crosssdk-x86_64.populate_sysroot)
Please adjust the recipes so only one recipe provides a given file.
ERROR: Logfile of failure stored in: /mnt/data/yocto/bf133/build/tmp/work/x86_64-linux/clang-crosssdk-x86_64/18.1.8/temp/log.do_populate_sysroot.2480743
ERROR: Task (/mnt/data/yocto/bf133/meta-clang/recipes-devtools/clang/clang-crosssdk_git.bb:do_populate_sysroot) failed with exit code '1'

To Reproduce Steps to reproduce the behavior:

  1. Set CLANGSDK=1 in build/conf/local.conf
  2. Add the following items to TOOLCHAIN_HOST_TASK:
    • nativesdk-clang-format
    • nativesdk-clang-tidy
    • nativesdk-clang-tools
    • nativesdk-cmake
    • nativesdk-lldb
  3. Build the SDK with bitbake -c populate_sdk
  4. Watch the build fail

Expected behavior The build runs through without error.

Desktop (please complete the following information):