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

ci(release): add aarch64-unknown-linux-musl #146

Merged
merged 6 commits into from
Dec 20, 2024

Conversation

loicreynier
Copy link
Contributor

Add a aarch64-unknown-linux-musl binary to the CI release builds.

Successful workflow run and build artifacts can be found here.

I've tested successfully the typos-lsp binary however I am not able to test the .vsix package.

Close #145.

@loicreynier
Copy link
Contributor Author

I couldn't get it to work without using taiki-e/setup-cross-toolchain-action@v1. Here's the error I encountered. I attempted to manually install the ARM/Musl dependencies from apt and configure rustup to use this target, but I was unsuccessful.

to resolve

  = note: /usr/bin/ld: /home/runner/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/aarch64-unknown-linux-musl/lib/self-contained/crt1.o: Relocations in generic ELF (EM: 183)
          /usr/bin/ld: /home/runner/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/aarch64-unknown-linux-musl/lib/self-contained/crt1.o: Relocations in generic ELF (EM: 183)
          /usr/bin/ld: /home/runner/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/aarch64-unknown-linux-musl/lib/self-contained/crt1.o: Relocations in generic ELF (EM: 183)
          /usr/bin/ld: /home/runner/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/aarch64-unknown-linux-musl/lib/self-contained/crt1.o: Relocations in generic ELF (EM: 183)
          /usr/bin/ld: /home/runner/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/aarch64-unknown-linux-musl/lib/self-contained/crt1.o: Relocations in generic ELF (EM: 183)
          /usr/bin/ld: /home/runner/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/aarch64-unknown-linux-musl/lib/self-contained/crt1.o: Relocations in generic ELF (EM: 183)
          /usr/bin/ld: /home/runner/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/aarch64-unknown-linux-musl/lib/self-contained/crt1.o: Relocations in generic ELF (EM: 183)
          /usr/bin/ld: /home/runner/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/aarch64-unknown-linux-musl/lib/self-contained/crt1.o: error adding symbols: file in wrong format
          collect2: error: ld returned 1 exit status
@tekumara
Copy link
Owner

Thanks for testing this - I've pushed a commit that uses the gcc linker and ubuntu 20.04, to be consistent with what I use for the gnu binaries. Could you try on your release workflow and see if it works?

@loicreynier
Copy link
Contributor Author

Tested here. It seems it cannot find the linker, maybe an apt install musl-gcc would help:

warning: `typos-lsp` (lib) generated 3 warnings
error: linker `aarch64-linux-musl-gcc` not found
  |
  = note: No such file or directory (os error 2)

error: could not compile `typos-lsp` (bin "typos-lsp") due to 1 previous error

@tekumara
Copy link
Owner

Yep I think you're right - we need to install gcc-aarch64-linux-gnu, see my latest commit. I think that should work.

@tekumara
Copy link
Owner

however I am not able to test the .vsix package.

Do you need a .vsix package or just the binary?

@loicreynier
Copy link
Contributor Author

Yep I think you're right - we need to install gcc-aarch64-linux-gnu, see my latest commit. I think that should work.

Yes it works! Just tested the workflow and the binary.

Do you need a .vsix package or just the binary?

I personally do not need the .vsix package.

@tekumara
Copy link
Owner

tekumara commented Dec 20, 2024

Awesome thanks for PR and for your testing help!

@tekumara tekumara merged commit 7bf3266 into tekumara:main Dec 20, 2024
2 checks passed
tekumara pushed a commit that referenced this pull request Dec 20, 2024
🤖 I have created a release *beep* *boop*
---


##
[0.1.32](v0.1.31...v0.1.32)
(2024-12-20)


### Features

* **typos:** version 1.28.3
([#143](#143))
([084b00d](084b00d))
* **typos:** version 1.28.4
([#144](#144))
([4f3c534](4f3c534))


### Builds

* **auto-merge:** simplify
([40b75b7](40b75b7))
* **cargo:** remove deprecated ar field
([7d2cef0](7d2cef0))
* **release-please:** add ci section
([ec41340](ec41340))
* **release:** add `aarch64-unknown-linux-musl`
([#146](#146))
([7bf3266](7bf3266))
* **release:** use musl binary in linux-arm64 vsix
([5ccec8f](5ccec8f))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: potatobot-prime[bot] <132267321+potatobot-prime[bot]@users.noreply.github.com>
@loicreynier loicreynier deleted the ci/release-aarch64-musl branch December 20, 2024 12:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Release aarch64-unknown-linux-musl
2 participants