Comments (10)
I have fixed this error. #237
we can use bpftool 7.2.0 now.
from libbpf-bootstrap.
I have fixed this issue, see this patch. #236
This is because after the elfutils package in xmake-repo was installed, its make install script did not automatically install elf.h, so elfutils/libelf.h automatically found elf.h on the system, resulting in some header file conflicts.
incorrect search paths:
bpf -> elfutils/libelf.h -> system/elf.h
now:
bpf -> elfutils/libelf.h -> elfutils/elf.h
system/libelf is too old, we should not use it. and I have updated elfutils to 0.189
I've fixed this, try reinstalling the elfutils package to fix this.
xrepo update-repo
xrepo remove --all -y elfutils
xmake f -p android -c --require-bpftool=y
xmake
from libbpf-bootstrap.
When I do
--require-bpftool=y
which means that bpftool is fetched from xmake repo it works! thanks! But when I try to installbfptool
from Github on the system, for example latest 7.2.0 it fails same way.I need to be able to specify package versions by commit or something
Due to some issues with system bpftool 7.2.0, it is recommended to pull the specified version of bpftool from the remote by default until these issues are fixed. It always works fine.
Also, we can specify the bpftool version in the add_requires()
of xmake.lua
Now we can only run xmake f -p android
to configure and build it.
And I'm going to improve the fetch script for the bpftool package inside xmake-repo to also enable version checking of the system bpftool, so that if the system bpftool is the one we need, we can still prioritise the use of the system bpftool instead of downloading and installing it every time.
from libbpf-bootstrap.
xmake support is best-effort, unfortunately. It seems like your libelf is too old, unfortunately. Can you try updating it on your system?
from libbpf-bootstrap.
actually, I think we might need to just fix it on libbpf side to avoid this problem, I'll look into that
from libbpf-bootstrap.
hm... it seems like SHT_GNU_versym
has been defined since at least 2005, so either you have super ancient version of libelf, or it's wrong one. You need elfutils package, I believe.
from libbpf-bootstrap.
I have the same case as the OP, when running xmake f -p android
on the first time following packages are installed:
-> ndk 22.0
-> zlib v1.3 [toolchains:"@ndk", from:elfutils]
-> libintl 0.21 [toolchains:"@ndk", from:elfutils]
-> argp-standalone 1.3 [toolchains:"@ndk", from:elfutils]
-> elfutils 0.183
It installed elfutils 0.183, I guess we all should have the same version, isn't?
dpkg -s libelf1
Package: libelf1
Status: install ok installed
Priority: important
Section: libs
Installed-Size: 192
Maintainer: Ubuntu Developers <[email protected]>
Architecture: amd64
Multi-Arch: same
Source: elfutils
Version: 0.186-1build1
Depends: libc6 (>= 2.33), zlib1g (>= 1:1.1.4)
from libbpf-bootstrap.
Updated to the latest elfutils
available on Ubuntu 22.04 but same.
from libbpf-bootstrap.
When I do --require-bpftool=y
which means that bpftool is fetched from xmake repo it works! thanks!
But when I try to install bfptool
from Github on the system, for example latest 7.2.0 it fails same way.
I need to be able to specify package versions by commit or something
from libbpf-bootstrap.
Sounds good, thank you!
from libbpf-bootstrap.
Related Issues (20)
- profile program crash HOT 3
- How can I get container id from cgroup v1 with ebpf code? HOT 1
- xmake build minimal fail stddef.h:11:2: error: expected identifier false = 0, HOT 1
- Compilation fails in CentOS 7.6 HOT 3
- Retrieving argument values from newfstatat HOT 2
- Rust: How to attach a single bpf program to multiple network interfaces? HOT 3
- Make failed HOT 2
- Make error - poisoned strlcpy HOT 1
- add xdp synproxy in c example? HOT 2
- run fentry examples in Loongarch cpu failed HOT 2
- error: unable to create target: 'No available targets are compatible with triple "bpf"' HOT 1
- Does libbpf-bootstrap support sk_msg/stream_parser & sk_msg/stream_parser hook ?
- example uprobe no output HOT 4
- (ARM64) Rust Example Tracecon Does Not Compile HOT 2
- [Android] Failed to find valid kernel BTF HOT 19
- How to read arbitrary len bytes using helper bpf_skb_load_bytes()? HOT 2
- To compile the Rust example in libbpf-bootstrap for use on the Android platform or arm64 , what should I do? HOT 1
- when compile the Rust example in libbpf-bootstrap for target arm64 ,why build.rs use vmlinux.h is x86 ? HOT 8
- unknown func bpf_kallsyms_lookup_name#179 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from libbpf-bootstrap.