Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build CLI for Linux ARM64 #5503

Merged
merged 9 commits into from Mar 14, 2024
Merged

Build CLI for Linux ARM64 #5503

merged 9 commits into from Mar 14, 2024

Conversation

abey79
Copy link
Contributor

@abey79 abey79 commented Mar 14, 2024

What

Add support for building a Linux ARM64 version of the CLI in our build system.

This PR introduces ugly work-around to be cleaned when our pixi deps support linux-aarch64:

Checklist

  • I have read and agree to Contributor Guide and the Code of Conduct
  • I've included a screenshot or gif (if applicable)
  • I have tested the web demo (if applicable):
  • The PR title and labels are set such as to maximize their usefulness for the next release's CHANGELOG
  • If applicable, add a new check to the release checklist!

@abey79
Copy link
Contributor Author

abey79 commented Mar 14, 2024

First successful job: https://github.com/rerun-io/rerun/actions/runs/8280665451/job/22657630034
Corresponding binary: https://build.rerun.io/commit/058f607/rerun-cli/linux-arm64/rerun
Successfully tested on:

Linux rpi5 6.1.0-rpi4-rpi-2712 #1 SMP PREEMPT Debian 1:6.1.54-1+rpt2 (2023-10-05) aarch64 GNU/Linux

Failed on a debian11 vm due to GLIBC compatibility.

glibc symbols:

     9: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND log@GLIBC_2.29 (3)
    20: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND pthread_setspecific@GLIBC_2.34 (6)
    29: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND memfd_create@GLIBC_2.27 (8)
    34: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND pthread_attr_getguardsize@GLIBC_2.34 (6)
    36: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND powf@GLIBC_2.27 (9)
    37: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND dlopen@GLIBC_2.34 (6)
    44: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND dlclose@GLIBC_2.34 (6)
    48: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND pthread_create@GLIBC_2.34 (6)
    51: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND __libc_start_main@GLIBC_2.34 (6)
    60: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND pthread_attr_setstacksize@GLIBC_2.34 (6)
    63: 0000000000000000     0 FUNC    WEAK   DEFAULT  UND statx@GLIBC_2.28 (10)
    65: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND exp2@GLIBC_2.29 (3)
    73: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND pthread_attr_getstack@GLIBC_2.34 (6)
    75: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND lstat64@GLIBC_2.33 (11)
    88: 0000000000000000     0 FUNC    WEAK   DEFAULT  UND getrandom@GLIBC_2.25 (12)
    89: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND pthread_key_delete@GLIBC_2.34 (6)
    96: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND stat64@GLIBC_2.33 (11)
   100: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND pthread_getspecific@GLIBC_2.34 (6)
   112: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND shm_open@GLIBC_2.34 (6)
   114: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND pthread_join@GLIBC_2.34 (6)
   115: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND dlerror@GLIBC_2.34 (6)
   131: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND pthread_key_create@GLIBC_2.34 (6)
   147: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND fstatat64@GLIBC_2.33 (11)
   154: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND dlsym@GLIBC_2.34 (6)
   160: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND pthread_detach@GLIBC_2.34 (6)
   163: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND pow@GLIBC_2.29 (3)
   166: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND expf@GLIBC_2.27 (9)
   172: 0000000000000000     0 FUNC    WEAK   DEFAULT  UND posix_spawn_file_actions_addchdir_np@GLIBC_2.29 (15)
   173: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND shm_unlink@GLIBC_2.34 (6)
   175: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND fstat64@GLIBC_2.33 (11)
   178: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND exp2f@GLIBC_2.27 (9)
   184: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND pthread_setname_np@GLIBC_2.34 (6)
   199: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND pthread_getattr_np@GLIBC_2.32 (17)
   201: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND hypotf@GLIBC_2.35 (18)
189287: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND log@GLIBC_2.29
190733: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND pthread_setspecific@GLIBC_2.34
192098: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND memfd_create@GLIBC_2.27
194018: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND pthread_attr_getguardsize@GLIBC_2.34
195146: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND powf@GLIBC_2.27
195239: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND dlopen@GLIBC_2.34
197000: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND dlclose@GLIBC_2.34
197651: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND pthread_create@GLIBC_2.34
198562: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND __libc_start_main@GLIBC_2.34
200832: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND pthread_attr_setstacksize@GLIBC_2.34
201647: 0000000000000000     0 FUNC    WEAK   DEFAULT  UND statx@GLIBC_2.28
201992: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND exp2@GLIBC_2.29
203619: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND pthread_attr_getstack@GLIBC_2.34
204059: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND lstat64@GLIBC_2.33
206685: 0000000000000000     0 FUNC    WEAK   DEFAULT  UND getrandom@GLIBC_2.25
206851: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND pthread_key_delete@GLIBC_2.34
208027: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND stat64@GLIBC_2.33
208307: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND pthread_getspecific@GLIBC_2.34
211088: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND shm_open@GLIBC_2.34
212057: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND pthread_join@GLIBC_2.34
212248: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND dlerror@GLIBC_2.34
216470: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND pthread_key_create@GLIBC_2.34
219861: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND fstatat64@GLIBC_2.33
221266: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND dlsym@GLIBC_2.34
222437: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND pthread_detach@GLIBC_2.34
222936: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND pow@GLIBC_2.29
223499: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND expf@GLIBC_2.27
225417: 0000000000000000     0 FUNC    WEAK   DEFAULT  UND posix_spawn_file_actions_addchdir_np@GLIBC_2.29
225464: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND shm_unlink@GLIBC_2.34
225976: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND fstat64@GLIBC_2.33
226348: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND exp2f@GLIBC_2.27
227531: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND pthread_setname_np@GLIBC_2.34
230540: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND pthread_getattr_np@GLIBC_2.32
230795: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND hypotf@GLIBC_2.35

@abey79 abey79 added the CLI Related to the Rerun CLI label Mar 14, 2024
@abey79 abey79 mentioned this pull request Mar 14, 2024
4 tasks
@abey79
Copy link
Contributor Author

abey79 commented Mar 14, 2024

Just to be sure, running the job on all supported platforms:
https://github.com/rerun-io/rerun/actions/runs/8282780022
https://github.com/rerun-io/rerun/actions/runs/8282784128
https://github.com/rerun-io/rerun/actions/runs/8282786031
https://github.com/rerun-io/rerun/actions/runs/8282789018
https://github.com/rerun-io/rerun/actions/runs/8282791856

All are ✅

❯ gcloud storage ls gs://rerun-builds/commit/65c8082/rerun-cli
gs://rerun-builds/commit/65c8082/rerun-cli/linux-arm64/
gs://rerun-builds/commit/65c8082/rerun-cli/linux-x64/
gs://rerun-builds/commit/65c8082/rerun-cli/macos-arm64/
gs://rerun-builds/commit/65c8082/rerun-cli/macos-x64/
gs://rerun-builds/commit/65c8082/rerun-cli/windows-x64/

@Wumpf Wumpf self-requested a review March 14, 2024 16:30
Copy link
Member

@Wumpf Wumpf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looking good!

.github/workflows/on_push_main.yml Outdated Show resolved Hide resolved
@Wumpf Wumpf merged commit 56bb2ea into main Mar 14, 2024
19 of 21 checks passed
@Wumpf Wumpf deleted the antoine/cli-linux-arm64 branch March 14, 2024 16:32
@abey79 abey79 mentioned this pull request Mar 14, 2024
5 tasks
abey79 added a commit that referenced this pull request Mar 18, 2024
### What

Build linux-aarch64 wheels (with manylinux_2_31) and fixes the C and CLI
builds to bring the min required glibc version to 2.31.

**Note**: cursory inspection indicates that the _actual_ min glibc
version 2.29. However, we don't formally test that. The only test is
done by `maturin` on our wheels, against the `manylinux_2_31` standard.

Amongst other things, this PR:
- updates our ci docker image to be compatible with aarch64 (#5543 –
thanks @jleibs)
- remove all instances of double GCS authentication (our setup-rust
action auth to GCS, so an explicit auth isn't necessary, _and_ would
break cleanup in linux-arm/cli build workflow—why there only is unclear)
- use it for all linux-aarch64 builds
- fixes `pixi.toml` for linux-aarch64 compatibility
- bumps pixi to 0.16.1 everywhere in the ci
- adds a manual trigger for building wheels
- (mostly) unifies the target naming scheme

#### Related

- Follow-up to:
  - #5489 
  - #5503 
- Closes #4136 
- Fixes #5507

#### Further work
- ~~support lower glibc version:
#5512
- test more wheels: #5525

### Checklist
* [x] I have read and agree to [Contributor
Guide](https://github.com/rerun-io/rerun/blob/main/CONTRIBUTING.md) and
the [Code of
Conduct](https://github.com/rerun-io/rerun/blob/main/CODE_OF_CONDUCT.md)
* [x] I've included a screenshot or gif (if applicable)
* [x] I have tested the web demo (if applicable):
* Using newly built examples:
[app.rerun.io](https://app.rerun.io/pr/5511/index.html)
* Using examples from latest `main` build:
[app.rerun.io](https://app.rerun.io/pr/5511/index.html?manifest_url=https://app.rerun.io/version/main/examples_manifest.json)
* Using full set of examples from `nightly` build:
[app.rerun.io](https://app.rerun.io/pr/5511/index.html?manifest_url=https://app.rerun.io/version/nightly/examples_manifest.json)
* [x] The PR title and labels are set such as to maximize their
usefulness for the next release's CHANGELOG
* [x] If applicable, add a new check to the [release
checklist](https://github.com/rerun-io/rerun/blob/main/tests/python/release_checklist)!

- [PR Build Summary](https://build.rerun.io/pr/5511)
- [Docs
preview](https://rerun.io/preview/c029b411730d035b9babdba3f9721dbe2905196b/docs)
<!--DOCS-PREVIEW-->
- [Examples
preview](https://rerun.io/preview/c029b411730d035b9babdba3f9721dbe2905196b/examples)
<!--EXAMPLES-PREVIEW-->
- [Recent benchmark results](https://build.rerun.io/graphs/crates.html)
- [Wasm size tracking](https://build.rerun.io/graphs/sizes.html)

---------

Co-authored-by: Jeremy Leibs <jeremy@rerun.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants