mlc-ai / mlc-ai/tokenizers-cpp
linker error when using aarch64 tokenizer_c.a
Open
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 512
- Forks
- 132
- PR merge metrics
- No merged PRs in 30d
Description
Getting following linker errors when using cross compiled tokenizer_c.a in a project.
The problem is some object files in tokenizer_c.a archive are not compiling for aarch64 and still getting compiled to x86 instead.
aarch64-unknown-linux-gnu/bin/ld.bfd: tokenizers-cpp-build/aarch64-unknown-linux-gnu/release/libtokenizers_c.a(a445302c6d3dcb51-regexec.o): Relocations in generic ELF (EM: 62)
aarch64-unknown-linux-gnu/bin/ld.bfd: tokenizers-cpp-build/aarch64-unknown-linux-gnu/release/libtokenizers_c.a(a445302c6d3dcb51-regexec.o): Relocations in generic ELF (EM: 62)
aarch64-unknown-linux-gnu/bin/ld.bfd: tokenizers-cpp-build/aarch64-unknown-linux-gnu/release/libtokenizers_c.a(a445302c6d3dcb51-regexec.o): Relocations in generic ELF (EM: 62)
aarch64-unknown-linux-gnu/bin/ld.bfd: tokenizers-cpp-build/aarch64-unknown-linux-gnu/release/libtokenizers_c.a: error adding symbols: file in wrong format
collect2: error: ld returned 1 exit status
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by inspecting how tokenizer_c.a is cross-compiled and verify the architecture of the archive objects, especially regexec.o named in the linker output. The issue is resolved when every object in tokenizer_c.a targets aarch64 and the reported linker command succeeds.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, linux
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100