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

llvm-config: fix script for multilib build #815

Merged
merged 1 commit into from
Jun 22, 2023
Merged

Conversation

saininav
Copy link
Contributor

@saininav saininav commented Jun 22, 2023

From multilib build:
| CMake Error at cmake/FindLLVM.cmake:79 (message):
| Failed running
| tmp-glibc/work/x86-64-v3-oe-linux/ispc/1.20.0-r0/recipe-sysroot/usr/bin/crossscripts/llvm-config;--libfiles;engine;ipo;bitreader;bitwriter;instrumentation;linker;option;frontendopenmp;windowsdriver;x86
| Call Stack (most recent call first):
| cmake/FindLLVM.cmake:116 (run_llvm_config)
| CMakeLists.txt:377 (get_llvm_libfiles)

Currently hardcoded to /lib, which causing multilib build failure.

An easy solution could be set and export YOCTO_ALTERNATE_LIBDIR to $baselib in recipe, but it would require to add this in all affected recipes.

Other approach is to handle in llvm-config script itself. Unfortunately $baselib is not available in env for the llvm-config script, so extracting baselib value from $base_libdir as its being exported and available in env and then set YOCTO_ALTERNATE_LIBDIR accordingly.


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)

@saininav saininav requested a review from kraj as a code owner June 22, 2023 03:37
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

From multilib build:
| CMake Error at cmake/FindLLVM.cmake:79 (message):
|   Failed running
|  tmp-glibc/work/x86-64-v3-oe-linux/ispc/1.20.0-r0/recipe-sysroot/usr/bin/crossscripts/llvm-config;--libfiles;engine;ipo;bitreader;bitwriter;instrumentation;linker;option;frontendopenmp;windowsdriver;x86
| Call Stack (most recent call first):
|   cmake/FindLLVM.cmake:116 (run_llvm_config)
|   CMakeLists.txt:377 (get_llvm_libfiles)

Currently hardcoded to /lib, which causing multilib build failure.

An easy solution could be set and export YOCTO_ALTERNATE_LIBDIR to $baselib
in recipe, but it would require to add this in all affected recipes.

Other approach is to handle in llvm-config script itself.
Unfortunately $baselib is not available in env for the
llvm-config script, so extracting baselib value from $base_libdir
as its being exported and available in env and then set YOCTO_ALTERNATE_LIBDIR accordingly.

Signed-off-by: Naveen Saini <[email protected]>
@kraj kraj merged commit d73932b into kraj:master Jun 22, 2023
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