Local compilation guide for Milvus on arch/manjaro linux #32467
douglarek
started this conversation in
Show and tell
Replies: 1 comment
-
wow that's nice. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Note: This is not a request for help post, but rather a sharing of compilation instructions.
Preparation
This compilation tutorial is intended for compiling on the unofficially recommended Linux distributions Arch/Manjaro, excluding Docker. Theoretically, other distributions should also work. Please note that this tutorial is specifically for version v2.4.0.
First, this tutorial will encounter several issues:
This compilation tutorial assumes you understand how to configure Go and use the distribution.
Getting Started
Installing Necessary Software
Installation on Arch is relatively simple; the required software is available in the official repositories. Just install them directly:
Installing Conan may vary; you may need to use pipx:
Setting up gcc
This step involves setting up the previously installed gcc12. As of the date of this tutorial (2024-04-19), the default gcc version in Arch is gcc13. So, you need to change the default gcc version to gcc12:
It's straightforward and won't delete your defaults. It just prioritizes gcc12 under /usr/local. If you don't need it later, just delete this soft link.
Setting up cmake
It seems that the default gcc12 setting mentioned above doesn't work for cmake. Therefore, before building, you can set an environment variable to force cmake to use your gcc12:
Compilation
Now we can proceed with source code compilation. Execute
make
in the source code root directory:Depending on your machine configuration, if everything goes smoothly, it should take less than half an hour for a 16-core 32-thread AMD 3950x.
gcc
When compiling with gcc12, you might encounter a missing import of
cstdint
, which is easy to fix:protoc
If your system is relatively new and you're not using a distribution-installed protoc, you'll likely encounter issues with protoc code generation. It's also easy to fix. Either temporarily remove protoc from your PATH or modify scripts/generate_proto.sh:
Assuming you know how to make these modifications. I haven't made any modifications here.
With this, there should be no major issues. Just wait for the compilation to finish.
Beta Was this translation helpful? Give feedback.
All reactions