mlc-ai / mlc-llm

Universal LLM Deployment Engine with ML Compilation
https://llm.mlc.ai/
Apache License 2.0
19.2k stars 1.58k forks source link

[Question] There are some error while run the command "python3 prepare_libs.py" #2640

Closed tombang closed 4 months ago

tombang commented 4 months ago

❓ General Questions

(venv_llama) tangben@tb:~/MLCNEW/mlc-llm/android/mlc4j$ python3 prepare_libs.py info: component 'rust-std' for target 'aarch64-linux-android' is up to date [2024-07-10 11:20:19] INFO prepare_libs.py:91: Entering "/home/tangben/MLCNEW/mlc-llm/android/mlc4j/build" for MLC LLM and tvm4j build. [2024-07-10 11:20:19] INFO prepare_libs.py:95: Set TVM_SOURCE_DIR to "/home/tangben/MLCNEW/mlc-llm/3rdparty/tvm" [2024-07-10 11:20:19] INFO prepare_libs.py:23: Running cmake -- The C compiler identification is Clang 18.0.1 -- The CXX compiler identification is Clang 18.0.1 -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working C compiler: /home/tangben/Android/Sdk/ndk/27.0.11902837-2/toolchains/llvm/prebuilt/linux-x86_64/bin/clang - skipped -- Detecting C compile features -- Detecting C compile features - done -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Check for working CXX compiler: /home/tangben/Android/Sdk/ndk/27.0.11902837-2/toolchains/llvm/prebuilt/linux-x86_64/bin/clang++ - skipped -- Detecting CXX compile features -- Detecting CXX compile features - done -- Hide private symbols -- TVM_SOURCE_DIR: /home/tangben/MLCNEW/mlc-llm/3rdparty/tvm -- Hide private symbols... -- Forbidding undefined symbols in shared library, using -Wl,--no-undefined on platform Android -- Building for Android -- Didn't find the path to CCACHE, disabling ccache -- Performing Test SUPPORT_CXX17 -- Performing Test SUPPORT_CXX17 - Success -- VTA build with VTA_HW_PATH=/home/tangben/MLCNEW/mlc-llm/3rdparty/tvm/3rdparty/vta-hw -- Build VTA runtime with target: sim -- Enabled runtime search for OpenCL library location -- Couldn't build OpenCL-Gtests -- Android Vulkan_INCLUDE_DIRS=/home/tangben/Android/Sdk/ndk/27.0.11902837-2/sources/third_party/vulkan/src/include -- Skip finding SPIRV in Android, make sure you only build tvm runtime. -- Build with contrib.random -- Build with contrib.sort -- Build with contrib.hybriddump -- Git found: /usr/bin/git -- Found TVM_GIT_COMMIT_HASH=f5f048bbd71513f087799f987019e3931f68a6d9 -- Found TVM_GIT_COMMIT_TIME=2024-06-03 09:18:53 -0400 -- Building with TVM Map... -- Build with thread support... -- Looking for pthread.h -- Looking for pthread.h - found -- Performing Test CMAKE_HAVE_LIBC_PTHREAD -- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed -- Check if compiler accepts -pthread -- Check if compiler accepts -pthread - yes -- Found Threads: TRUE
-- CLANG_VERSION 18.0 -- Setting enhanced clang warning flags -- Performing Test FILE_PREFIX_MAP_SUPPORTED -- Performing Test FILE_PREFIX_MAP_SUPPORTED - Success -- Added "-fuse-ld=lld" to linker flags -static-libstdc++ -Wl,--build-id=sha1 -Wl,--no-rosegment -Wl,--no-undefined-version -Wl,--fatal-warnings -Wl,--no-undefined -Qunused-arguments -- Build without FlashInfer -- system-nameAndroid -- Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE) -- VERSION: 0.2.00 CMake Warning at /home/tangben/MLCNEW/mlc-llm/CMakeLists.txt:107 (message): Cannot find libflash_attn. The model must not have been built with --use-flash-attn-mqa option.

-- TVM_SOURCE_DIR: /home/tangben/MLCNEW/mlc-llm/android/mlc4j/../../3rdparty/tvm -- Found Java: /usr/bin/java (found version "17.0.11") -- Could NOT find JNI (missing: JAVA_AWT_LIBRARY JAVA_JVM_LIBRARY JAVA_INCLUDE_PATH2 JAVA_AWT_INCLUDE_PATH) -- Try to find jni directly from android env -- JNI_INCLUDE_DIRS=/home/tangben/Android/Sdk/ndk/27.0.11902837-2/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include -- Configuring done -- Generating done -- Build files have been written to: /home/tangben/MLCNEW/mlc-llm/android/mlc4j/build [2024-07-10 11:20:19] INFO prepare_libs.py:55: Running cmake build [ 0%] Building Java objects for tvm4j_core.jar [ 0%] Building CXX object mlc_llm/tvm/CMakeFiles/tvm_libinfo_objs.dir/src/support/libinfo.cc.o [ 0%] Generating aarch64-linux-android/release/libtokenizers_c.a [ 0%] Building CXX object mlc_llm/tokenizers/CMakeFiles/tokenizer_cpp_objs.dir/src/sentencepiece_tokenizer.cc.o [ 0%] Building CXX object mlc_llm/tokenizers/CMakeFiles/tokenizer_cpp_objs.dir/src/huggingface_tokenizer.cc.o [ 0%] Building CXX object mlc_llm/tokenizers/CMakeFiles/tokenizer_cpp_objs.dir/src/rwkv_world_tokenizer.cc.o [ 0%] Building CXX object mlc_llm/CMakeFiles/mlc_llm_objs.dir/cpp/grammar/grammar.cc.o [ 0%] Building CXX object mlc_llm/tokenizers/sentencepiece/src/CMakeFiles/sentencepiece-static.dir/home/tangben/MLCNEW/mlc-llm/3rdparty/tokenizers-cpp/sentencepiece/third_party/protobuf-lite/arena.cc.o [ 6%] Building CXX object mlc_llm/tokenizers/sentencepiece/src/CMakeFiles/sentencepiece-static.dir/home/tangben/MLCNEW/mlc-llm/3rdparty/tokenizers-cpp/sentencepiece/third_party/protobuf-lite/arenastring.cc.o [ 6%] Building CXX object mlc_llm/CMakeFiles/mlc_llm_objs.dir/cpp/grammar/grammar_functor.cc.o [ 6%] Building CXX object mlc_llm/CMakeFiles/mlc_llm_objs.dir/cpp/grammar/grammar_parser.cc.o [ 6%] Building CXX object mlc_llm/tvm/CMakeFiles/tvm_runtime_objs.dir/src/runtime/builtin_fp16.cc.o [ 6%] Building CXX object mlc_llm/tvm/CMakeFiles/tvm_runtime_objs.dir/src/runtime/c_runtime_api.cc.o Compiling proc-macro2 v1.0.86 Compiling unicode-ident v1.0.12 [ 6%] Building CXX object mlc_llm/tvm/CMakeFiles/tvm_runtime_objs.dir/src/runtime/const_loader_module.cc.o
Compiling crossbeam-utils v0.8.20 Compiling fnv v1.0.7 Compiling ident_case v1.0.1 Compiling strsim v0.11.1 Compiling libc v0.2.155 Compiling serde v1.0.204 Compiling memchr v2.7.4 Compiling either v1.13.0 Compiling cfg-if v1.0.0 Compiling rayon-core v1.12.1 Compiling cc v1.1.0 Compiling pkg-config v0.3.30 [ 6%] Building CXX object mlc_llm/tokenizers/sentencepiece/src/CMakeFiles/sentencepiece-static.dir/home/tangben/MLCNEW/mlc-llm/3rdparty/tokenizers-cpp/sentencepiece/third_party/protobuf-lite/bytestream.cc.obuild.rs)
Compiling paste v1.0.15 Compiling esaxx-rs v0.1.10 Compiling serde_json v1.0.120 Compiling regex-syntax v0.8.4 Compiling minimal-lexical v0.2.1 Compiling thiserror v1.0.61 [ 6%] Building CXX object mlc_llm/CMakeFiles/mlc_llm_objs.dir/cpp/grammar/grammar_serializer.cc.oro2(build), pkg-config, libc(build.rs), crossbeam-utils, thiserror(build.rs), paste(build.rs), strsim, memchr, minimal-lexical
Compiling ppv-lite86 v0.2.17 [ 6%] Building CXX object mlc_llm/CMakeFiles/mlc_llm_objs.dir/cpp/grammar/grammar_state_matcher.cc.o, pkg-config, libc(build), crossbeam-utils, thiserror(build.rs), ppv-lite86, paste, memchr, minimal-lexical
Compiling itertools v0.11.0 Compiling aho-corasick v1.1.3 Compiling quote v1.0.36 Compiling nom v7.1.3 Compiling crossbeam-epoch v0.9.18 Compiling syn v2.0.70 Compiling getrandom v0.2.15 Compiling smallvec v1.13.2 Compiling macro_rules_attribute-proc_macro v0.2.0 Compiling bitflags v1.3.2 [ 6%] Building CXX object mlc_llm/tokenizers/sentencepiece/src/CMakeFiles/sentencepiece-static.dir/home/tangben/MLCNEW/mlc-llm/3rdparty/tokenizers-cpp/sentencepiece/third_party/protobuf-lite/coded_stream.cc.o
Compiling rand_core v0.6.4 [ 6%] Built target tvm_libinfo_objs ] 33/85: cc, regex-syntax, smallvec, aho-corasick, crossbeam-utils, getrandom, syn, itertools, rand_core, nom, crossbeam-epoch, macro_rules_attribute-proc_macro
[ 6%] Building CXX object mlc_llm/CMakeFiles/mlc_llm_objs.dir/cpp/grammar/json_schema_converter.cc.o Compiling crossbeam-deque v0.8.5 Compiling rand_chacha v0.3.1 Compiling once_cell v1.19.0 Note: Some input files use or override a deprecated API.gex-syntax, once_cell, aho-corasick, crossbeam-utils, syn, itertools, rayon-core, nom, crossbeam-epoch, macro_rules_attribute-proc_macro, rand_chacha
Note: Recompile with -Xlint:deprecation for details. Compiling base64 v0.13.1 Compiling unicode-segmentation v1.11.0 [ 12%] Generating CMakeFiles/tvm4j_core.dir/java_class_filelisttax, once_cell, aho-corasick, syn, itertools, unicode-segmentation, rayon-core, nom, crossbeam-epoch, base64, rand_chacha
[ 12%] Creating Java archive tvm4j_core.jar Compiling itoa v1.0.11 [ 12%] Building CXX object mlc_llm/CMakeFiles/mlc_llm_objs.dir/cpp/json_ffi/conv_template.cc.otertools, unicode-segmentation, rayon-core, nom, crossbeam-epoch, base64, rand_chacha
Compiling onig_sys v69.8.1 Compiling ryu v1.0.18 Compiling rand v0.8.5 [ 12%] Built target tokenizer_cpp_objs ] 43/85: onig_sys(build.rs), rand, regex-syntax, aho-corasick, syn, itertools, unicode-segmentation, rayon-core, nom, ryu, base64, rand_chacha
Compiling macro_rules_attribute v0.2.0 [ 12%] Building CXX object mlc_llm/tokenizers/sentencepiece/src/CMakeFiles/sentencepiece-static.dir/home/tangben/MLCNEW/mlc-llm/3rdparty/tokenizers-cpp/sentencepiece/third_party/protobuf-lite/common.cc.o
Compiling rayon v1.10.0 [ 12%] Building CXX object mlc_llm/tokenizers/sentencepiece/src/CMakeFiles/sentencepiece-static.dir/home/tangben/MLCNEW/mlc-llm/3rdparty/tokenizers-cpp/sentencepiece/third_party/protobuf-lite/extension_set.cc.o
Compiling regex-automata v0.4.7 [ 12%] Built target tvm4j_core ] 47/85: onig_sys(build), rand, regex-syntax, rayon, aho-corasick, syn, unicode-segmentation, rayon-core, nom, ryu, regex-automata, rand_chacha
Compiling unicode-normalization-alignments v0.1.12 [ 12%] Building CXX object mlc_llm/tokenizers/sentencepiece/src/CMakeFiles/sentencepiece-static.dir/home/tangben/MLCNEW/mlc-llm/3rdparty/tokenizers-cpp/sentencepiece/third_party/protobuf-lite/generated_enum_util.cc.o
Compiling itertools v0.12.1 [ 12%] Building CXX object mlc_llm/tokenizers/sentencepiece/src/CMakeFiles/sentencepiece-static.dir/home/tangben/MLCNEW/mlc-llm/3rdparty/tokenizers-cpp/sentencepiece/third_party/protobuf-lite/generated_message_table_driven_lite.cc.o
[ 12%] Building CXX object mlc_llm/tokenizers/sentencepiece/src/CMakeFiles/sentencepiece-static.dir/home/tangben/MLCNEW/mlc-llm/3rdparty/tokenizers-cpp/sentencepiece/third_party/protobuf-lite/generated_message_util.cc.o [ 12%] Building CXX object mlc_llm/tokenizers/sentencepiece/src/CMakeFiles/sentencepiece-static.dir/home/tangben/MLCNEW/mlc-llm/3rdparty/tokenizers-cpp/sentencepiece/third_party/protobuf-lite/implicit_weak_message.cc.o Compiling log v0.4.22 [ 12%] Building CXX object mlc_llm/tokenizers/sentencepiece/src/CMakeFiles/sentencepiece-static.dir/home/tangben/MLCNEW/mlc-llm/3rdparty/tokenizers-cpp/sentencepiece/third_party/protobuf-lite/int128.cc.o
Compiling lazy_static v1.5.0 Compiling unicode_categories v0.1.1 [ 18%] Building CXX object mlc_llm/CMakeFiles/mlc_llm_objs.dir/cpp/json_ffi/image_utils.cc.ocorasick, unicode_categories, syn, itertools, rayon-core, nom, regex-automata
[ 18%] Building CXX object mlc_llm/tvm/CMakeFiles/tvm_runtime_objs.dir/src/runtime/container.cc.oick, syn, itertools, rayon-core, nom, regex-automata
[ 18%] Building CXX object mlc_llm/tvm/CMakeFiles/tvm_runtime_objs.dir/src/runtime/cpu_device_api.cc.osyn, itertools, regex-automata
[ 25%] Building CXX object mlc_llm/tvm/CMakeFiles/tvm_runtime_objs.dir/src/runtime/debug.cc.o [ 31%] Building CXX object mlc_llm/tokenizers/sentencepiece/src/CMakeFiles/sentencepiece-static.dir/home/tangben/MLCNEW/mlc-llm/3rdparty/tokenizers-cpp/sentencepiece/third_party/protobuf-lite/io_win32.cc.o [ 31%] Building CXX object mlc_llm/tvm/CMakeFiles/tvm_runtime_objs.dir/src/runtime/disco/bcast_session.cc.o Compiling darling_core v0.20.9 [ 31%] Building CXX object mlc_llm/tvm/CMakeFiles/tvm_runtime_objs.dir/src/runtime/disco/builtin.cc.o syn, regex-automata
Compiling regex v1.10.5 Compiling rayon-cond v0.3.0 Compiling serde_derive v1.0.204 [ 31%] Building CXX object mlc_llm/tvm/CMakeFiles/tvm_runtime_objs.dir/src/runtime/disco/disco_worker.cc.ox-automata
Compiling thiserror-impl v1.0.61 [ 31%] Building CXX object mlc_llm/tvm/CMakeFiles/tvm_runtime_objs.dir/src/runtime/disco/loader.cc.ode_derive, regex, regex-automata
[ 31%] Building CXX object mlc_llm/tvm/CMakeFiles/tvm_runtime_objs.dir/src/runtime/disco/process_session.cc.o Compiling monostate-impl v0.1.13 [ 31%] Building CXX object mlc_llm/tokenizers/sentencepiece/src/CMakeFiles/sentencepiece-static.dir/home/tangben/MLCNEW/mlc-llm/3rdparty/tokenizers-cpp/sentencepiece/third_party/protobuf-lite/message_lite.cc.o
[ 31%] Building CXX object mlc_llm/tvm/CMakeFiles/tvm_runtime_objs.dir/src/runtime/disco/session.cc.ostate-impl, serde_derive, regex-automata
Compiling darling_macro v0.20.9 [ 31%] Building CXX object mlc_llm/CMakeFiles/mlc_llm_objs.dir/cpp/json_ffi/json_ffi_engine.cc.o regex-automata, darling_macro
[ 31%] Building CXX object mlc_llm/tokenizers/sentencepiece/src/CMakeFiles/sentencepiece-static.dir/home/tangben/MLCNEW/mlc-llm/3rdparty/tokenizers-cpp/sentencepiece/third_party/protobuf-lite/parse_context.cc.o Compiling darling v0.20.9 Compiling derive_builder_core v0.20.0 [ 31%] Building CXX object mlc_llm/tokenizers/sentencepiece/src/CMakeFiles/sentencepiece-static.dir/home/tangben/MLCNEW/mlc-llm/3rdparty/tokenizers-cpp/sentencepiece/third_party/protobuf-lite/repeated_field.cc.o
[ 31%] Building CXX object mlc_llm/tokenizers/sentencepiece/src/CMakeFiles/sentencepiece-static.dir/home/tangben/MLCNEW/mlc-llm/3rdparty/tokenizers-cpp/sentencepiece/third_party/protobuf-lite/status.cc.o Compiling derive_builder_macro v0.20.0 [ 31%] Building CXX object mlc_llm/CMakeFiles/mlc_llm_objs.dir/cpp/json_ffi/openai_api_protocol.cc.o
[ 31%] Building CXX object mlc_llm/CMakeFiles/mlc_llm_objs.dir/cpp/loader/multi_gpu_loader.cc.o [ 31%] Building CXX object mlc_llm/CMakeFiles/mlc_llm_objs.dir/cpp/metadata/model.cc.o [ 31%] Building CXX object mlc_llm/CMakeFiles/mlc_llm_objs.dir/cpp/serve/config.cc.o [ 31%] Building CXX object mlc_llm/tokenizers/sentencepiece/src/CMakeFiles/sentencepiece-static.dir/home/tangben/MLCNEW/mlc-llm/3rdparty/tokenizers-cpp/sentencepiece/third_party/protobuf-lite/statusor.cc.o [ 31%] Building CXX object mlc_llm/CMakeFiles/mlc_llm_objs.dir/cpp/serve/data.cc.o [ 31%] Building CXX object mlc_llm/tokenizers/sentencepiece/src/CMakeFiles/sentencepiece-static.dir/home/tangben/MLCNEW/mlc-llm/3rdparty/tokenizers-cpp/sentencepiece/third_party/protobuf-lite/stringpiece.cc.o Compiling derive_builder v0.20.0 [ 31%] Building CXX object mlc_llm/tokenizers/sentencepiece/src/CMakeFiles/sentencepiece-static.dir/home/tangben/MLCNEW/mlc-llm/3rdparty/tokenizers-cpp/sentencepiece/third_party/protobuf-lite/stringprintf.cc.o
[ 31%] Building CXX object mlc_llm/tvm/CMakeFiles/tvm_runtime_objs.dir/src/runtime/disco/threaded_session.cc.o [ 31%] Building CXX object mlc_llm/tvm/CMakeFiles/tvm_runtime_objs.dir/src/runtime/dso_library.cc.o [ 31%] Building CXX object mlc_llm/tvm/CMakeFiles/tvm_runtime_objs.dir/src/runtime/file_utils.cc.o [ 37%] Building CXX object mlc_llm/tvm/CMakeFiles/tvm_runtime_objs.dir/src/runtime/library_module.cc.o [ 37%] Building CXX object mlc_llm/tokenizers/sentencepiece/src/CMakeFiles/sentencepiece-static.dir/home/tangben/MLCNEW/mlc-llm/3rdparty/tokenizers-cpp/sentencepiece/third_party/protobuf-lite/structurally_valid.cc.o [ 37%] Building CXX object mlc_llm/tokenizers/sentencepiece/src/CMakeFiles/sentencepiece-static.dir/home/tangben/MLCNEW/mlc-llm/3rdparty/tokenizers-cpp/sentencepiece/third_party/protobuf-lite/strutil.cc.o
Compiling onig v6.4.0 Compiling spm_precompiled v0.1.4 Compiling monostate v0.1.13 [ 37%] Building CXX object mlc_llm/tvm/CMakeFiles/tvm_runtime_objs.dir/src/runtime/logging.cc.o
[ 37%] Building CXX object mlc_llm/tvm/CMakeFiles/tvm_runtime_objs.dir/src/runtime/memory/memory_manager.cc.o
Compiling tokenizers v0.19.1 [ 37%] Building CXX object mlc_llm/tvm/CMakeFiles/tvm_runtime_objs.dir/src/runtime/metadata.cc.o
[ 37%] Building CXX object mlc_llm/CMakeFiles/mlc_llm_objs.dir/cpp/serve/draft_token_workspace_manager.cc.o [ 37%] Building CXX object mlc_llm/tvm/CMakeFiles/tvm_runtime_objs.dir/src/runtime/minrpc/minrpc_logger.cc.o [ 37%] Building CXX object mlc_llm/tvm/CMakeFiles/tvm_runtime_objs.dir/src/runtime/module.cc.o [ 43%] Building CXX object mlc_llm/tokenizers/sentencepiece/src/CMakeFiles/sentencepiece-static.dir/home/tangben/MLCNEW/mlc-llm/3rdparty/tokenizers-cpp/sentencepiece/third_party/protobuf-lite/time.cc.o [ 43%] Building CXX object mlc_llm/CMakeFiles/mlc_llm_objs.dir/cpp/serve/engine.cc.o [ 43%] Building CXX object mlc_llm/tokenizers/sentencepiece/src/CMakeFiles/sentencepiece-static.dir/home/tangben/MLCNEW/mlc-llm/3rdparty/tokenizers-cpp/sentencepiece/third_party/protobuf-lite/wire_format_lite.cc.o
[ 43%] Building CXX object mlc_llm/tokenizers/sentencepiece/src/CMakeFiles/sentencepiece-static.dir/home/tangben/MLCNEW/mlc-llm/3rdparty/tokenizers-cpp/sentencepiece/third_party/protobuf-lite/zero_copy_stream.cc.o [ 43%] Building CXX object mlc_llm/tvm/CMakeFiles/tvm_runtime_objs.dir/src/runtime/name_transforms.cc.o [ 43%] Building CXX object mlc_llm/tvm/CMakeFiles/tvm_runtime_objs.dir/src/runtime/ndarray.cc.o [ 43%] Building CXX object mlc_llm/tokenizers/sentencepiece/src/CMakeFiles/sentencepiece-static.dir/home/tangben/MLCNEW/mlc-llm/3rdparty/tokenizers-cpp/sentencepiece/third_party/protobuf-lite/zero_copy_stream_impl.cc.o [ 43%] Building CXX object mlc_llm/CMakeFiles/mlc_llm_objs.dir/cpp/serve/engine_actions/action.cc.o [ 50%] Building CXX object mlc_llm/CMakeFiles/mlc_llm_objs.dir/cpp/serve/engine_actions/action_commons.cc.o [ 50%] Building CXX object mlc_llm/tokenizers/sentencepiece/src/CMakeFiles/sentencepiece-static.dir/home/tangben/MLCNEW/mlc-llm/3rdparty/tokenizers-cpp/sentencepiece/third_party/protobuf-lite/zero_copy_stream_impl_lite.cc.o [ 50%] Building CXX object mlc_llm/tokenizers/sentencepiece/src/CMakeFiles/sentencepiece-static.dir/builtin_pb/sentencepiece.pb.cc.o [ 50%] Building CXX object mlc_llm/tokenizers/sentencepiece/src/CMakeFiles/sentencepiece-static.dir/builtin_pb/sentencepiece_model.pb.cc.o [ 50%] Building CXX object mlc_llm/tvm/CMakeFiles/tvm_runtime_objs.dir/src/runtime/nvtx.cc.o [ 50%] Building CXX object mlc_llm/CMakeFiles/mlc_llm_objs.dir/cpp/serve/engine_actions/batch_decode.cc.o [ 50%] Building CXX object mlc_llm/tvm/CMakeFiles/tvm_runtime_objs.dir/src/runtime/object.cc.o [ 56%] Building CXX object mlc_llm/tvm/CMakeFiles/tvm_runtime_objs.dir/src/runtime/packed_func.cc.o [ 56%] Building CXX object mlc_llm/tokenizers/sentencepiece/src/CMakeFiles/sentencepiece-static.dir/bpe_model.cc.o [ 56%] Building CXX object mlc_llm/CMakeFiles/mlc_llm_objs.dir/cpp/serve/engine_actions/batch_draft.cc.o [ 56%] Building CXX object mlc_llm/tokenizers/sentencepiece/src/CMakeFiles/sentencepiece-static.dir/char_model.cc.o [ 56%] Building CXX object mlc_llm/tvm/CMakeFiles/tvm_runtime_objs.dir/src/runtime/profiling.cc.o [ 56%] Building CXX object mlc_llm/tvm/CMakeFiles/tvm_runtime_objs.dir/src/runtime/regex.cc.o [ 56%] Building CXX object mlc_llm/tvm/CMakeFiles/tvm_runtime_objs.dir/src/runtime/registry.cc.o [ 62%] Building CXX object mlc_llm/tokenizers/sentencepiece/src/CMakeFiles/sentencepiece-static.dir/error.cc.o [ 62%] Building CXX object mlc_llm/tvm/CMakeFiles/tvm_runtime_objs.dir/src/runtime/relax_vm/builtin.cc.o [ 62%] Building CXX object mlc_llm/tokenizers/sentencepiece/src/CMakeFiles/sentencepiece-static.dir/filesystem.cc.o [ 62%] Building CXX object mlc_llm/tokenizers/sentencepiece/src/CMakeFiles/sentencepiece-static.dir/model_factory.cc.o [ 62%] Building CXX object mlc_llm/tokenizers/sentencepiece/src/CMakeFiles/sentencepiece-static.dir/model_interface.cc.o [ 62%] Building CXX object mlc_llm/CMakeFiles/mlc_llm_objs.dir/cpp/serve/engine_actions/batch_jumpforward.cc.o [ 62%] Building CXX object mlc_llm/CMakeFiles/mlc_llm_objs.dir/cpp/serve/engine_actions/batch_prefill_base.cc.o [ 62%] Building CXX object mlc_llm/tokenizers/sentencepiece/src/CMakeFiles/sentencepiece-static.dir/normalizer.cc.o [ 62%] Building CXX object mlc_llm/tvm/CMakeFiles/tvm_runtime_objs.dir/src/runtime/relax_vm/bytecode.cc.o [ 62%] Building CXX object mlc_llm/CMakeFiles/mlc_llm_objs.dir/cpp/serve/engine_actions/batch_verify.cc.o [ 62%] Building CXX object mlc_llm/tokenizers/sentencepiece/src/CMakeFiles/sentencepiece-static.dir/sentencepiece_processor.cc.o [ 62%] Building CXX object mlc_llm/tvm/CMakeFiles/tvm_runtime_objs.dir/src/runtime/relax_vm/executable.cc.o [ 62%] Building CXX object mlc_llm/CMakeFiles/mlc_llm_objs.dir/cpp/serve/engine_actions/eagle_batch_draft.cc.o [ 62%] Building CXX object mlc_llm/CMakeFiles/mlc_llm_objs.dir/cpp/serve/engine_actions/eagle_batch_verify.cc.o [ 62%] Building CXX object mlc_llm/CMakeFiles/mlc_llm_objs.dir/cpp/serve/engine_actions/eagle_new_request_prefill.cc.o [ 62%] Building CXX object mlc_llm/tokenizers/sentencepiece/src/CMakeFiles/sentencepiece-static.dir/unigram_model.cc.o Compiling tokenizers-c v0.1.0 (/home/tangben/MLCNEW/mlc-llm/3rdparty/tokenizers-cpp/rust) [ 62%] Building CXX object mlc_llm/tokenizers/sentencepiece/src/CMakeFiles/sentencepiece-static.dir/util.cc.o
Finished release profile [optimized] target(s) in 27.19s [ 62%] Built target tokenizers_c [ 62%] Building CXX object mlc_llm/tokenizers/sentencepiece/src/CMakeFiles/sentencepiece-static.dir/word_model.cc.o [ 62%] Building CXX object mlc_llm/tokenizers/sentencepiece/src/CMakeFiles/sentencepiece-static.dir/home/tangben/MLCNEW/mlc-llm/3rdparty/tokenizers-cpp/sentencepiece/third_party/absl/flags/flag.cc.o [ 68%] Building CXX object mlc_llm/CMakeFiles/mlc_llm_objs.dir/cpp/serve/engine_actions/new_request_prefill.cc.o [ 68%] Building CXX object mlc_llm/CMakeFiles/mlc_llm_objs.dir/cpp/serve/engine_state.cc.o [ 68%] Building CXX object mlc_llm/CMakeFiles/mlc_llm_objs.dir/cpp/serve/event_trace_recorder.cc.o [ 68%] Building CXX object mlc_llm/CMakeFiles/mlc_llm_objs.dir/cpp/serve/function_table.cc.o [ 68%] Building CXX object mlc_llm/tvm/CMakeFiles/tvm_runtime_objs.dir/src/runtime/relax_vm/kv_state.cc.o [ 68%] Building CXX object mlc_llm/tvm/CMakeFiles/tvm_runtime_objs.dir/src/runtime/relax_vm/lm_support.cc.o [ 75%] Building CXX object mlc_llm/tvm/CMakeFiles/tvm_runtime_objs.dir/src/runtime/relax_vm/ndarray_cache_support.cc.o [ 75%] Building CXX object mlc_llm/CMakeFiles/mlc_llm_objs.dir/cpp/serve/logit_processor.cc.o [ 75%] Building CXX object mlc_llm/CMakeFiles/mlc_llm_objs.dir/cpp/serve/metrics.cc.o [ 75%] Building CXX object mlc_llm/tvm/CMakeFiles/tvm_runtime_objs.dir/src/runtime/relax_vm/paged_kv_cache.cc.o [ 75%] Building CXX object mlc_llm/CMakeFiles/mlc_llm_objs.dir/cpp/serve/model.cc.o [ 81%] Linking CXX static library libsentencepiece.a [ 81%] Built target sentencepiece-static [ 81%] Building CXX object mlc_llm/CMakeFiles/mlc_llm_objs.dir/cpp/serve/prefix_cache.cc.o [ 81%] Linking CXX static library libtokenizers_cpp.a [ 81%] Built target tokenizers_cpp [ 81%] Building CXX object mlc_llm/CMakeFiles/mlc_llm_objs.dir/cpp/serve/radix_tree.cc.o [ 81%] Building CXX object mlc_llm/tvm/CMakeFiles/tvm_runtime_objs.dir/src/runtime/relax_vm/rnn_state.cc.o [ 81%] Building CXX object mlc_llm/CMakeFiles/mlc_llm_objs.dir/cpp/serve/request.cc.o [ 87%] Building CXX object mlc_llm/CMakeFiles/mlc_llm_objs.dir/cpp/serve/request_state.cc.o [ 87%] Building CXX object mlc_llm/CMakeFiles/mlc_llm_objs.dir/cpp/serve/sampler/cpu_sampler.cc.o [ 87%] Building CXX object mlc_llm/tvm/CMakeFiles/tvm_runtime_objs.dir/src/runtime/relax_vm/vm.cc.o [ 87%] Building CXX object mlc_llm/tvm/CMakeFiles/tvm_runtime_objs.dir/src/runtime/source_utils.cc.o [ 87%] Building CXX object mlc_llm/CMakeFiles/mlc_llm_objs.dir/cpp/serve/sampler/gpu_sampler.cc.o [ 87%] Building CXX object mlc_llm/CMakeFiles/mlc_llm_objs.dir/cpp/serve/threaded_engine.cc.o [ 87%] Building CXX object mlc_llm/tvm/CMakeFiles/tvm_runtime_objs.dir/src/runtime/static_library.cc.o [ 87%] Building CXX object mlc_llm/CMakeFiles/mlc_llm_objs.dir/cpp/support/encoding.cc.o [ 87%] Building CXX object mlc_llm/tvm/CMakeFiles/tvm_runtime_objs.dir/src/runtime/system_library.cc.o [ 87%] Building CXX object mlc_llm/tvm/CMakeFiles/tvm_runtime_objs.dir/src/runtime/thread_pool.cc.o [ 87%] Building CXX object mlc_llm/CMakeFiles/mlc_llm_objs.dir/cpp/tokenizers/streamer.cc.o [ 87%] Building CXX object mlc_llm/CMakeFiles/mlc_llm_objs.dir/cpp/tokenizers/tokenizers.cc.o [ 87%] Building CXX object mlc_llm/tvm/CMakeFiles/tvm_runtime_objs.dir/src/runtime/threading_backend.cc.o [ 87%] Building CXX object mlc_llm/tvm/CMakeFiles/tvm_runtime_objs.dir/src/runtime/vm/bytecode.cc.o [ 93%] Building CXX object mlc_llm/tvm/CMakeFiles/tvm_runtime_objs.dir/src/runtime/vm/executable.cc.o [ 93%] Building CXX object mlc_llm/tvm/CMakeFiles/tvm_runtime_objs.dir/src/runtime/vm/vm.cc.o [ 93%] Building CXX object mlc_llm/tvm/CMakeFiles/tvm_runtime_objs.dir/src/runtime/workspace_pool.cc.o [ 93%] Building CXX object mlc_llm/tvm/CMakeFiles/tvm_runtime_objs.dir/src/runtime/opencl/opencl_device_api.cc.o [ 93%] Building CXX object mlc_llm/tvm/CMakeFiles/tvm_runtime_objs.dir/src/runtime/opencl/opencl_module.cc.o [ 93%] Building CXX object mlc_llm/tvm/CMakeFiles/tvm_runtime_objs.dir/src/runtime/opencl/opencl_module_spirv.cc.o [ 93%] Building CXX object mlc_llm/tvm/CMakeFiles/tvm_runtime_objs.dir/src/runtime/opencl/texture_pool.cc.o [ 93%] Building CXX object mlc_llm/tvm/CMakeFiles/tvm_runtime_objs.dir/src/runtime/opencl/opencl_wrapper/opencl_wrapper.cc.o [ 93%] Building CXX object mlc_llm/tvm/CMakeFiles/tvm_runtime_objs.dir/src/runtime/contrib/random/random.cc.o [100%] Building CXX object mlc_llm/tvm/CMakeFiles/tvm_runtime_objs.dir/src/runtime/contrib/sort/sort.cc.o [100%] Built target mlc_llm_objs [100%] Built target tvm_runtime_objs [100%] Linking CXX static library libtvm_runtime.a You have build static version of the TVM runtime library. Make sure to use --whole-archive when linking it into your project. [100%] Built target tvm_runtime [100%] Linking CXX static library libmlc_llm.a [100%] Built target mlc_llm_static gmake[3]: ** No rule to make target 'lib/libmodel_android.a', needed by 'libtvm4j_runtime_packed.so'. Stop. gmake[3]: Waiting for unfinished jobs.... [100%] Building CXX object CMakeFiles/tvm4j_runtime_packed.dir/home/tangben/MLCNEW/mlc-llm/3rdparty/tvm/jvm/native/src/main/native/org_apache_tvm_native_c_api.cc.o gmake[2]: [CMakeFiles/Makefile2:263: CMakeFiles/tvm4j_runtime_packed.dir/all] Error 2 gmake[1]: [CMakeFiles/Makefile2:270: CMakeFiles/tvm4j_runtime_packed.dir/rule] Error 2 gmake: * [Makefile:203: tvm4j_runtime_packed] Error 2 Traceback (most recent call last): File "/home/tangben/MLCNEW/mlc-llm/android/mlc4j/prepare_libs.py", line 120, in main(parsed.mlc_llm_source_dir) File "/home/tangben/MLCNEW/mlc-llm/android/mlc4j/prepare_libs.py", line 103, in main run_cmake_build() File "/home/tangben/MLCNEW/mlc-llm/android/mlc4j/prepare_libs.py", line 66, in run_cmake_build subprocess.run(cmd, check=True, env=os.environ) File "/usr/lib/python3.10/subprocess.py", line 526, in run raise CalledProcessError(retcode, process.args, subprocess.CalledProcessError: Command '['cmake', '--build', '.', '--target', 'tvm4j_runtime_packed', '--config', 'release', '-j12']' returned non-zero exit status 2. (venv_llama) tangben@tb:~/MLCNEW/mlc-llm/android/mlc4j$

zhouql-l commented 4 months ago

I also encountered the same problem

tqchen commented 4 months ago

This file should not be directly invoked. Please follow official Android sdk docs and use mlc_LLM package instead https://llm.mlc.ai/docs/deploy/android.html