Dependency Conflict During Milvus Compilation
Symptom
A compilation error is reported, indicating that the dependency version conflicts during dependency installation.
1 2 3 | ERROR: Conflict in opentelemetry-cpp/1.8.1.1@milvus/dev: 'opentelemetry-cpp/1.8.1.1@milvus/dev' requires 'thrift/0.17.0' while 'arrow/15.0.0' requires 'thrift/0.20.0'. To fix this conflict you need to override the package 'thrift' in your root package. |
Key Process and Cause Analysis
Two components depend on different thrift versions. You can forcibly specify a version that can be used by both of the two components.
Conclusion and Solution
Find the ~/milvus/internal/core/conanfile.py file in the compilation path, add the dependencies having conflicts to the configure function of a class inherited from ConanFile, and overwrite thrift they use.
1 2 3 4 5 6 7 8 9 10 11 12 | from conans import ConanFile class MilvusConan(ConanFile): def configure(self): if self.settings.arch not in ("x86_64", "x86"): del self.options["folly"].use_sse4_2 if self.settings.os == "Macos": # By default abseil use static link but can not be compatible with macos X86 self.options["abseil"].shared = True self.options["arrow"].with_jemalloc = False # Forcibly use the thrift of a specific version. self.requires("thrift/0.20.0", override=True) |
Parent topic: Troubleshooting