facebookexperimental / facebookexperimental/ExtendedAndroidTools

error: unknown target triple 'unknown'

Open
#130 8 comments 0 reactions 0 assignees View on GitHub
Dominant language
Makefile
Stars
266
Forks
99
PR merge metrics
No merged PRs in 30d

Description

I successfully compiled bpftrace using the following method:

> $ ./scripts/build-docker-image.sh && ./scripts/run-docker-build-env.sh
> $ make bpftrace STATIC_LINKING=true LLVM_BPF_ONLY=true NDK_ARCH=arm64 BUILD_TYPE=Release

the information of bpftrace is as follows:

> $ file out/android/arm64/bin/bpftrace
> out/android/arm64/bin/bpftrace: ELF 64-bit LSB pie executable, ARM aarch64, version 1 (SYSV), dynamically linked, interpreter /system/bin/linker64, BuildID[sha1]=cce10138c4fd29d85c8a0563f76541ae8977cfb5, stripped

> $readelf -d out/android/arm64/bin/bpftrace
> Dynamic section at offset 0x4b25e98 contains 26 entries:
> Tag Type Name/Value
> 0x0000000000000001 (NEEDED) Shared library: [libdl.so]
> 0x0000000000000001 (NEEDED) Shared library: [libm.so]
> 0x0000000000000001 (NEEDED) Shared library: [libz.so]
> 0x0000000000000001 (NEEDED) Shared library: [libc.so]
> 0x000000000000001e (FLAGS) BIND_NOW
> 0x000000006ffffffb (FLAGS_1) Flags: NOW PIE
> .....
> .....

the bpftrace binary can run normally on the android system,but it can't executed with commands and reports error "unknown target triple", as follow:

> $ bpftrace -e 'tracepoint:tcp:tcp_probe { @[comm] = count();}'
> error: unknown target triple 'unknown'

How should I solve this problem ?
Thanks.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.