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

Error: unknown argument: '-fcf-protection' #4878

Open Morpheus039 opened 8 months ago

Morpheus039 commented 8 months ago

I installed bcc on my Ubuntu 18.04 server, and I tried to test if bcc has been successfully installed with bcc tools, I run './tcptop.py' but get ModuleNotFoundError: No module named bcc then I changed to 'python3 ./tcptop.py' and got 2 lines error: error:unknown argument: '-fcf-protection' LLVM ERROR: What's wrong with this?

iridium-soda commented 8 months ago

The same issue was encountered while running official_hello_fields.py or any other progs that run smoothly on other machines. It may be due to the kernel version being too old.

Sys info for my machines that encountered issues:

OS: Ubuntu 18.04.6 LTS x86 
Kernel: 4.15.0-213-generic 

On this machine most progs run successfully:

OS: Ubuntu 20.04 LTS x86 

I hope it might help u.

yonghong-song commented 8 months ago

The failure in ubuntu 18.04 is due to old compiler. The flag "-fcf-protection" likely unsupported by the compiler on 18.04. Ubuntu 18.04 has been depreciated, please use a newer ubuntu version.