google / google/magika

Removing ort/ndarray compatibility pin also breaks Linux arm64 builds

Open
#1,323 8 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
18.6k
Forks
1.2k
Avg merge
3d 12h
Merged PRs (30d)
20

Description

The compatibility pin from [#1312](https://github.com/google/magika/pull/1312) appears to be needed for more than just the original x86_64 Homebrew case.

In Homebrew we currently carry the patch from that PR in the `magika` formula:
- https://github.com/google/magika/pull/1312

When I tried removing that patch in this Homebrew PR:
- https://github.com/Homebrew/homebrew-core/pull/272963

Linux arm64 also failed to build from source in CI.

Direct failing Linux arm job:
- https://github.com/Homebrew/homebrew-core/actions/runs/23243289467/job/67565534579?pr=272963

The useful part of the failing linker output on `ubuntu-22.04-arm` was:

```text
/usr/bin/ld: ...libort_sys-....rlib(...): undefined reference to `__cxa_call_terminate`
/usr/bin/ld: ...inference_session.cc.o: undefined reference to `__isoc23_strtol`
/usr/bin/ld: ...allocator_adapters.cc.o: undefined reference to `__isoc23_strtoll`
/usr/bin/ld: ...parser.cc.o: undefined reference to `__isoc23_strtoull`
collect2: error: ld returned 1 exit status
```

This was coming from the `ort` / `ort-sys` objects, not Magika's own Rust code.

For comparison, rebuilding current `main` in Homebrew with the patch still present succeeded on Linux arm64:
- https://github.com/Homebrew/homebrew-core/actions/runs/23245392373

That run produced a successful `ubuntu-22.04-arm` bottle, while the patch-removal PR above did not.

So from the Homebrew side, dropping the pin regresses Linux arm64 in addition to the earlier x86_64 compatibility issue.

Questions:
- Is Linux arm64 / `aarch64-unknown-linux-gnu` intended to be supported for the Rust CLI right now?
- If yes, should the fix from #1312 (or a follow-up equivalent) stay in upstream until `ort` / `ndarray` can be moved forward safely?
- If not, it would help to document that current Linux support is narrower than generic `linux`.

If useful, I can also provide the exact Homebrew formula patch block and the full failing CI excerpt from the patch-removal PR.

Contributor guide

Open the contributing guide

Research direction

Start by reviewing the compatibility patch from #1312 and the Homebrew patch-removal PR, then compare the successful and failing Linux arm64 CI jobs. Confirm whether the linker failures originate in ort/ort-sys during aarch64-unknown-linux-gnu builds. Done means establishing the supported Linux arm64 behavior and either preserving an upstream-compatible fix or documenting the narrower support.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
build-system, operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.