参考:https://github.com/iovisor/bcc/issues/3601
环境
Ubuntu20.04 + ARM64
问题
编译bcc时报下面的错误:文章来源:https://www.toymoban.com/news/detail-861275.html
-- Found BISON: /usr/bin/bison (found version "3.5.1")
-- Found FLEX: /usr/bin/flex (found version "2.6.4")
-- Found LibElf: /usr/lib/aarch64-linux-gnu/libelf.so
-- Performing Test ELF_GETSHDRSTRNDX
-- Performing Test ELF_GETSHDRSTRNDX - Success
-- Could NOT find LibDebuginfod (missing: LIBDEBUGINFOD_LIBRARIES LIBDEBUGINFOD_INCLUDE_DIRS)
-- Found LibLzma: /usr/lib/aarch64-linux-gnu/liblzma.so
CMake Error at CMakeLists.txt:173 (message):
解决
- 安装clang-12:
wget https://apt.llvm.org/llvm.sh
chmod +x llvm.sh
./llvm.sh 12 al
- 创建软连接:
/usr/bin# ln -sf clang-12 clang
/usr/bin# ln -sf clang++-12 clang++
/usr/bin# ln -sf clang-cpp-12 clang-cpp
- 然后执行
cmake .. -DCMAKE_PREFIX_PATH=/usr/lib/llvm-12
基于eadb在Android上搭建eBPF开发环境
参考这篇文档文章来源地址https://www.toymoban.com/news/detail-861275.html
到了这里,关于在ubuntu20上编译bcc时遇到:Could NOT find LibDebuginfod的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!