bcc
bcc copied to clipboard
Could NOT find LibDebuginfod
Hi,
I am new here.
When to compile bcc from source in ubuntu 20.04, I got a line at the first step.
Could NOT find LibDebuginfod (missing: LIBDEBUGINFOD_LIBRARIES LIBDEBUGINFOD_INCLUDE_DIRS)
But I googled a lot without any info.
Please help. Which package includes this lib? Thanks.
sudo apt install libdebuginfod-dev
I guess this lib is not important. But when I try to build without this lib. I got so many warnings.
sudo apt install libdebuginfod-dev
This does not work.
yum list *libdebuginfod*
can not find it as well. Did your guys find the repo for this lib?
@APIPLM It seems this lib is not a standard package for linux. I googled a lot and found this lib relates to some other binary, like groovy. But installation of groovy does not help either.
This should be some debug tools. I just left it out and compiled the resource. It works well.
@dongwangdw Thanks. Remark the line find_package(LibDebuginfod)
in the CMakeLists.txt
file, the compilation has been done without stopping in my side. Not sure that what functionality will need this lib. Or it is just for the building activity. There is a place about the debuginfod .
https://github.com/iovisor/bcc/pull/3393
Maybe you need elfutils installed.
In this pull request, for bpftrace
, there is an integration to debuginfod
.
None of the proposals works.
Sound like that debuginfod
is in the active test process. See the linker https://sourceware.org/git/?p=elfutils.git;a=summary. you can check them the status of the project.
The source code of debuginfod
in the project elfutils . In order to build the project, we have to lib sqlite3, curl libmicrohttpd and libarchive. It is totally the whole thing, Not only the web version of it to connect the debuginfod
web server, there is the web service https://debuginfod.systemtap.org/ available , and also build the local debuginfod
server. In my site, I stop building at the sqlite
now . Sound like the web client is done. Then add back the line find_package(LibDebuginfod)
to in the CMakeLists.txt
file. It success.
I did the following and the error went away:
sudo dnf install -y elfutils-devel
I encountered another error after that (Unable to find clang libraries
) but that is not relevant to elfutils
I believe.
In my side. I have not installed elfutils-devel
, I still can build the whole bunch of things. But I enable debug Debuginfo repo.
I guest that there are two ways to build it. One is you mentioned install elfutils-devel
, other one is enable Debuginfo repo.
The error you mentioned in the above. Seem like that gcc can not find out.
I have the same error
-- Found LLVM: /usr/lib/llvm-10/include 10.0.0 -- Could NOT find LibDebuginfod (missing: LIBDEBUGINFOD_LIBRARIES LIBDEBUGINFOD_INCLUDE_DIRS) CMake Error at CMakeLists.txt:106 (message): Unable to find clang libraries -- Configuring incomplete, errors occurred!
and I usesudo apt install -y bison build-essential cmake flex git libedit-dev \ libllvm7 llvm-7-dev libclang-7-dev python zlib1g-dev libelf-dev libfl-dev python3-distutils
to install all the libraries .I still confused.Yesterday I can intall bcc=tools on the other computer. By the way,both of the ubuntu 20.04
I had a similar issue on Ubuntu 18.04. Botch clang 9.0 and 6.0 were installed. I removed 6.0 and was able to compile bcc.
Same here on Ubuntu 20.04.2 focal LTS
Could NOT find LibDebuginfod (missing: LIBDEBUGINFOD_LIBRARIES LIBDEBUGINFOD_INCLUDE_DIRS)
sudo apt install libdebuginfod-dev
Me too
$ sudo apt install libdebuginfod-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package libdebuginfod-dev
same problem on ubuntu 18.04, could not find libdebuginfod-dev
I had a similar problem:
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 20.04.3 LTS
Release: 20.04
Codename: focal
// https://github.com/iovisor/bcc/blob/master/INSTALL.md#ubuntu---source
$ git clone https://github.com/iovisor/bcc.git
$ mkdir bcc/build; cd bcc/build
$ cmake ..
...
Latest recognized Git tag is v0.23.0 -- Git HEAD is 3e8eb8b62f6e92aef332b2eab48305220705dfae
-- Revision is 0.23.0-3e8eb8b6
-- Found LLVM: /usr/lib/llvm-10/include 10.0.0 (Use LLVM_ROOT envronment variable for another version of LLVM)
-- Could NOT find LibDebuginfod (missing: LIBDEBUGINFOD_LIBRARIES LIBDEBUGINFOD_INCLUDE_DIRS)
CMake Error at CMakeLists.txt:110 (message):
Unable to find clang libraries
-- Configuring incomplete, errors occurred!
But, it was solved by setting LLVM_ROOT=/usr/lib/llvm-7
environment variable:
$ export LLVM_ROOT=/usr/lib/llvm-7
$ cmake ..
...
-- The C compiler identification is GNU 9.3.0
-- The CXX compiler identification is GNU 9.3.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Latest recognized Git tag is v0.23.0
-- Git HEAD is 3e8eb8b62f6e92aef332b2eab48305220705dfae
-- Revision is 0.23.0-3e8eb8b6
-- Performing Test HAVE_NO_PIE_FLAG
-- Performing Test HAVE_NO_PIE_FLAG - Success
-- Performing Test HAVE_REALLOCARRAY_SUPPORT
-- Performing Test HAVE_REALLOCARRAY_SUPPORT - Success
-- Found LLVM: /usr/lib/llvm-7/include 7.0.1 (Use LLVM_ROOT envronment variable for another version of LLVM)
-- Found BISON: /usr/bin/bison (found version "3.5.1")
-- Found FLEX: /usr/bin/flex (found version "2.6.4")
-- Found LibElf: /usr/lib/x86_64-linux-gnu/libelf.so
-- Performing Test ELF_GETSHDRSTRNDX
-- Performing Test ELF_GETSHDRSTRNDX - Success
-- Could NOT find LibDebuginfod (missing: LIBDEBUGINFOD_LIBRARIES LIBDEBUGINFOD_INCLUDE_DIRS)
-- Using static-libstdc++
-- Could NOT find LuaJIT (missing: LUAJIT_LIBRARIES LUAJIT_INCLUDE_DIR)
CMake Warning at tests/python/CMakeLists.txt:6 (message):
Recommended test program 'arping' not found
CMake Warning at tests/python/CMakeLists.txt:10 (message):
Recommended test program 'netperf' not found
CMake Warning at tests/python/CMakeLists.txt:16 (message):
Recommended test program 'iperf' or 'iperf3' not found
-- Configuring done
-- Generating done
-- Build files have been written to: /path/to/bcc/build
I solved the problem by following the instruction from https://github.com/iovisor/bcc/blob/master/INSTALL.md#ubuntu---source
╰─➤ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 20.04.3 LTS
Release: 20.04
Codename: focal
╰─➤ sudo apt install -y bison build-essential cmake flex git libedit-dev \
libllvm7 llvm-7-dev libclang-7-dev python zlib1g-dev libelf-dev libfl-dev python3-distutils
╰─➤ rm build -rf
╰─➤ cmake -H. -Bbuild
CMake Deprecation Warning at CMakeLists.txt:3 (cmake_minimum_required):
Compatibility with CMake < 2.8.12 will be removed from a future version of
CMake.
Update the VERSION argument <min> value or use a ...<max> suffix to tell
CMake that the project does not need compatibility with older versions.
-- The C compiler identification is GNU 9.3.0
-- The CXX compiler identification is GNU 9.3.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Latest recognized Git tag is v0.23.0
-- Git HEAD is 67f59ee80fcf5deedaacba1436d9fa09d32a16a0
-- Revision is 0.23.0-67f59ee8
-- Performing Test HAVE_NO_PIE_FLAG
-- Performing Test HAVE_NO_PIE_FLAG - Success
-- Performing Test HAVE_REALLOCARRAY_SUPPORT
-- Performing Test HAVE_REALLOCARRAY_SUPPORT - Success
-- Found LLVM: /usr/lib/llvm-7/include 7.0.1
-- Found BISON: /usr/bin/bison (found version "3.5.1")
-- Found FLEX: /usr/bin/flex (found version "2.6.4")
-- Found LibElf: /usr/lib/x86_64-linux-gnu/libelf.so
-- Performing Test ELF_GETSHDRSTRNDX
-- Performing Test ELF_GETSHDRSTRNDX - Success
-- Could NOT find LibDebuginfod (missing: LIBDEBUGINFOD_LIBRARIES LIBDEBUGINFOD_INCLUDE_DIRS)
-- Using static-libstdc++
-- Could NOT find LuaJIT (missing: LUAJIT_LIBRARIES LUAJIT_INCLUDE_DIR)
CMake Warning at tests/python/CMakeLists.txt:6 (message):
Recommended test program 'arping' not found
CMake Warning at tests/python/CMakeLists.txt:10 (message):
Recommended test program 'netperf' not found
CMake Warning at tests/python/CMakeLists.txt:16 (message):
Recommended test program 'iperf' or 'iperf3' not found
-- Configuring done
-- Generating done
-- Build files have been written to: /usr/local/sbin/bcc/build
This still seems to be an issue on Amazon Linux 2
Linux i-093422905e6444ae2 5.10.68-62.173.amzn2.x86_64 #1 SMP Fri Sep 24 18:24:14 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
cmake3 .. -- Latest recognized Git tag is v0.24.0 -- Git HEAD is 2df19cd16ff69429faa8b7b86d6630ba35907734 -- Revision is 0.24.0-2df19cd1 -- Found LLVM: (Use LLVM_ROOT envronment variable for another version of LLVM) -- Could NOT find LibDebuginfod (missing: LIBDEBUGINFOD_LIBRARIES LIBDEBUGINFOD_INCLUDE_DIRS) CMake Error at CMakeLists.txt:130 (message): Unable to find clang libraries
-- Configuring incomplete, errors occurred! See also "/mnt/bpf_source/bcc/build/CMakeFiles/CMakeOutput.log".
I followed Amazon 2 instructions at
https://github.com/iovisor/bcc/blob/master/INSTALL.md#amazon-linux---source
I needed to define LLVM_DIR=/usr/share/llvm/cmake/ to get this far
Have installed all the elfutils packages, llvm7 and llvm11 to no avail.
Setting LLVM_ROOT does not seem to help
On Amazon linux 2 llvm is installed in /usr/lib64 but clang is in /usr/lib
Checkout to a stable commit or tag like:
git checkout v0.24.0
I fix this issue by using different llvm version at cmake.
cmake .. -DCMAKE_PREFIX_PATH=/usr/lib/llvm-12
solved by : sudo apt-get install libclang-10-dev
Need to install the clang dev package.
LibDebuginfod is not required for the BCC core functionalities.
Just ignore the warning, or if you need it, install it.
I have both llvm10 and llvm12 on Ubuntu 20.04. Uninstall llvm10 solve the problem.
sudo apt remove llvm-10-dev
sudo apt remove libllvm10
dnf install -y elfutils-devel
This proposal works! Thank you!