[BUG]LLVM error “option … registered more than once” while start the polycubed
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:
- OS details: other linux distributions(openeuler)
- Kernel details: 4.19
- Polycube Version: 0.9.0
- 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
@sebymiano Did you experienced anything about this? @l30006821 Would it possible to propose a patch? Thanks!
OK, I will
@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.