bcc icon indicating copy to clipboard operation
bcc copied to clipboard

Could NOT find LibDebuginfod

Open nobody4t opened this issue 3 years ago • 22 comments

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.

nobody4t avatar Sep 03 '21 01:09 nobody4t

sudo apt install libdebuginfod-dev

chenhengqi avatar Sep 03 '21 01:09 chenhengqi

I guess this lib is not important. But when I try to build without this lib. I got so many warnings.

nobody4t avatar Sep 03 '21 01:09 nobody4t

sudo apt install libdebuginfod-dev

This does not work.

nobody4t avatar Sep 03 '21 01:09 nobody4t

yum list *libdebuginfod* can not find it as well. Did your guys find the repo for this lib?

APIPLM avatar Sep 03 '21 06:09 APIPLM

@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.

nobody4t avatar Sep 03 '21 07:09 nobody4t

@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 .

APIPLM avatar Sep 03 '21 09:09 APIPLM

https://github.com/iovisor/bcc/pull/3393

Maybe you need elfutils installed.

chenhengqi avatar Sep 03 '21 09:09 chenhengqi

In this pull request, for bpftrace , there is an integration to debuginfod.

APIPLM avatar Sep 03 '21 11:09 APIPLM

None of the proposals works.

nobody4t avatar Sep 03 '21 23:09 nobody4t

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.

APIPLM avatar Sep 04 '21 06:09 APIPLM

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.

russoue avatar Oct 14 '21 22:10 russoue

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.

APIPLM avatar Oct 16 '21 01:10 APIPLM

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

lelexy avatar Oct 21 '21 03:10 lelexy

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.

guedou avatar Nov 04 '21 19:11 guedou

Same here on Ubuntu 20.04.2 focal LTS

Could NOT find LibDebuginfod (missing: LIBDEBUGINFOD_LIBRARIES LIBDEBUGINFOD_INCLUDE_DIRS)

huornlmj avatar Nov 11 '21 17:11 huornlmj

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

Rtoax avatar Nov 27 '21 08:11 Rtoax

same problem on ubuntu 18.04, could not find libdebuginfod-dev

jezhang2014 avatar Dec 25 '21 12:12 jezhang2014

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

sile avatar Dec 28 '21 00:12 sile

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

tenheadedlion avatar Jan 06 '22 07:01 tenheadedlion

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

DenisSheahan avatar May 11 '22 00:05 DenisSheahan

Checkout to a stable commit or tag like:

git checkout v0.24.0

mertyildiran avatar May 21 '22 11:05 mertyildiran

I fix this issue by using different llvm version at cmake.

cmake .. -DCMAKE_PREFIX_PATH=/usr/lib/llvm-12

ahn9807 avatar Jul 01 '22 10:07 ahn9807

solved by : sudo apt-get install libclang-10-dev

Need to install the clang dev package.

ZhangHuiGui avatar Sep 20 '22 06:09 ZhangHuiGui

LibDebuginfod is not required for the BCC core functionalities.

Just ignore the warning, or if you need it, install it.

chenhengqi avatar Sep 20 '22 09:09 chenhengqi

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

aakejiang avatar Dec 01 '23 09:12 aakejiang

dnf install -y elfutils-devel

This proposal works! Thank you!

fredfany avatar Mar 05 '24 01:03 fredfany