joelagnel / adeb

A debian-based shell environment designed for Android and adb
Apache License 2.0
319 stars 100 forks source link

Got failed for building arm32 arch bcc #29

Open henryLdx opened 5 years ago

henryLdx commented 5 years ago

I have support adeb on my arm64 android device,i just run " adeb prepare --full",and then the adeb runs perfect on the arm64 android device.Adeb is so powerful for debugging. And then I want to support adeb on my arm32 platform,so i try to "adeb prepare --arch armel --build --bcc --kernelsrc /path/to/kernel-source/", but i got failed when build bcc,the the error message as follow: """ [ 90%] Building CXX object tests/cc/CMakeFiles/test_libbcc.dir/test_shared_table.cc.o In file included from /bcc-master/tests/cc/test_shared_table.cc:17: In file included from /bcc-master/src/cc/api/BPF.h:25: In file included from /bcc-master/src/cc/api/BPFTable.h:30: In file included from /bcc-master/src/cc/bcc_syms.h:24: /bcc-master/src/cc/libbpf/include/uapi/linux/bpf.h:3405:1: warning: struct has size 0 in C, size 1 in C++ [-Wextern-c-compat] struct bpf_raw_tracepoint_args { ^ 1 warning generated. [ 90%] Building CXX object tests/cc/CMakeFiles/test_libbcc.dir/test_usdt_args.cc.o /usr/bin/ld: ../../src/cc/frontends/clang/libclang_frontend.a(loader.cc.o): in function ebpf::ClangLoader::do_compile(std::unique_ptr<llvm::Module, std::default_delete<llvm::Module> >*, ebpf::TableStorage&, bool, std::vector<char const*, std::allocator<char const*> > const&, std::vector<char const*, std::allocator<char const*> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, ebpf::FuncSource&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&, bool, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::map<int, std::tuple<int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int, int, int, int>, std::less<int>, std::allocator<std::pair<int const, std::tuple<int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int, int, int, int> > > >&, std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > > > >&)': loader.cc:(.text+0x2688): undefined reference toatomic_fetch_sub_4' /usr/bin/ld: loader.cc:(.text+0x2cf4): undefined reference to __atomic_fetch_add_4' /usr/bin/ld: loader.cc:(.text+0x2d44): undefined reference toatomic_fetch_add_4' /usr/bin/ld: loader.cc:(.text+0x316c): undefined reference to __atomic_fetch_add_4' /usr/bin/ld: loader.cc:(.text+0x31bc): undefined reference to__atomic_fetch_add_4' /usr/bin/ld: loader.cc:(.text+0x3618): undefined reference to `__atomic_fetch_add_4' """ And then i tried to build arm64 bcc by myself, runs "adeb prepare --arch arm64 --build --bcc --kernelsrc /path/to/kernel-source/" on the arm64 device, and the bcc built successful and the adeb works well. So, i guess the bcc maybe not support arm architecture. Ask for your help that the adeb support arm architeture,and i could get adeb for arm32 device by running "adeb prepare --full --arch armel". Waiting for your good news

bitw1ze commented 5 years ago

I am having the same issue. It seems arm32 is not supported.

Are there plans to add arm32 support? Or is there a workaround?

joelagnel commented 5 years ago

There is no plan for arm32. But patches are welcome.

On Wed, Oct 2, 2019, 4:57 PM Gabe Pike notifications@github.com wrote:

I am having the same issue. It seems arm32 is not supported.

Are there plans to add arm32 support? Or is there a workaround?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/joelagnel/adeb/issues/29?email_source=notifications&email_token=AAAJEVF7REZJLUY2B4SGZ5DQMUDMDA5CNFSM4H3OFHPKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEAGE5WY#issuecomment-537677531, or mute the thread https://github.com/notifications/unsubscribe-auth/AAAJEVDMWADF42455OYAESTQMUDMDANCNFSM4H3OFHPA .

gorhamc commented 3 years ago

Any chance there is now support for arm32? I've had no luck getting it to run...