Android Cross Compile Error! (error: linker `cc` not found)

Open
#63 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
25/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
android, cmake, cpp, rust

Research direction

Start with the reported CMake invocation and the Android toolchain file at $ANDROID_NDK/build/cmake/android.toolchain.cmake. Reproduce the Ubuntu 22.04, NDK 27.0.12077973, arm64-v8a build and inspect how the generated build selects the linker. Done means identifying a project-specific configuration or documentation fix and confirming that make completes successfully.

Written by the indexing model from the issue text.

Description

During Cross Compilation, rust comes up with an error:

error: linker cc not found
|
= note: No such file or directory (os error 2)

However, the toolchain path is correctly set. I'm completely confused! Please give me a help when it's convenient for you!

Host Platform: Ubuntu 22.04
Ndk version: 27.0.12077973

command used
export PATH=${PATH}:/.cargo/bin
export ANDROID_NDK=
/Android/Sdk/ndk/27.0.12077973/
cmake .. -DCMAKE_TOOLCHAIN_FILE=${ANDROID_NDK}/build/cmake/android.toolchain.cmake
-DANDROID_ABI=arm64-v8a
-DANDROID_PLATFORM=android-24
-DCMAKE_INSTALL_PREFIX=cmake-out-android
-DCMAKE_BUILD_TYPE=Release
make

Best Regards

Dominant language
C++
Stars
512
Forks
132
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from mlc-ai/tokenizers-cpp

All issues in mlc-ai/tokenizers-cpp

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.