libbpf: map 'my_pid_map': unsupported map linkage static - xmake

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

I have an issue to compile ebpf prog via xmake.

I have following map:
```c
struct
{
  __uint(type, BPF_MAP_TYPE_RINGBUF);
  __uint(max_entries, MAX_ENTRIES);
} ring_map SEC(".maps");
```
under v7.0.0 it works, under v7.1.0 and v7.2.0 getting an error:
"bpftool gen skeleton build/.gens/xxx/android/x86_64/release/rules/bpf/xxx.bpf.o -d -p"

```c
libbpf: map 'xxx': unsupported map linkage static.
{
    "error": "failed to open BPF object file: Operation not supported"
}
```
---
Reproduce error:
---

On the system there is bpftool v7.0.0 installed:
```
bpftool v7.0.0
using libbpf v1.0
features: libbpf_strict, skeletons
```

Get libbpf-bootstrap repo
`git clone --recurse-submodules https://github.com/libbpf/libbpf-bootstrap`

try to compile for Android via xmake according to the readme file:
```
$ git submodule update --init --recursive       # check out libbpf
$ cd examples/c
$ xmake f -p android
$ xmake
```

works.

---

Update the bpftool to v7.1.0 or v7.2.0
`git clone --depth 1 --branch v7.1.0 ... && make install`
`bpftool version`:
```
bpftool v7.1.0
using libbpf v1.1
features: llvm, skeletons
```

try again to compile via xmake:
```
[ 13%]: compiling.bpf uprobe.bpf.c
[ 13%]: compiling.bpf minimal.bpf.c
[ 13%]: compiling.bpf fentry.bpf.c
[ 13%]: compiling.bpf minimal_legacy.bpf.c
[ 17%]: cache compiling.release ../../libbpf/src/libbpf.c
[ 33%]: cache compiling.release ../../libbpf/src/netlink.c
[ 44%]: cache compiling.release ../../libbpf/src/bpf.c
[ 44%]: compiling.bpf bootstrap.bpf.c
libbpf: map 'my_pid_map': unsupported map linkage static.
Error: failed to open BPF object file: Operation not supported
error: execv(bpftool gen skeleton build/.gens/minimal_legacy/android/armeabi-v7a/release/rules/bpf/minimal_legacy.bpf.o) failed(161)
```

failed.

Seems like its for all .maps not only ringbuf.

---
Same for `v.7.2.0`

I created ticket as well on GitHub: https://github.com/libbpf/libbpf/issues/720


Seems like it's a bug


Regads,
Grubeli

Attachment: publickey - khasaia@pm.me - 0xAC812A1F.asc
Description: application/pgp-keys

Attachment: signature.asc
Description: OpenPGP digital signature


[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux