Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

compiler-rt-sanitizers: Build fixes #911

Merged
merged 2 commits into from
Feb 14, 2024

Conversation

lorenzph
Copy link
Contributor

While building compiler-rt-sanitizers I encountered some build and packaging issues. I am not certain why the missing compiler-rt dependency was not observed before but the configuration failure is reproducible in a clean Yocto build which merely includes the meta-clang layer without making any further configuration adaptations.


Contributor checklist

Reviewer Guidelines

  • When submitting a review, please pick:
    • 'Approve' if this change would be acceptable in the codebase (even if there are minor or cosmetic tweaks that could be improved).
    • 'Request Changes' if this change would not be acceptable in our codebase (e.g. bugs, changes that will make development harder in future, security/performance issues, etc).
    • 'Comment' if you don't feel you have enough information to decide either way (e.g. if you have major questions, or you don't understand the context of the change sufficiently to fully review yourself, but want to make a comment)

The library is now named liborc which leads to conflicts when installing
compiler-rt and compiler-rt-sanitizers in parallel.

  Installing compiler-rt-sanitizers-staticdev (17.0.6) on root
  * check_data_file_clashes: Package compiler-rt-sanitizers-staticdev wants to install file .../usr/lib/clang/17.0.6/lib/linux/liborc_rt-x86_64.a
      But that file is already provided by package  * compiler-rt-staticdev

Signed-off-by: Philip Lorenz <philip.lorenz@bmw.de>
When configuring with COMPILER_RT_USE_BUILTINS_LIBRARY=ON, compiler-rt
expects the target builtin libraries to be available. Make sure that
this really is the case by adding them to DEPENDS.

Without the dependency recipe build fails during the configure task

| -- Failed to find compiler-rt builtins library for x86_64-poky-linux
| CMake Error at .../build/tmp/work-shared/llvm-project-source-17.0.6-r0/git/compiler-rt/cmake/Modules/AddCompilerRT.cmake:281 (message):
|   Cannot find builtins library for the target architecture
| Call Stack (most recent call first):
|   .../build/tmp/work-shared/llvm-project-source-17.0.6-r0/git/compiler-rt/lib/stats/CMakeLists.txt:23 (add_compiler_rt_runtime)

Signed-off-by: Philip Lorenz <philip.lorenz@bmw.de>
@lorenzph lorenzph requested a review from kraj as a code owner February 12, 2024 11:10
Copy link
Owner

@kraj kraj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@@ -15,7 +15,7 @@ LIC_FILES_CHKSUM = "file://compiler-rt/LICENSE.TXT;md5=d846d1d65baf322d4c485d6ee

TUNE_CCARGS:remove = "-no-integrated-as"

DEPENDS += "ninja-native virtual/crypt"
DEPENDS += "ninja-native virtual/crypt compiler-rt"
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

are you using TC_CXX_RUNTIME = 'gnu' ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I encountered this issue when building with a default Yocto config as provided by oe-init-build-env (so TC_CXX_RUNTIME = "gnu")

@kraj kraj merged commit aed1851 into kraj:master Feb 14, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants