Closed changchengx closed 6 years ago
The deletion of patches has to accompanied by a change to bashrc too.
Upstream uses BCC_LINUX_VERSION_CODE
.
Also I will have to update prebuilt BCC in the releases or the changes will break the release. I'll clean this up this week.
Agreed on the china mirror patch. I will merge just that patch for now while we're discussing the other changes.
"WA link issue" means "workaround link issue". I enabled your code base on x86 Android platform. There're some "ldd link issues", such as "/usr/bin/ld: cannot find -lstdc++". The reason is that ldd can't find the right library. I have to manually set LIBRARY_PATH environment variable to tell ldd where to find the required library.
I generally don't like WA (workarounds) unless there's other options:
About this patch:
x86 kernel header: set CPATH env for x86 device, I stl
Currently for building BCC on x86, there is no need for specifying CPATH. The x86 instructions are here: https://github.com/iovisor/bcc/blob/master/INSTALL.md
There could be some limitation in adeb filesystem, but since arm64 bcc builds work, I doubt that. I will try an x86 target soon and let you know. Thanks!
So I fixed 1/5 and merged 5/5. For 3/5 4/5 and 5/5, I want to spend more time fixing it properly.
Does running gcc on a C++ program work for you? Are the errors only with building BCC?
@joelagnel Currently, it doesn't need any WA patches. I think it maybe related with gcc update. However, I could confirm there're some "library link issue" and "include head file" issues 2 weeks ago.
The default header file path for clang-6.0 is: #######################Check Clang cpp header path###################### jerry@jerry:~/work/adeb_ver/adeb$ adeb shell "echo 'int main(void){}' | clang-6.0 -xc++ -E -v - 2>&1" | sed -ne '/starts here/,/End of search list/p'
. /kernel-headers/include /kernel-headers/arch/x86/include/generated /kernel-headers/arch/x86/include/generated/uapi /usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8 /usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/x86_64-linux-gnu/c++/8 /usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/backward /usr/include/clang/6.0.1/include /usr/local/include /usr/bin/../lib/gcc/x86_64-linux-gnu/8/include /usr/include/x86_64-linux-gnu /usr/include End of search list. ########################Check end##############################
For your question-A "Does running gcc on a C++ program work for you? " and B "Are the errors only with building BCC?"
A: It works on building C++ program on android target device.
root@localhost:/# echo -e "#include
1
B: Today, there's no problem when building BCC and running BCC tools on target x86 android device.
I observed that gcc is updated to 8.0. However, gcc was 7.0 two weeks ago when creating the root file system.
bcc commit bfecc24 has been merged. There's no need to maintain seperate patches
Signed-off-by: Liu Changcheng changcheng.liu@aliyun.com