Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Compile error for iOS #3074

Open
skonmeme opened this issue Dec 23, 2024 · 0 comments
Open

[Bug] Compile error for iOS #3074

skonmeme opened this issue Dec 23, 2024 · 0 comments
Labels
bug Confirmed bugs

Comments

@skonmeme
Copy link

skonmeme commented Dec 23, 2024

🐛 Bug

Compilation of MLCChat iOS version is failed with below error messages on macOS 18.2, Xcode 16.2 and python 3.12 (and 3.11):

  ...
  Compiling smallvec v1.13.2
  Compiling unicode-normalization-alignments v0.1.12
error: Unrecognized option: 'diagnostic-width'

error: could not compile `macro_rules_attribute` (lib)

Caused by:
  process didn't exit successfully: `rustc --crate-name macro_rules_attribute --edition=2018 /Users/skon/.cargo/registry/src/index.crates.io-6f17d22bba15001f/macro_rules_attribute-0.2.0/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --diagnostic-width=166 --crate-type lib --emit=dep-info,metadata,link -C opt-level=3 -C embed-bitcode=no --cfg 'feature="default"' --check-cfg 'cfg(docsrs)' --check-cfg 'cfg(feature, values("better-docs", "default", "verbose-expansions"))' -C metadata=3a2c2d9493208c37 -C extra-filename=-3a2c2d9493208c37 --out-dir /Users/skon/src/t/mlc-llm/ios/MLCChat/build/tokenizers/aarch64-apple-ios/release/deps --target aarch64-apple-ios -C strip=debuginfo -L dependency=/Users/skon/src/t/mlc-llm/ios/MLCChat/build/tokenizers/aarch64-apple-ios/release/deps -L dependency=/Users/skon/src/t/mlc-llm/ios/MLCChat/build/tokenizers/release/deps --extern macro_rules_attribute_proc_macro=/Users/skon/src/t/mlc-llm/ios/MLCChat/build/tokenizers/release/deps/libmacro_rules_attribute_proc_macro-9f1ba8870886f3ed.dylib --extern paste=/Users/skon/src/t/mlc-llm/ios/MLCChat/build/tokenizers/release/deps/libpaste-ccb893d2ca80bda6.dylib --cap-lints allow` (exit status: 1)
warning: build failed, waiting for other jobs to finish...
[100%] Built target tvm_runtime_objs     ] 54/89: unicode-normalization-alignments, regex-syntax, onig_sys(build), regex-automata, syn, rayon
[100%] Linking CXX static library libtvm_runtime.aregex-syntax, onig_sys(build), regex-automata, rayon
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
gmake[3]: *** [tokenizers/CMakeFiles/tokenizers_c.dir/build.make:71: tokenizers/aarch64-apple-ios/release/libtokenizers_c.a] 오류 101
gmake[2]: *** [CMakeFiles/Makefile2:542: tokenizers/CMakeFiles/tokenizers_c.dir/all] 오류 2
gmake[1]: *** [CMakeFiles/Makefile2:281: CMakeFiles/mlc_llm_static.dir/rule] 오류 2
gmake: *** [Makefile:216: mlc_llm_static] 오류 2

To Reproduce

Steps to reproduce the behavior:

  1. python -m pip install --pre -U -f https://mlc.ai/wheels mlc-llm-nightly-cpu mlc-ai-nightly-cpu
  2. git clone https://github.com/mlc-ai/mlc-llm
  3. cd mlc-llm
  4. git submodule update --init --recursive
  5. cd iOS/MLCChat
  6. export MLC_LLM_SOURCE_DIR=[SRC_PATH]/mlc-llm
  7. python -m mlc_llm package <<<--- errors here
  • git rev-parse --short HEAD

  • 1825fed

Expected behavior

Environment

  • Platform (e.g. WebGPU/Vulkan/IOS/Android/CUDA): iOS
  • Operating system (e.g. Ubuntu/Windows/MacOS/...): MacOS 18.2
  • Device (e.g. iPhone 12 Pro, PC+RTX 3090, ...): iPhone
  • How you installed MLC-LLM (conda, source): conda
  • How you installed TVM-Unity (pip, source): pip
  • Python version (e.g. 3.10): 3.12 and 3.11
  • GPU driver version (if applicable):
  • CUDA/cuDNN version (if applicable):
  • TVM Unity Hash Tag (python -c "import tvm; print('\n'.join(f'{k}: {v}' for k, v in tvm.support.libinfo().items()))", applicable if you compile models):
USE_NVTX: OFF
USE_GTEST: AUTO
SUMMARIZE: OFF
TVM_DEBUG_WITH_ABI_CHANGE: OFF
USE_IOS_RPC: OFF
USE_MSC: OFF
CUDA_VERSION: NOT-FOUND
USE_LIBBACKTRACE: AUTO
DLPACK_PATH: 3rdparty/dlpack/include
USE_TENSORRT_CODEGEN: OFF
USE_OPENCL_EXTN_QCOM: NOT-FOUND
USE_TARGET_ONNX: OFF
USE_AOT_EXECUTOR: ON
BUILD_DUMMY_LIBTVM: OFF
USE_CUDNN: OFF
USE_TENSORRT_RUNTIME: OFF
USE_ARM_COMPUTE_LIB_GRAPH_EXECUTOR: OFF
USE_THRUST: OFF
USE_CCACHE: AUTO
USE_ARM_COMPUTE_LIB: OFF
USE_CPP_RTVM:
USE_OPENCL_GTEST: /path/to/opencl/gtest
TVM_LOG_BEFORE_THROW: OFF
USE_MKL: OFF
USE_PT_TVMDSOOP: OFF
MLIR_VERSION: NOT-FOUND
USE_CLML: OFF
USE_STACKVM_RUNTIME: OFF
USE_GRAPH_EXECUTOR_CUDA_GRAPH: OFF
ROCM_PATH: /opt/rocm
USE_DNNL: OFF
USE_MSCCL: OFF
USE_NNAPI_RUNTIME: OFF
USE_VITIS_AI: OFF
USE_MLIR: OFF
USE_RCCL: OFF
USE_LLVM: llvm-config --link-static
USE_VERILATOR: OFF
USE_TF_TVMDSOOP: OFF
USE_THREADS: ON
USE_MSVC_MT: OFF
BACKTRACE_ON_SEGFAULT: OFF
USE_GRAPH_EXECUTOR: ON
USE_NCCL: OFF
USE_ROCBLAS: OFF
GIT_COMMIT_HASH: 7ed4584952546fa5d54366b72a6862f919c18daa
USE_VULKAN: OFF
USE_RUST_EXT: OFF
USE_CUTLASS: OFF
USE_CPP_RPC: OFF
USE_HEXAGON: OFF
USE_CUSTOM_LOGGING: OFF
USE_UMA: OFF
USE_FALLBACK_STL_MAP: OFF
USE_SORT: ON
USE_RTTI: ON
GIT_COMMIT_TIME: 2024-12-15 09:56:40 -0500
USE_HIPBLAS: OFF
USE_HEXAGON_SDK: /path/to/sdk
USE_BLAS: none
USE_LIBTORCH: OFF
USE_RANDOM: ON
USE_CUDA: OFF
USE_COREML: OFF
USE_AMX: OFF
BUILD_STATIC_RUNTIME: OFF
USE_KHRONOS_SPIRV: OFF
USE_CLML_GRAPH_EXECUTOR: OFF
USE_TFLITE: OFF
USE_HEXAGON_GTEST: /path/to/hexagon/gtest
PICOJSON_PATH: 3rdparty/picojson
USE_OPENCL_ENABLE_HOST_PTR: OFF
INSTALL_DEV: OFF
USE_PROFILER: ON
USE_NNPACK: OFF
LLVM_VERSION: 17.0.1
USE_MRVL: OFF
USE_OPENCL: OFF
COMPILER_RT_PATH: 3rdparty/compiler-rt
USE_NNAPI_CODEGEN: OFF
RANG_PATH: 3rdparty/rang/include
USE_SPIRV_KHR_INTEGER_DOT_PRODUCT: OFF
USE_OPENMP: OFF
USE_BNNS: OFF
USE_FLASHINFER:
USE_CUBLAS: OFF
USE_METAL: ON
USE_HEXAGON_EXTERNAL_LIBS: OFF
USE_ALTERNATIVE_LINKER: AUTO
USE_BYODT_POSIT: OFF
USE_NVSHMEM: OFF
USE_HEXAGON_RPC: OFF
DMLC_PATH: 3rdparty/dmlc-core/include
INDEX_DEFAULT_I64: ON
USE_RELAY_DEBUG: OFF
USE_RPC: ON
USE_TENSORFLOW_PATH: none
TVM_CLML_VERSION:
USE_MIOPEN: OFF
USE_ROCM: OFF
USE_PAPI: OFF
USE_CURAND: OFF
TVM_CXX_COMPILER_PATH: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++
HIDE_PRIVATE_SYMBOLS: ON
  • Any other relevant information:

Additional context

@skonmeme skonmeme added the bug Confirmed bugs label Dec 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Confirmed bugs
Projects
None yet
Development

No branches or pull requests

1 participant