Code Monkey home page Code Monkey logo

Comments (5)

Kaneki-x avatar Kaneki-x commented on September 13, 2024

@cjhelloviewing maybe you can modify -DANDROID_ABI=arm64-v8a code in '/android/mlc4j/prepare_libs.py' and try 'mlc_llm package' again

from mlc-llm.

cjhelloviewing avatar cjhelloviewing commented on September 13, 2024

@Kaneki-x Thank you. I changed it according to the information you provided and built it.
An error occurred during the build, so I contacted you to check if the build method was wrong.

Error log

...
error[E0463]: can't find crate for core
|
= note: the armv7-linux-androideabi target may not be installed
= help: consider downloading the target with rustup target add armv7-linux-androideabi

For more information about this error, try rustc --explain E0463.
error: could not compile memchr (lib) due to 1 previous error
warning: build failed, waiting for other jobs to finish...
error: could not compile crossbeam-utils (lib) due to 1 previous error
error: could not compile libc (lib) due to 1 previous error
...

-> rustup target add armv7-linux-androideabi
The above error was resolved with the following execution, but the following error occurred.

Error log

error occurred: Failed to find tool. Is armv7-linux-androideabi24-clang installed?

make: *** [tvm4j_runtime_packed] Error 2
Traceback (most recent call last):
File "/Users/khkang80/zproject/mlc-llm/android/mlc4j/prepare_libs.py", line 120, in
main(parsed.mlc_llm_source_dir)
File "/Users/khkang80/zproject/mlc-llm/android/mlc4j/prepare_libs.py", line 103, in main
run_cmake_build()
File "/Users/khkang80/zproject/mlc-llm/android/mlc4j/prepare_libs.py", line 66, in run_cmake_build
subprocess.run(cmd, check=True, env=os.environ)
File "/Users/khkang80/opt/anaconda3/lib/python3.9/subprocess.py", line 528, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['cmake', '--build', '.', '--target', 'tvm4j_runtime_packed', '--config', 'release', '-j10']' returned non-zero exit status 2.
Traceback (most recent call last):
File "/Users/khkang80/opt/anaconda3/bin/mlc_llm", line 8, in
sys.exit(main())
File "/Users/khkang80/opt/anaconda3/lib/python3.9/site-packages/mlc_llm/main.py", line 53, in main
cli.main(sys.argv[2:])
File "/Users/khkang80/opt/anaconda3/lib/python3.9/site-packages/mlc_llm/cli/package.py", line 64, in main
package(
File "/Users/khkang80/opt/anaconda3/lib/python3.9/site-packages/mlc_llm/interface/package.py", line 361, in package
build_android_binding(mlc_llm_source_dir, output)
File "/Users/khkang80/opt/anaconda3/lib/python3.9/site-packages/mlc_llm/interface/package.py", line 275, in build_android_binding
subprocess.run([sys.executable, mlc4j_path / "prepare_libs.py"], check=True, env=os.environ)
File "/Users/khkang80/opt/anaconda3/lib/python3.9/subprocess.py", line 528, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['/Users/khkang80/opt/anaconda3/bin/python', PosixPath('/Users/khkang80/zproject/mlc-llm/android/mlc4j/prepare_libs.py')]' returned non-zero exit status 1.

When checking mlc-llm/3rdparty/tokenizers-cpp/CMakeLists.txt, it is as follows (line 45)

elseif (ANDROID_ABI STREQUAL "armeabi-v7a")
set(TOKENIZERS_CPP_CARGO_TARGET armv7-linux-androideabi)

There is no armv7-linux-androideabi24-clang in Android NDK (Android/sdk/ndk/27.0.12077973/toolchains/llvm/prebuilt/darwin-x86_64/bin).

I need help.

from mlc-llm.

Kaneki-x avatar Kaneki-x commented on September 13, 2024

@cjhelloviewing I think it should be an NDK-related configuration issue. You can check the following section to see if it needs to be adjusted to the corresponding clang, as well as other configurations related to NDK cross-compilation.
Microsoft Edge 2024-09-02 23 10 21

from mlc-llm.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.