iovisor / iovisor/bcc

compile bcc error

Open
#4,568 0 comments 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

when i compile bcc in centos 7.5.1804 and kernel version is 5.4.238-1.el7.elrepo.x86_64, it print error like this:
`/data0/src/bpf/bcc/src/cc/common.cc: In function ‘ebpf::field_kind_t ebpf::_get_field_kind(const string&, std::string&, std::string&, int*)’:
/data0/src/bpf/bcc/src/cc/common.cc:178:59: error: no matching function for call to ‘std::basic_string::replace(long unsigned int, long unsigned int, std::basic_string&, int)’
field_name.replace(pos1 + 1, pos2 - pos1 - 1, dim, 0);
^
In file included from /opt/rh/devtoolset-7/root/usr/include/c++/7/string:52:0,
from /opt/rh/devtoolset-7/root/usr/include/c++/7/bits/locale_classes.h:40,
from /opt/rh/devtoolset-7/root/usr/include/c++/7/bits/ios_base.h:41,
from /opt/rh/devtoolset-7/root/usr/include/c++/7/ios:42,
from /opt/rh/devtoolset-7/root/usr/include/c++/7/istream:38,
from /opt/rh/devtoolset-7/root/usr/include/c++/7/fstrea`

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the BCC compile on CentOS 7.5.1804 with kernel 5.4.238-1.el7.elrepo.x86_64 and the shown devtoolset-7 environment. Inspect src/cc/common.cc around line 178 and determine the compatible std::string::replace usage; done means the project compiles successfully in the reported environment.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, linux
Domain
build-system, operating-systems, tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
32/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.