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

Fix packaging error for libclang on kirkstone #881

Merged
merged 1 commit into from
Nov 10, 2023

Conversation

fwuehr95
Copy link

@fwuehr95 fwuehr95 commented Nov 10, 2023


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)

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

@kraj kraj merged commit 79169d9 into kraj:kirkstone Nov 10, 2023
@miwojcik
Copy link
Contributor

miwojcik commented Dec 7, 2023

Hi @fwuehr95, @kraj

I found out that after this commit bpftrace is broken:

root@qemuarm64:~# bpftrace -l
bpftrace: error while loading shared libraries: libclang.so.13: cannot open shared object file: No such file or directory```

and after more investigation I discovered potential problems with this change.

Before this commit, libclang package wasn't created as there were no files to package and both libclang.so.14.0.6 and a libclang.so.13 symlink were implicitly included in the clang package:

$ dpkg -c ./tmp/deploy/ipk/cortexa57/clang_14.0.6-r0_cortexa57.ipk
...
lrwxrwxrwx root/root         0 2011-04-06 01:00 ./usr/lib/libclang.so.13 -> libclang.so.14.0.6
-rwxr-xr-x root/root  29451416 2011-04-06 01:00 ./usr/lib/libclang.so.14.0.6
...

However, now it only contains the libclang.so.13 symlink to the so file:

dpkg -c ./tmp/deploy/ipk/cortexa57/libclang_14.0.6-r0_cortexa57.ipk
drwxr-xr-x root/root         0 2011-04-06 01:00 ./usr/
drwxr-xr-x root/root         0 2011-04-06 01:00 ./usr/lib/
lrwxrwxrwx root/root         0 2011-04-06 01:00 ./usr/lib/libclang.so.13 -> libclang.so.14.0.6

and the so file is still in the clang package:

dpkg -c ./tmp/deploy/ipk/cortexa57/clang_14.0.6-r0_cortexa57.ipk
...
-rwxr-xr-x root/root  29451416 2011-04-06 01:00 ./usr/lib/libclang.so.14.0.6
...

The obvious fix would be to also include the so file in the libclang package, but here is my concern - we can't tell how many packages/recipes rely on the fact that libclang was implicitly included in the clang package, that would now require fixing the dependencies.
That would be a great fix on a master branch (although you mentioned in #879 it is not necessary), but kirkstone branch is LTS, so I'm not sure if it wouldn't be better to revert this commit and live with the fact that libclang is not packaged correctly, rather than to start a chain of dependency fixes.

Of course if you have other solutions I'd be happy to discuss them.

Temporarily I was able to bing back bpftrace to life by modifying its recipe:

--- a/dynamic-layers/openembedded-layer/recipes-devtools/bpftrace/bpftrace_0.14.1.bb
+++ b/dynamic-layers/openembedded-layer/recipes-devtools/bpftrace/bpftrace_0.14.1.bb
@@ -14,7 +14,7 @@ DEPENDS += "bison-native \
             "

 PV .= "+git${SRCREV}"
-RDEPENDS:${PN} += "bash python3 xz"
+RDEPENDS:${PN} += "bash libclang python3 xz"

 SRC_URI = "git://github.com/iovisor/bpftrace;branch=master;protocol=https \
            file://0001-Detect-new-BTF-api-btf_dump__new-btf_dump__new_v0_6_.patch \

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.

3 participants