Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build fails on Debian/sid #21

Closed
norbusan opened this issue Jul 18, 2020 · 3 comments
Closed

Build fails on Debian/sid #21

norbusan opened this issue Jul 18, 2020 · 3 comments
Labels
BPF related to BPF/eBPF Build related to building procmon Distro a request to support a specific distro of Linux

Comments

@norbusan
Copy link

The build breaks completely, possibly due to some bcc incompatibilities.

First step

mkdir build
cd build
cmake ..
make

ended with errors

ProcMon-for-Linux/src/configuration/../tracer/ebpf/ebpf_tracer_engine.h:6:10: fatal error: bcc/BPF.h: No such file or directory
    6 | #include <bcc/BPF.h>
      |          ^~~~~~~~~~~

Then I install libbpfcc-dev which provides this file. Now compilation fails at the loading stae:

[ 96%] Linking CXX executable procmon
/usr/bin/ld: /usr/bin/ld: DWARF error: could not find variable specification at offset 999e
/usr/bin/ld: DWARF error: could not find variable specification at offset 9a1a
.... many of these DWARF errors ...
src/tracer/libtracer-static.a(ebpf_tracer_engine.cpp.o): in function `ebpf::BPF::BPF(unsigned int, ebpf::TableStorage*, bool, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool)':
/usr/include/bcc/BPF.h:56: undefined reference to `ebpf::BPFModule::BPFModule(unsigned int, ebpf::TableStorage*, bool, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool, char const*)'
collect2: error: ld returned 1 exit status

Furthermore, the provided .deb file does not work due to missing and unavailable libraries (panel and ncurses.so.5).

@norbusan
Copy link
Author

Switching the bcc git tag to 0.14:

--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -22,7 +22,7 @@ include(FetchContent)
 FetchContent_Declare(
   bcc
   GIT_REPOSITORY https://github.com/iovisor/bcc.git
-  GIT_TAG        v0.10.0
+  GIT_TAG        v0.14.0
 )
 
 FetchContent_GetProperties(bcc)

allows the build to finish, but core dumps:

(gdb) 
#0  __GI___libc_free (mem=0x560f00000000) at malloc.c:3102
#1  0x0000560f3cd6ec1e in ebpf::StatusTuple::~StatusTuple (this=0x7fffe8905e50, __in_chrg=<optimized out>)
    at /usr/include/bcc/bcc_exception.h:24
#2  0x0000560f3cd6b61f in EbpfTracerEngine::EbpfTracerEngine (this=0x560f40300110, storageEngine=..., targetEvents=...)
    at /home/norbert/Development/procmon/ProcMon-for-Linux/src/tracer/ebpf/ebpf_tracer_engine.cpp:50
#3  0x0000560f3cd3e004 in ProcmonConfiguration::ProcmonConfiguration (this=0x560f402fba90, argc=1, argv=0x7fffe8906d58)
    at /home/norbert/Development/procmon/ProcMon-for-Linux/src/configuration/procmon_configuration.cpp:180
#4  0x0000560f3cd3b905 in __gnu_cxx::new_allocator<ProcmonConfiguration>::construct<ProcmonConfiguration, int&, char**&> (
    this=0x7fffe89067ef, __p=0x560f402fba90) at /usr/include/c++/9/ext/new_allocator.h:147
#5  0x0000560f3cd3b7da in std::allocator_traits<std::allocator<ProcmonConfiguration> >::construct<ProcmonConfiguration, int&, char**&>
    (__a=..., __p=0x560f402fba90) at /usr/include/c++/9/bits/alloc_traits.h:484
#6  0x0000560f3cd3b612 in std::_Sp_counted_ptr_inplace<ProcmonConfiguration, std::allocator<ProcmonConfiguration>, (__gnu_cxx::_Lock_policy)2>::_Sp_counted_ptr_inplace<int&, char**&> (this=0x560f402fba80, __a=...) at /usr/include/c++/9/bits/shared_ptr_base.h:548
#7  0x0000560f3cd3b303 in std::__shared_count<(__gnu_cxx::_Lock_policy)2>::__shared_count<ProcmonConfiguration, std::allocator<ProcmonConfiguration>, int&, char**&> (this=0x7fffe8906b88, __p=@0x7fffe8906b80: 0x0, __a=...) at /usr/include/c++/9/bits/shared_ptr_base.h:679
#8  0x0000560f3cd3b01e in std::__shared_ptr<ProcmonConfiguration, (__gnu_cxx::_Lock_policy)2>::__shared_ptr<std::allocator<ProcmonConfiguration>, int&, char**&> (this=0x7fffe8906b80, __tag=...) at /usr/include/c++/9/bits/shared_ptr_base.h:1344
#9  0x0000560f3cd3aaef in std::shared_ptr<ProcmonConfiguration>::shared_ptr<std::allocator<ProcmonConfiguration>, int&, char**&> (
    this=0x7fffe8906b80, __tag=...) at /usr/include/c++/9/bits/shared_ptr.h:359
#10 0x0000560f3cd3a76f in std::allocate_shared<ProcmonConfiguration, std::allocator<ProcmonConfiguration>, int&, char**&> (__a=...)
    at /usr/include/c++/9/bits/shared_ptr.h:702
#11 0x0000560f3cd3a091 in std::make_shared<ProcmonConfiguration, int&, char**&> () at /usr/include/c++/9/bits/shared_ptr.h:718
#12 0x0000560f3cd388ff in main (argc=1, argv=0x7fffe8906d58) at /home/norbert/Development/procmon/ProcMon-for-Linux/src/procmon.cpp:38

@jahabibi jahabibi added BPF related to BPF/eBPF Build related to building procmon Distro a request to support a specific distro of Linux labels Jul 21, 2020
@daniil-loban
Copy link

The build breaks completely, possibly due to some bcc incompatibilities.

First step

mkdir build
cd build
cmake ..
make

ended with errors

ProcMon-for-Linux/src/configuration/../tracer/ebpf/ebpf_tracer_engine.h:6:10: fatal error: bcc/BPF.h: No such file or directory
    6 | #include <bcc/BPF.h>
      |          ^~~~~~~~~~~

Then I install libbpfcc-dev which provides this file. Now compilation fails at the loading stae:

[ 96%] Linking CXX executable procmon
/usr/bin/ld: /usr/bin/ld: DWARF error: could not find variable specification at offset 999e
/usr/bin/ld: DWARF error: could not find variable specification at offset 9a1a
.... many of these DWARF errors ...
src/tracer/libtracer-static.a(ebpf_tracer_engine.cpp.o): in function `ebpf::BPF::BPF(unsigned int, ebpf::TableStorage*, bool, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool)':
/usr/include/bcc/BPF.h:56: undefined reference to `ebpf::BPFModule::BPFModule(unsigned int, ebpf::TableStorage*, bool, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool, char const*)'
collect2: error: ld returned 1 exit status

Furthermore, the provided .deb file does not work due to missing and unavailable libraries (panel and ncurses.so.5).

I have the same problem

@MarioHewardt
Copy link
Collaborator

Duplicate of #70

@MarioHewardt MarioHewardt marked this as a duplicate of #70 Jun 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BPF related to BPF/eBPF Build related to building procmon Distro a request to support a specific distro of Linux
Projects
None yet
Development

No branches or pull requests

4 participants