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

scx_lib: use the proper bpftool #1071

Merged
merged 1 commit into from
Dec 8, 2024
Merged

scx_lib: use the proper bpftool #1071

merged 1 commit into from
Dec 8, 2024

Conversation

arighi
Copy link
Contributor

@arighi arighi commented Dec 8, 2024

Make sure to use the right bpftool when building scx_lib, instead of always relying on the system's bpftool.

Fixes: 3d72a8e ("add library infrastructure and turn allocator into a library")

@likewhatevs
Copy link
Contributor

btw #1067 (being merged atm) fixes this also

@arighi
Copy link
Contributor Author

arighi commented Dec 8, 2024

btw #1067 (being merged atm) fixes this also

Hm.. nope, it's still broken:

FAILED: lib/lib.bpf.o
/home/nvidia/arighi/src/scx/meson-scripts/compile_scx_lib /home/nvidia/arighi/src/scx/build/bpftool/src/bpftool lib/lib.bpf.o lib lib/sdt_task.bpf.o
/home/nvidia/arighi/src/scx/meson-scripts/compile_scx_lib: line 12: /home/nvidia/arighi/src/scx/build/bpftool/src/bpftool: No such file or directory

I think bash doesn't like the double quotes around "$bpftool".

@arighi arighi force-pushed the scx-lib-bpftool-fix branch from 0e31e8e to ae0d924 Compare December 8, 2024 11:11
@arighi
Copy link
Contributor Author

arighi commented Dec 8, 2024

Updated on top of #1067, @likewhatevs can you check if this works for you as well?

@arighi
Copy link
Contributor Author

arighi commented Dec 8, 2024

@likewhatevs actually scratch that, it's still not working, something else is broken now... looking.

Now I need to run meson compile -C build scx_simple twice, the first time it doesn't build because it doesn't find bpftool... wth?

@likewhatevs
Copy link
Contributor

this worked for me without needing to run compile twice?:

rm -rf build
meson setup build
meson compile -C build scx_simple

Make sure to use the right bpftool when building scx_lib, instead of
always relying on the system's bpftool.

Fixes: 3d72a8e ("add library infrastructure and turn allocator into a library")
Signed-off-by: Andrea Righi <arighi@nvidia.com>
@arighi arighi force-pushed the scx-lib-bpftool-fix branch from ae0d924 to 21cf3cc Compare December 8, 2024 11:28
@arighi
Copy link
Contributor Author

arighi commented Dec 8, 2024

@likewhatevs I see the problem, scx_lib should depend on bpftool_target. It seems to be fixed now.

@likewhatevs
Copy link
Contributor

I tested the latest commit on my system and it worked also (but it worked before for me so maybe there's something non-standard on my system making this always work).

@arighi
Copy link
Contributor Author

arighi commented Dec 8, 2024

I tested the latest commit on my system and it worked also (but it worked before for me so maybe there's something non-standard on my system making this always work).

It could be also a timing / parallelization issue and in your case it was always building bpftool before any scheduler (or you are using the system's bpftool).

@arighi arighi added this pull request to the merge queue Dec 8, 2024
Merged via the queue into main with commit b4db5ee Dec 8, 2024
46 checks passed
@arighi arighi deleted the scx-lib-bpftool-fix branch December 8, 2024 12:16
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