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

Crun master fails to build in Ubuntu 16 #405

Closed
TeknoVenus opened this issue Jun 15, 2020 · 2 comments · Fixed by #401
Closed

Crun master fails to build in Ubuntu 16 #405

TeknoVenus opened this issue Jun 15, 2020 · 2 comments · Fixed by #401

Comments

@TeknoVenus
Copy link
Contributor

The tip of crun (181135c) fails to build in Ubuntu 16.04.

Doing a git bisect shows the issue was introduced in 87b33ab

Build commands:

cd ~/crun
./autogen.sh
./configure --disable-systemd
sudo make install -j6

Output:

src/libcrun/ebpf.c: In function 'read_all_progs':
src/libcrun/ebpf.c:300:18: error: storage size of 'attr' isn't known
   union bpf_attr attr;
                  ^
src/libcrun/ebpf.c:312:32: error: 'BPF_CGROUP_DEVICE' undeclared (first use in this function)
       attr.query.attach_type = BPF_CGROUP_DEVICE;
                                ^
src/libcrun/ebpf.c:312:32: note: each undeclared identifier is reported only once for each function it appears in
src/libcrun/ebpf.c:316:13: warning: implicit declaration of function 'bpf' [-Wimplicit-function-declaration]
       ret = bpf (BPF_PROG_QUERY, &attr, sizeof (attr));
             ^
src/libcrun/ebpf.c:316:18: error: 'BPF_PROG_QUERY' undeclared (first use in this function)
       ret = bpf (BPF_PROG_QUERY, &attr, sizeof (attr));
                  ^
src/libcrun/ebpf.c: In function 'remove_all_progs':
src/libcrun/ebpf.c:332:18: error: storage size of 'attr' isn't known
   union bpf_attr attr;
                  ^
src/libcrun/ebpf.c:342:17: error: 'BPF_PROG_GET_FD_BY_ID' undeclared (first use in this function)
       fd = bpf (BPF_PROG_GET_FD_BY_ID, &attr, sizeof (attr));
                 ^
src/libcrun/ebpf.c:353:26: error: 'BPF_CGROUP_DEVICE' undeclared (first use in this function)
       attr.attach_type = BPF_CGROUP_DEVICE;
                          ^
src/libcrun/ebpf.c:357:18: error: 'BPF_PROG_DETACH' undeclared (first use in this function)
       ret = bpf (BPF_PROG_DETACH, &attr, sizeof (attr));
                  ^
src/libcrun/ebpf.c: In function 'ebpf_attach_program':
src/libcrun/ebpf.c:383:22: error: storage size of 'attr' isn't known
       union bpf_attr attr;
                      ^
src/libcrun/ebpf.c:411:26: error: 'BPF_CGROUP_DEVICE' undeclared (first use in this function)
       attr.attach_type = BPF_CGROUP_DEVICE;
                          ^
src/libcrun/ebpf.c:414:27: error: 'BPF_F_ALLOW_MULTI' undeclared (first use in this function)
       attr.attach_flags = BPF_F_ALLOW_MULTI;
                           ^
src/libcrun/ebpf.c:423:18: error: 'BPF_PROG_ATTACH' undeclared (first use in this function)
       ret = bpf (BPF_PROG_ATTACH, &attr, sizeof (attr));
@giuseppe
Copy link
Member

fixed with: #401

@giuseppe giuseppe linked a pull request Jun 15, 2020 that will close this issue
@TeknoVenus
Copy link
Contributor Author

Tested and builds fine with that PR. Thanks.

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 a pull request may close this issue.

2 participants