kraj / meta-clang

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

File provided by compiler-rt and by compiler-rt-sanitizers recipe #635

Open etienne-cor opened 2 years ago

etienne-cor commented 2 years ago

Describe the bug Starting with the kirkstone branch, the file /usr/lib/clang/14.0.3/lib/linux/libclang_rt.orc-aarch64.a is installed by both compiler-rt and compiler-rt-sanitizers

To Reproduce Steps to reproduce the behavior:

  1. Compile recipe "foobar" which inherits clang class with bitbake
  2. Bitbake error: ERROR: foobar-0.1-r0 do_prepare_recipe_sysroot: The file /usr/lib/clang/14.0.3/lib/linux/libclang_rt.orc-aarch64.a is installed by both compiler-rt and compiler-rt-sanitizers, aborting

Expected behavior With honister only one file was provided by compiler-rt: Honister:

~/repos/yocto/build$ tree tmp-glibc/sysroots-components/armv8a/compiler-rt
tmp-glibc/sysroots-components/armv8a/compiler-rt
├── sysroot-providers
│   └── compiler-rt
└── usr
    └── lib
        └── clang
            └── 13.0.0
                └── lib
                    └── linux
                        └── libclang_rt.builtins-aarch64.a

7 directories, 2 files

With kirkstone the file libclang_rt.orc-aarch.a is added to compiler-rt and to compiler-rt-sanitizers:

kirkstone:

~/repos/yocto/build$ tree tmp-glibc/sysroots-components/armv8a/compiler-rt/
tmp-glibc/sysroots-components/armv8a/compiler-rt/
├── sysroot-providers
│   └── compiler-rt
└── usr
    └── lib
        └── clang
            └── 14.0.3
                └── lib
                    └── linux
                        ├── libclang_rt.builtins-aarch64.a
                        └── libclang_rt.orc-aarch64.a

7 directories, 3 files

~/repos/yocto/build$ tree tmp-glibc/sysroots-components/armv8a/compiler-rt-sanitizers/ | grep orc
                │       ├── libclang_rt.orc-aarch64.a

Desktop (please complete the following information):

Additional context This is while working on a custom recipe foobar (which I can't provide) which has a dependency on compiler-rt and compiler-rt-sanitizers, however if you have issue reproducing I can work on creating a minimal reproducible setup.

kraj commented 2 years ago

I think this is perhaps solvable by either renaming the one provided by compiler-rt-sanitizers or maybe just deleting it during do_install.