polycube icon indicating copy to clipboard operation
polycube copied to clipboard

[BUG]LLVM error “option … registered more than once” while start the polycubed

Open l30006821 opened this issue 5 years ago • 3 comments

Describe the bug

A clear and concise description of what the bug is. the polycubed can not active and report LLVM error “option … registered more than once” when i run the polycubed

To Reproduce

Steps to reproduce the behavior: build with cmake : cmake .. -DENABLE_PCN_IPTABLES=ON
-DENABLE_SERVICE_BRIDGE=OFF
-DENABLE_SERVICE_DDOSMITIGATOR=OFF
-DENABLE_SERVICE_FIREWALL=OFF
-DENABLE_SERVICE_HELLOWORLD=OFF
-DENABLE_SERVICE_IPTABLES=ON
-DENABLE_SERVICE_K8SFILTER=OFF
-DENABLE_SERVICE_K8SWITCH=OFF
-DENABLE_SERVICE_LBDSR=OFF
-DENABLE_SERVICE_LBRP=OFF
-DENABLE_SERVICE_NAT=OFF
-DENABLE_SERVICE_PBFORWARDER=OFF
-DENABLE_SERVICE_ROUTER=OFF
-DENABLE_SERVICE_SIMPLEBRIDGE=OFF
-DENABLE_SERVICE_SIMPLEFORWARDER=OFF
-DENABLE_SERVICE_TRANSPARENTHELLOWORLD=OFF
-DENABLE_SERVICE_SYNFLOOD=OFF
-DENABLE_SERVICE_PACKETCAPTURE=OFF

i run systemctl start polycubed where the build success

Expected behavior

polycubed active

Please tell us about your environment:

  1. OS details: other linux distributions(openeuler)
  2. Kernel details: 4.19
  3. Polycube Version: 0.9.0
  4. Polycube Log: Attach the log from /var/log/polycube/polycubed.log

Additional context

Add any other context about the problem here.

Bcc-static default USES ENABLE_LLVM_SHARED=OFF, which causes Polycubed to compile LLVM_liBS in the BCC into the executable at compile time.But Polycubed dynamically links clang, which links to LLVM's dynamic libraries, causing the problem.I recommend that add the option ENABLE_LLVM_SHARED to src/CMakelists.txt

l30006821 avatar Sep 21 '20 06:09 l30006821

@sebymiano Did you experienced anything about this? @l30006821 Would it possible to propose a patch? Thanks!

frisso avatar Sep 24 '20 05:09 frisso

OK, I will

l30006821 avatar Sep 24 '20 07:09 l30006821

@frisso Honestly, I have never had this kind of problem, but I haven't tested the latest versions of Polycube. I don't know if there have been some changes recently in Polycube/BCC that could cause this problem.

sebymiano avatar Sep 24 '20 14:09 sebymiano