facebookexperimental / facebookexperimental/ExtendedAndroidTools
make bpftools build fails: `ld.lld: error: unable to find library -lLLVM` when linking `bpftrace-aotrt`
- 主要语言
- Makefile
- 星标
- 266
- 派生
- 99
- PR 合并指标
- 30 天内没有已合并 PR
描述
**Steps to reproduce**
Execute standard steps:
```bash
# Build the Docker image
./scripts/build-docker-image.sh
# Run the environment
./scripts/run-docker-build-env.sh
# clean the project
make clean
# Create the artifact in out/archives/bpftools-arm64.tar.gz
make bpftools THREADS=$(nproc)
```
**Description**
Following the steps, the build stops at 96% during the `bpftrace` step with error "unable to find library -lLLVM" during the phase "Linking CXX executable bpftrace-aotrt". The same issue also occurs if I use make bpftools-min.
Can you fix this issue?
```bash
uname -r
5.14.0-503.40.1.el9_5.x86_64
podmav -v
podman version 5.2.2
```
Thank you for the awesome project and thanks in advance for for your reply.
** Logs**
```bash
make[3]: Leaving directory '/ExtendedAndroidTools/build/android/arm64/bpftrace'
[ 64%] Built target runtime
[ 87%] Built target ast
make[3]: Entering directory '/ExtendedAndroidTools/build/android/arm64/bpftrace'
make[3]: Entering directory '/ExtendedAndroidTools/build/android/arm64/bpftrace'
make[3]: Leaving directory '/ExtendedAndroidTools/build/android/arm64/bpftrace'
Consolidate compiler generated dependencies of target libbpftrace
make[3]: Entering directory '/ExtendedAndroidTools/build/android/arm64/bpftrace'
**[ 88%] Linking CXX executable bpftrace-aotrt
make[3]: Leaving directory '/ExtendedAndroidTools/build/android/arm64/bpftrace'
ld.lld: error: unable to find library -lLLVM
clang++: error: linker command failed with exit code 1 (use -v to see invocation)**
make[3]: *** [src/aot/CMakeFiles/bpftrace-aotrt.dir/build.make:112: src/aot/bpftrace-aotrt] Error 1
make[3]: Leaving directory '/ExtendedAndroidTools/build/android/arm64/bpftrace'
make[2]: *** [CMakeFiles/Makefile2:638: src/aot/CMakeFiles/bpftrace-aotrt.dir/all] Error 2
make[2]: *** Waiting for unfinished jobs....
make[3]: Entering directory '/ExtendedAndroidTools/build/android/arm64/bpftrace'
[ 89%] Building CXX object src/CMakeFiles/libbpftrace.dir/clang_parser.cpp.o
/ExtendedAndroidTools/projects/bpftrace/sources/src/clang_parser.cpp:387:25: warning: moving a temporary object prevents copy elision [-Wpessimizing-move]
387 | enum_name = std::move(name.str());
| ^
/ExtendedAndroidTools/projects/bpftrace/sources/src/clang_parser.cpp:387:25: note: remove std::move call here
387 | enum_name = std::move(name.str());
| ^~~~~~~~~~ ~
1 warning generated.
[ 91%] Linking CXX static library libbpftrace.a
make[3]: Leaving directory '/ExtendedAndroidTools/build/android/arm64/bpftrace'
[ 96%] Built target libbpftrace
make[2]: Leaving directory '/ExtendedAndroidTools/build/android/arm64/bpftrace'
make[1]: *** [Makefile:136: all] Error 2
make[1]: Leaving directory '/ExtendedAndroidTools/build/android/arm64/bpftrace'
make: *** [projects/bpftrace/build.mk:25: build/android/arm64/bpftrace.done] Error 2
贡献指南
评估
这个 Issue 还没有评估数据。