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

no matching member function for call to 'replace' #4969

Open
linjianshu opened this issue Apr 23, 2024 · 0 comments
Open

no matching member function for call to 'replace' #4969

linjianshu opened this issue Apr 23, 2024 · 0 comments

Comments

@linjianshu
Copy link

hello, i meet a error when i try to install bcc, the llvm version is 10.0.1 and the clang version is 10.0.1 ,the error msg is below:

make[2]: *** [src/cc/CMakeFiles/bcc-loader-static.dir/common.cc.o] Error 1
make[2]: *** [src/cc/CMakeFiles/bpf-static.dir/common.cc.o] Error 1
make[1]: *** [src/cc/CMakeFiles/bcc-loader-static.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
make[1]: *** [src/cc/CMakeFiles/bpf-static.dir/all] Error 2
/var/mllb/bcc-master/src/cc/common.cc:178:18: error: no matching member function for call to 'replace'
field_name.replace(pos1 + 1, pos2 - pos1 - 1, dim, 0);
~~~~~~~~~~~^~~~~~~
/opt/rh/devtoolset-7/root/usr/lib/gcc/x86_64-redhat-linux/7/../../../../include/c++/7/bits/basic_string.h:4730:7: note: candidate function not viable: no known conversion from 'std::basic_string' to 'const char ' for 3rd argument
replace(size_type __pos, size_type __n1, const _CharT
__s,
^

how should i fix this problem? appreciate it very much!!!

env below:
[root@gzinf-computer-55e235e17e30 build]# clang --version
clang version 10.0.1
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /usr/local/bin
[root@gzinf-computer-55e235e17e30 build]# llvm-config --version
10.0.1

[root@gzinf-computer-55e235e17e30 build]# echo $PATH
/usr/local/bin:/usr/local/bin:/opt/rh/devtoolset-7/root/usr/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant