On Sun, Dec 11, 2016 at 9:21 AM, Chaiken, Alison via iovisor-dev
<[email protected]> wrote:
> Ming Lei <[email protected]> inquires:
>
> Bcc can be installed on ubuntu 16.04/arm64 successfully, but when
> I try to trace, the folllowing failure[1] is triggered.
> So is bcc not ready for arm64? Or something is wrong?
Also for the prog building failure of 'LLVM ERROR: Inline asm', even though
it is workaround on x86, maybe one day some one changes kernel headers
under arch a bit and may cause the similar issue with arm64 too.
So is there one generic solution for the issue? Is it possible to
preprocess the source file first and replace asm() with noop
or bpf_trace_printk(WARN)? Or other solutions?
>
> [ . . . ]
>
> In file included from ./arch/arm64/include/asm/cputype.h:94:
> ./arch/arm64/include/asm/sysreg.h:260:43: warning: value size does not match
> register
>
>
> I thought that rather than using the Debian package, I would try to
> cross-compile bcc in a multistrap Debian container with Clang and LLVM
> packages of version 3.8 from Debian Unstable. The build gets about halfway
> through and then fails on linking of CPUDistribution. The details
> are preserved in the attachment, but here's the bottom line:
I don't use cross-compile on arm64, and just do it nativaly on Ubuntu 16.04.
>
> alison@bonnet:~/bcc/build$ make
> Scanning dependencies of target clang_frontend
> [ 1%] Building CXX object
> src/cc/frontends/clang/CMakeFiles/clang_frontend.dir/loader.cc.o
> [ 3%] Building CXX object
> src/cc/frontends/clang/CMakeFiles/clang_frontend.dir/b_frontend_action.cc.o
>
> [ . . . ]
>
> Linking CXX static library libbcc.a
> [ 52%] Built target bcc-static
> Scanning dependencies of target CPUDistribution
> [ 54%] Building CXX object
> examples/cpp/CMakeFiles/CPUDistribution.dir/CPUDistribution.cc.o
> Linking CXX executable CPUDistribution
> ../../src/cc/libbcc.a(bpf_module.cc.o): In function
> `ebpf::BPFModule::dump_ir(llvm::Module&)':
> bpf_module.cc:(.text+0x4600): undefined reference to
> `llvm::createPrintModulePass(llvm::raw_ostream&, std::string const&, bool)'
>
> plus several other related errors about missing symbols. Is this liable to
> be a version mismatch problem? I find that the file
> src/cc/CMakeFiles/bcc-shared.dir/build.make refers to libraries and archives
> in /usr/lib/llvm-3.8/lib/ which exist and are arm64-ABI, as expected.
I didn't see your issue, and with the workaound in the following link:
https://github.com/iovisor/bcc/issues/492
bcc can be built successfully on ubuntu 16.04 both arm64 and x86.
>
> Thanks for any suggestions. I guess I could try the package after all, but
> that doesn't sound promising, either. My eventual goal is run eBPF on a
> Dragonboard, which has too little memory to compile bcc-tools natively.
Per my experience, 1G should be enough for building anything almost on
arm64, even though on arm, but sometimes it can be caused by slow CPUs
or your storage.
--
Ming Lei
_______________________________________________
iovisor-dev mailing list
[email protected]
https://lists.iovisor.org/mailman/listinfo/iovisor-dev