mlc-llm icon indicating copy to clipboard operation
mlc-llm copied to clipboard

CMake Error

Open zp2459 opened this issue 2 years ago • 2 comments

I am new to TVM, and I encountered an error while compiling it according to the instructions. I cannot install it successfully. It seems that TVM or something else cannot be found. What could be the reason?

Here are the specific error messages: -- Set TVM_LLVM_VERSION=170 -- Build with contrib.random -- Build with contrib.sort -- Build with contrib.hybriddump -- Git found: /usr/bin/git -- Found TVM_GIT_COMMIT_HASH=838ec67e9376f5a606ce6c8bb0a9b773e5f63833 -- Found TVM_GIT_COMMIT_TIME=2023-05-03 16:37:51 -0400 -- Could NOT find LIBBACKTRACE (missing: LIBBACKTRACE_STATIC_LIBRARY LIBBACKTRACE_INCLUDE_DIR) -- Building libbacktrace from 3rdparty/libbacktrace -- Building with TVM Map... -- Build with thread support... -- Check if compiler accepts -pthread -- Check if compiler accepts -pthread - yes -- Added "-fuse-ld=lld" to linker flags -- Configuring done CMake Error: The following variables are used in this project, but they are set to NOTFOUND. Please set them or make sure they are set and tested correctly in the CMake files: FOUNDATION_LIB linked by target "tvm" in directory /home/panz/project/mlc-llm/relax linked by target "tvm_runtime" in directory /home/panz/project/mlc-llm/relax METAL_LIB linked by target "tvm" in directory /home/panz/project/mlc-llm/relax linked by target "tvm_runtime" in directory /home/panz/project/mlc-llm/relax

-- Generating done CMake Generate step failed. Build files cannot be regenerated correctly.

zp2459 avatar May 05 '23 01:05 zp2459

Hi @zp2459 , sorry we forgot to add --recursive in our instructions. Please re-clone the TVM repository via:

git clone https://github.com/mlc-ai/relax.git --recursive

and also this repository via:

git clone https://github.com/mlc-ai/mlc-llm.git --recursive

You can also update submodules inside the TVM repository in case you don't want to re-clone:

git submodule update --init --recursive

Either re-clone or submodules updates should work.

yzh119 avatar May 05 '23 05:05 yzh119

Thank you for your reply@yzh119,I have figured out the reason for my error, and it was not caused by incomplete download of the submodule. I was not running on a macOS system, so setting set(USE_METAL OFF) allowed me to compile successfully.

zp2459 avatar May 05 '23 06:05 zp2459

Closing as the issue seems resolved :-)

junrushao avatar May 08 '23 22:05 junrushao