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

clang-tidy missing from SDK #1039

Open
mous16 opened this issue Dec 9, 2024 · 0 comments
Open

clang-tidy missing from SDK #1039

mous16 opened this issue Dec 9, 2024 · 0 comments

Comments

@mous16
Copy link

mous16 commented Dec 9, 2024

Describe the bug
Building core-image-minimal SDK on scarthgap, results in missing clang-tidy executable from SDK, but with broken links to it.

To Reproduce
Steps to reproduce the behavior:

  1. Setup minimal poky checkout with meta-clang
  2. Add just CLANGSDK = "1" line to local.conf
  3. Build image and SDK with bitbake core-image-minimal -c populate_sdk
  4. Install generated SDK
  5. Verify that no clang-tidy executable is present in SDK:
    $ ls -l $(find . -iname "*clang-tidy*")
    lrwxrwxrwx  ./sysroots/x86_64-pokysdk-linux/usr/bin/x86_64-poky-linux-gnux32/x86_64-poky-linux-gnux32-clang-tidy -> ../x86_64-poky-linux/x86_64-poky-linux-clang-tidy
    lrwxrwxrwx  ./sysroots/x86_64-pokysdk-linux/usr/bin/x86_64-poky-linux-musl/x86_64-poky-linux-musl-clang-tidy -> ../x86_64-poky-linux/x86_64-poky-linux-clang-tidy
    lrwxrwxrwx  ./sysroots/x86_64-pokysdk-linux/usr/bin/x86_64-poky-linux-muslx32/x86_64-poky-linux-muslx32-clang-tidy -> ../x86_64-poky-linux/x86_64-poky-linux-clang-tidy
    lrwxrwxrwx  ./sysroots/x86_64-pokysdk-linux/usr/bin/x86_64-poky-linux/x86_64-poky-linux-clang-tidy -> ../clang-tidy
    But ./sysroots/x86_64-pokysdk-linux/usr/bin/clang-tidy does not exist.

Expected behavior
clang-tidy binary should be included in SDK, as it happens for clang-include-cleaner and clangd.

Additional context
If I add to local.conf

TOOLCHAIN_TARGET_TASK:append = " \
    nativesdk-clang-tidy \
"

the build fails with packaging problem, using ipk:

ERROR: core-image-minimal-1.0-r0 do_populate_sdk: Unable to install packages. Command './poky/build/tmp/work/qemux86_64-poky-linux/core-image-minimal/1.0/recipe-sysroot-native/usr/bin/opkg --volatile-cache -f ./poky/build/tmp/work/qemux86_64-poky-linux/core-image-minimal/1.0/opkg-sdk-target.conf -t ./poky/build/tmp/work/qemux86_64-poky-linux/core-image-minimal/1.0/temp/ipktemp/ -o ./poky/build/tmp/work/qemux86_64-poky-linux/core-image-minimal/1.0/sdk/image/usr/local/oe-sdk-hardcoded-buildpath/sysroots/core2-64-poky-linux  --force_postinstall --prefer-arch-to-version   install nativesdk-clang-tidy packagegroup-core-boot packagegroup-core-standalone-sdk-target run-postinsts target-sdk-provides-dummy' returned 255:
 * opkg_prepare_url_for_install: Couldn't find anything to satisfy 'nativesdk-clang-tidy'.

and using rpm:

ERROR: core-image-minimal-1.0-r0 do_populate_sdk: Could not invoke dnf. Command './poky/build/tmp/work/qemux86_64-poky-linux/core-image-minimal/1.0/recipe-sysroot-native/usr/bin/dnf -v --rpmverbosity=info -y -c ./poky/build/tmp/work/qemux86_64-poky-linux/core-image-minimal/1.0/sdk/image/usr/local/oe-sdk-hardcoded-buildpath/sysroots/core2-64-poky-linux/etc/dnf/dnf.conf --setopt=reposdir=./poky/build/tmp/work/qemux86_64-poky-linux/core-image-minimal/1.0/sdk/image/usr/local/oe-sdk-hardcoded-buildpath/sysroots/core2-64-poky-linux/etc/yum.repos.d --installroot=./poky/build/tmp/work/qemux86_64-poky-linux/core-image-minimal/1.0/sdk/image/usr/local/oe-sdk-hardcoded-buildpath/sysroots/core2-64-poky-linux --setopt=logdir=./poky/build/tmp/work/qemux86_64-poky-linux/core-image-minimal/1.0/temp --repofrompath=oe-repo,./poky/build/tmp/work/qemux86_64-poky-linux/core-image-minimal/1.0/oe-sdk-repo --nogpgcheck install nativesdk-clang-tidy packagegroup-core-boot packagegroup-core-standalone-sdk-target run-postinsts target-sdk-provides-dummy' returned 1:
DNF version: 4.19.0
cachedir: ./poky/build/tmp/work/qemux86_64-poky-linux/core-image-minimal/1.0/sdk/image/usr/local/oe-sdk-hardcoded-buildpath/sysroots/core2-64-poky-linux/var/cache/dnf
Added oe-repo repo from ./poky/build/tmp/work/qemux86_64-poky-linux/core-image-minimal/1.0/oe-sdk-repo
User-Agent: falling back to 'libdnf': could not detect OS or basearch
repo: using cache for: oe-repo
oe-repo: using metadata from Mon 09 Dec 2024 01:53:27 PM UTC.
Last metadata expiration check: 0:00:01 ago on Mon 09 Dec 2024 02:28:19 PM UTC.
--> Starting dependency resolution
--> Finished dependency resolution
Error:
 Problem: conflicting requests
  - package nativesdk-clang-tidy-18.1.6-r0.x86_64_nativesdk from oe-repo does not have a compatible architecture
  - nothing provides libLLVM.so.18.1()(64bit) needed by nativesdk-clang-tidy-18.1.6-r0.x86_64_nativesdk from oe-repo
  - nothing provides libLLVM.so.18.1(LLVM_18.1)(64bit) needed by nativesdk-clang-tidy-18.1.6-r0.x86_64_nativesdk from oe-repo
  - nothing provides libclang-cpp.so.18.1()(64bit) needed by nativesdk-clang-tidy-18.1.6-r0.x86_64_nativesdk from oe-repo
  - nothing provides nativesdk-libc6 >= 2.39+git0+dcaf51b41e needed by nativesdk-clang-tidy-18.1.6-r0.x86_64_nativesdk from oe-repo
  - nothing provides nativesdk-libgcc1 >= 13.3.0 needed by nativesdk-clang-tidy-18.1.6-r0.x86_64_nativesdk from oe-repo
  - nothing provides nativesdk-libstdc++6 >= 13.3.0 needed by nativesdk-clang-tidy-18.1.6-r0.x86_64_nativesdk from oe-repo
  - nothing provides nativesdk-clang-libllvm >= 18.1.6 needed by nativesdk-clang-tidy-18.1.6-r0.x86_64_nativesdk from oe-repo
  - nothing provides nativesdk-libclang-cpp18.1 >= 18.1.6 needed by nativesdk-clang-tidy-18.1.6-r0.x86_64_nativesdk from oe-repo
(try to add '--skip-broken' to skip uninstallable packages)
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

No branches or pull requests

1 participant