iovisor / iovisor/bcc

Linker Error when building from Src fedora 6.1.13-200.fc37.x86_64

Open
#4,529 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
C
Stars
22.7k
Forks
4.1k
Avg merge
10d 4h
Merged PRs (30d)
3

Description

Hello,

I have an application written in Cpp and wants to interface it with eBPF. I wanted to successfully run some cpp examples. But I have some trouble with building and it is giving me some linker errors. I followed the instructions and installed all deps specified in [here](https://github.com/iovisor/bcc/blob/master/INSTALL.md#source). When I run `make` I got this problem

```
$make
[ 37%] Built target clang_frontend-objects
[ 37%] Built target clang_frontend
[ 37%] Built target bpf-static
[ 37%] Built target api-static
[ 37%] Built target usdt-static
[ 37%] Built target bcc-shared
[ 37%] Built target bcc-loader-static
[ 37%] Built target api-objects
[ 37%] Built target bcc-static
[ 37%] Built target bpf-shared
[ 37%] Built target bcc_py_python3
[ 37%] Built target bcc-lua
[ 37%] Built target bps
[ 37%] Linking CXX executable CGroupTest
/usr/bin/ld: CMakeFiles/CGroupTest.dir/CGroupTest.cc.o: in function `main':
CGroupTest.cc:(.text.startup+0xb4): undefined reference to `ebpf::BPFModule::BPFModule(unsigned int, ebpf::TableStorage*, bool, std::__cxx11::basic_string, std::allocator > const&, bool)'
collect2: error: ld returned 1 exit status
make[2]: *** [examples/cpp/CMakeFiles/CGroupTest.dir/build.make:165: examples/cpp/CGroupTest] Error 1
make[1]: *** [CMakeFiles/Makefile2:1102: examples/cpp/CMakeFiles/CGroupTest.dir/all] Error 2
make: *** [Makefile:146: all] Error 2
```
Would anyone have any guidance and solutions on how to resolve the linker errors? Thanks so much in advance

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.