mlc-ai / tokenizers-cpp

Universal cross-platform tokenizers binding to HF and sentencepiece
Apache License 2.0
211 stars 47 forks source link

Can't support cross build on Linux #24

Closed SakuragiJump closed 2 months ago

SakuragiJump commented 5 months ago

when I want to build a aarch64 on x86_64 host,cargo build will not accept a optioin "--target aarch64-unknown-linux-gnu" and build a x86_64 one,so cross build will not work out。

mayway530 commented 5 months ago

同样问题,期待解决

Abhishek8394 commented 3 months ago

I was able to resolve this issue and can help if you share your build info. For starters, try the target string aarch64-linux-android

Abhishek8394 commented 3 months ago

You would also be better off by linking to android ndk toolchain file. Guide at https://developer.android.com/ndk/guides/cmake#file. I have a sample repo at https://github.com/Abhishek8394/android-hf-tokenizers.

tqchen commented 3 months ago

@Abhishek8394 thanks for your info, do you mind send a PR to the README to enhance build guide?

Abhishek8394 commented 3 months ago

Sure, I'll make a PR.