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

Update libbpf commit hash #396

Merged
merged 1 commit into from
Jun 28, 2024
Merged

Update libbpf commit hash #396

merged 1 commit into from
Jun 28, 2024

Conversation

otteryc
Copy link
Contributor

@otteryc otteryc commented Jun 28, 2024

libbpf has added a member link in the struct bpf_map_skeleton, which causes a build failure in SCX. This commit updates the libbpf commit hash to the latest version to avoid this error.

Please refer to commit be998aa in libbpf repo.

Error message:
ninja: Entering directory `/home/otteryc/linux2024/scx/build'
[3/25] Compiling C object scheds/c/scx_simple.p/scx_simple.c.o
FAILED: scheds/c/scx_simple.p/scx_simple.c.o
cc -Ischeds/c/scx_simple.p -Ischeds/c -I../scheds/c -I../scheds/include -I../build/libbpf/src/usr/include -I../build/libbpf/include/uapi -fdiagnostics-color=alway
s -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -O0 -g -pthread -MD -MQ scheds/c/scx_simple.p/scx_simple.c.o -MF scheds/c/scx_simple.p/scx_simple.c.o.d -o scheds/c/s
cx_simple.p/scx_simple.c.o -c ../scheds/c/scx_simple.c In file included from ../scheds/c/scx_simple.c:13: scheds/c/scx_simple.p/scx_simple.bpf.skel.h: In function ‘scx_simple__create_skeleton’:
scheds/c/scx_simple.p/scx_simple.bpf.skel.h:243:19: error: ‘struct bpf_map_skeleton’ has no member named ‘link’
243 | s->maps[5].link = &obj->links.simple_ops;
| ^

libbpf has added a member `link` in the struct `bpf_map_skeleton`, which causes
a build failure in SCX. This commit updates the libbpf commit hash to the latest
version to avoid this error.

Please refer to commit be998aa in libbpf repo.

Signed-off-by: Yu-Cheng Chen <[email protected]>
@htejun htejun merged commit 769e6c4 into sched-ext:main Jun 28, 2024
1 check failed
@arighi
Copy link
Contributor

arighi commented Jun 28, 2024

The build is fine, but the new libbpf seems to break the run of any scheduler:

libbpf: struct_ops reloc bpfland_ops: for 63 value 0 shdr_idx 4 rel->r_offset 0 map->sec_offset 0 name 836 ('bpfland_select_cpu')
libbpf: struct_ops reloc bpfland_ops: for 76 value 0 shdr_idx 5 rel->r_offset 8 map->sec_offset 0 name 1096 ('bpfland_enqueue')
libbpf: struct_ops reloc bpfland_ops: for 82 value 0 shdr_idx 6 rel->r_offset 24 map->sec_offset 0 name 1210 ('bpfland_dispatch')
libbpf: struct_ops reloc bpfland_ops: for 84 value 0 shdr_idx 7 rel->r_offset 48 map->sec_offset 0 name 1243 ('bpfland_running')
libbpf: struct_ops reloc bpfland_ops: for 86 value 0 shdr_idx 8 rel->r_offset 56 map->sec_offset 0 name 1270 ('bpfland_stopping')
libbpf: struct_ops reloc bpfland_ops: for 91 value 0 shdr_idx 10 rel->r_offset 128 map->sec_offset 0 name 1330 ('bpfland_init_task')
libbpf: struct_ops reloc bpfland_ops: for 90 value 0 shdr_idx 9 rel->r_offset 144 map->sec_offset 0 name 1315 ('bpfland_enable')
libbpf: struct_ops reloc bpfland_ops: for 92 value 0 shdr_idx 11 rel->r_offset 248 map->sec_offset 0 name 1348 ('bpfland_init')
libbpf: struct_ops reloc bpfland_ops: for 97 value 0 shdr_idx 12 rel->r_offset 256 map->sec_offset 0 name 1436 ('bpfland_exit')
libbpf: failed to find skeleton map ''
libbpf: failed to populate skeleton maps for 'bpf_bpf': -3
Error: Failed to open BPF program

Caused by:
    No such process (os error 3)

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