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

meson: Add scx_lib dep to gen_bpf_o #1067

Merged
merged 2 commits into from
Dec 8, 2024

Conversation

frelon
Copy link
Contributor

@frelon frelon commented Dec 7, 2024

This PR introduces a dependency on scx_lib in gen_bpf_o.

Without this dependency the build fails intermittently with the
following error:

FAILED: scheds/c/scx_pair.p/scx_pair.bpf.skel.h scheds/c/scx_pair.p/scx_pair.bpf.subskel.h
/home/frelon/src/scx/meson-scripts/bpftool_build_skel /usr/sbin/bpftool scheds/c/scx_pair.p/scx_pair.bpf.o scheds/c/scx_pair.p/scx_pair.bpf.skel.h scheds/c/scx_pair.p/scx_pair.bpf.subskel.h /home/frelon/src/scx/build/lib/lib
libbpf: failed to get ELF header for /home/frelon/src/scx/build/lib/lib.bpf.o: invalid `Elf' handle
/home/frelon/src/scx/meson-scripts/bpftool_build_skel: line 25: 3400506 Segmentation fault      (core dumped) "$bpftool" gen object "$stem".l1o "$input" "$lib".bpf.o

Also updates a usage of bpftool to use the passed in path.

@hodgesds hodgesds requested a review from etsal December 7, 2024 14:40
@frelon frelon changed the title meson bpftool scx lib meson: Add scx_lib dep to gen_bpf_o Dec 7, 2024
bpftool is taken as a parameter but not used explicitly.

Signed-off-by: Fredrik Lönnegren <fredrik@frelon.se>
This commit introduces a dependency on scx_lib in gen_bpf_o.

Without this dependency the build fails intermittently with the
following error:

```
FAILED: scheds/c/scx_pair.p/scx_pair.bpf.skel.h scheds/c/scx_pair.p/scx_pair.bpf.subskel.h
/home/frelon/src/scx/meson-scripts/bpftool_build_skel /usr/sbin/bpftool scheds/c/scx_pair.p/scx_pair.bpf.o scheds/c/scx_pair.p/scx_pair.bpf.skel.h scheds/c/scx_pair.p/scx_pair.bpf.subskel.h /home/frelon/src/scx/build/lib/lib
libbpf: failed to get ELF header for /home/frelon/src/scx/build/lib/lib.bpf.o: invalid `Elf' handle
/home/frelon/src/scx/meson-scripts/bpftool_build_skel: line 25: 3400506 Segmentation fault      (core dumped) "$bpftool" gen object "$stem".l1o "$input" "$lib".bpf.o
```

Signed-off-by: Fredrik Lönnegren <fredrik@frelon.se>
@frelon frelon force-pushed the meson-bpftool-scx-lib branch from f3d4576 to a72c24e Compare December 7, 2024 14:41
Copy link
Contributor

@likewhatevs likewhatevs left a comment

Choose a reason for hiding this comment

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

nice, LGTM

Copy link
Contributor

@etsal etsal left a comment

Choose a reason for hiding this comment

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

Nice catch, LGTM.

@htejun htejun added this pull request to the merge queue Dec 8, 2024
Merged via the queue into sched-ext:main with commit 5e1fea8 Dec 8, 2024
23 checks 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.

4 participants