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

Weird BPF related compilation issues on Debian 10 and Ubuntu 20 #947

Open
pavel-odintsov opened this issue Nov 8, 2022 · 4 comments
Open

Comments

@pavel-odintsov
Copy link
Owner

pavel-odintsov commented Nov 8, 2022

In file included from /tmp/fastnetmon.build.dir.V5QUf72HFb/fastnetmon/src/xdp_plugin/xdp_collector.cpp:14:
/opt/fastnetmon-community/libraries/libbpf_1_0_1/include/bpf/bpf.h:396:6: error: use of enum 'bpf_stats_type' without previous declaration
  396 | enum bpf_stats_type; /* defined in up-to-date linux/bpf.h */
      |      ^~~~~~~~~~~~~~
/opt/fastnetmon-community/libraries/libbpf_1_0_1/include/bpf/bpf.h:397:38: error: use of enum 'bpf_stats_type' without previous declaration
  397 | LIBBPF_API int bpf_enable_stats(enum bpf_stats_type type);
      |                                      ^~~~~~~~~~~~~~
In file included from /tmp/fastnetmon.build.dir.V5QUf72HFb/fastnetmon/src/xdp_plugin/xdp_collector.cpp:15:
/opt/fastnetmon-community/libraries/libbpf_1_0_1/include/bpf/libbpf.h:70:54: error: use of enum 'bpf_link_type' without previous declaration
   70 | LIBBPF_API const char *libbpf_bpf_link_type_str(enum bpf_link_type t);
      |                                                      ^~~~~~~~~~~~~
[ 25%] Linking CXX static library libpatricia.a
@pavel-odintsov pavel-odintsov changed the title Weird BPF related compilation issues on Debian 11 and Ubuntu 20 Weird BPF related compilation issues on Debian 10 and Ubuntu 20 Nov 27, 2022
@pavel-odintsov
Copy link
Owner Author

Addressed compilation bug via nasty workaround: 3b91233

But I do not like having such complex workaround in our code.

@pavel-odintsov
Copy link
Owner Author

Upstream link to bug: libbpf/libbpf#249

@pavel-odintsov
Copy link
Owner Author

Long term bug arrived and I hope it will be in next stable libbpf release

@pavel-odintsov
Copy link
Owner Author

We can try rebasing to latest libbpf in attempt to fix it without out workaround: https://github.com/libbpf/libbpf/releases/tag/v1.1.0

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

No branches or pull requests

1 participant