-
Notifications
You must be signed in to change notification settings - Fork 104
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
Compilation fails, when system bpftool is used #1055
Comments
Thanks for reporting this. Could you please post the version of the system bpftool that breaks this, and that of the latest bpftool? I am assuming one is <=7.5.0 and the other is 7.6.0? There seems to be an issue we are investigating with libbpf <-= 1.5.0 that causes If that is the case, we can make linking with the library for C functions opt-in. This would prevent us from compiling |
Archlinux currently ships currently 7.5.0 provided by the bpf packages in linux-tools 6.12.
Yes, we are using on archlinux libbpf 1.5.0.
We are currently shipping in archlinux all sched-ext schedulers, and likely would keep doing so also in future releases. |
In that case, I will turn off library linking for now if our bpftool gets overridden by the build option. This will also disable building |
Can you send me the exact commit of the system bpftool used in the failing release? The commit that fixes the possible bug is libbpf/libbpf@ecf998e, but that should be included in the tagged release. |
https://archlinux.org/packages/core/x86_64/libbpf/ Its using each just the latest release. Gonna test the MR. |
Sounds good, please make sure to use a75b865 which is the most recent version of the pull request (I just updated it). |
Some warnings are there, but it seems to be building correctly. |
Sounds good, in that case I will be merging the patch. I will keep this issue open, if the problem persists please let me know and I will take a look. |
After trying the LLVM 19 fix from #1051, my bpftool segfaulted:
|
Can you post the bpftool version/repo commit? It might be that the bpftool is not built out of the most recent tree. Also, is the project compiling when using the bpftool downloaded by scx? |
I'm building against the system Thinking more it wasn't because of a library it was linked against;
I rebuilt I wasn't sure if this was useful information or not but I figured I'd post it anyways. |
@htejun @etsal
Reproducer in archlinux env: |
Same problem in Ubuntu if you don't have a system bpftool installed. Installing the system bpftool seems to fix it, but I guess it's not using the fetched bpftool anymore (even if it's still fetching it). BTW, this is only for the C schedulers. |
#1071 seems to fix the build issue on Ubuntu, but I think it's a different one.... |
The commands succeed on up-to-date arch system, so maybe #1071 fixed this? |
@arighi
|
Ok, but does it work also with the non-system bpftool? |
When removing -D bpftool=disabled the compilation from scx-scheds-git is succesful. |
I just did some experimenting. I made a brand new Arch Linux installation. I then cloned and built I then cloned Then I realized that neither So then I wanted to build a new bpftool, and see if it solves the issue like it did for me on Gentoo. Took me a moment to realize that I had to clone This time I used Checking Conclusion: My issue here was unrelated, both the latest release and latest git are still broken when building on Arch Linux with the system |
Can you try #1080? It should avoid the codepath that triggers the error. |
So it will only attempt to build it if bpftool is older than 7.0 or at least 7.5. Arch Linux is using bpftool 7.5, which satisfies this check. So it still tries to build and still fails. If I change the condition to
I'm building just fine on my Gentoo system with bpftool 7.5. So I'm doubtful that the bpftool version is the problem here. I also tried using system or downloaded libbpf and it didn't make a difference. |
Sorry about that. Can you try changing the condition to bpftool_min < 5? This is what the intended check was. |
Oh I meant to say I changed it to < 5 but I used the wrong symbol in my comment here. I am getting
I tried commenting/removing references to it in |
This is weird, for older bpftool versions line 308 should never be triggering. I will look into it. |
Reproducer:
Log:
Removing the usage of system bpftool fixes the issue.
Issue can not be reproduced on latest release.
The text was updated successfully, but these errors were encountered: