kvcache-ai / Mooncake

Mooncake is the serving platform for Kimi, a leading LLM service provided by Moonshot AI.
https://arxiv.org/abs/2407.00079
Apache License 2.0
1.98k stars 101 forks source link

Source code compile and build #10

Open junna2016 opened 1 day ago

junna2016 commented 1 day ago

When I compile from source code, it will meet an error when compile grpc process(grpc is on v1.27.3 branch). I done this in a nvcr.io/nvidia/pytorch:23.10-py3 docker environment, error is:

Mooncake/grpc/third_party/abseil-cpp/absl/synchronization/internal/graphcycles.cc: In member function ‘void absl::synchronization_internal::GraphCycles::RemoveNode(void*)’: Mooncake/grpc/third_party/abseil-cpp/absl/synchronization/internal/graphcycles.cc:451:26: error: ‘numeric_limits’ is not a member of ‘std’ 451 | if (x->version == std::numeric_limits::max()) { | ^~~~~~ Mooncake/grpc/third_party/abseil-cpp/absl/synchronization/internal/graphcycles.cc:451:49: error: expected primary-expression before ‘>’ token 451 | if (x->version == std::numeric_limits::max()) { | ^ Mooncake/grpc/third_party/abseil-cpp/absl/synchronization/internal/graphcycles.cc:451:52: error: ‘::max’ has not been declared; did you mean ‘std::max’? 451 | if (x->version == std::numeric_limits::max()) { | ^~~ | std::max

alogfans commented 1 day ago

You may need to use export CXXFLAGS='-include /usr/include/c++/11.2.0/limits' for your Docker env (c.f. https://github.com/gpujs/gpu.js/issues/753). In addition, we prefer to use grpc from system's repository (such as apt-get install).