iovisor / bcc

BCC - Tools for BPF-based Linux IO analysis, networking, monitoring, and more
Apache License 2.0
20.36k stars 3.86k forks source link

Build fail from source #4982

Open Kitebin-h opened 5 months ago

Kitebin-h commented 5 months ago

My server is 2CPU/2Core, and Linux version is: Ubuntu Jammy (22.04) I install dependencies follow link https://github.com/iovisor/bcc/blob/master/INSTALL.md#ubuntu---binary

sudo apt install -y zip bison build-essential cmake flex git libedit-dev \
  libllvm14 llvm-14-dev libclang-14-dev python3 zlib1g-dev libelf-dev libfl-dev python3-setuptools \
  liblzma-dev libdebuginfod-dev arping netperf iperf

Git clone bcc repo and compile BCC:

git clone https://github.com/iovisor/bcc.git
mkdir bcc/build; cd bcc/build
cmake ..
make

when I execute make, my server CPU occupation rate has soared。Build stopped and the server does not respond. The phote cut is below:

image

What can I do to solve this problem and build bcc from source?

Kitebin-h commented 5 months ago

I executes build commands

 make -j$(nproc) --debug

The debug info is

image

image

chenhengqi commented 5 months ago

Try build with just make not make -j, and maybe enable swap.

Kitebin-h commented 5 months ago

Oh, I also try make, it doesn't work.

chenhengqi commented 5 months ago

What's the output of dmesg? Does it show any clue that there is an OOM ?