Add Linux LoongArch 64-bit support - #394
Conversation
|
Hello, thank you for the PR. As you've seen, this repo cross-compiles libvips binaries for various platforms and architectures. However the sharp repo uses QEMU-based emulation via uraimo/run-on-arch-action where native builds are unavailable. This does not currently support LoongArch CPUs so I am unable to merge and support this change at present. |
Thank you. LoongArch64 support has now been merged and released in https://github.com/uraimo/run-on-arch-action/releases/tag/v3.2.0 The action's LoongArch64 CI is passing: https://github.com/uraimo/run-on-arch-action/actions/runs/32153980328 I will also prepare an end-to-end sharp QEMU build using a glibc |
lovell
left a comment
There was a problem hiding this comment.
Can we use one of the container images from https://github.com/loong64#docker-images for building binaries under QEMU in the sharp repo?
| @@ -0,0 +1,65 @@ | |||
| FROM ubuntu:24.04 | |||
There was a problem hiding this comment.
Can we use Debian here, perhaps 12 (bookworm, glibc 2.36) or 13 (trixie, glibc 2.41)?
This comment was marked as outdated.
This comment was marked as outdated.
Sorry, something went wrong.
|
I'd prefer that we use the same libc version for both the cross-compilation of sharp-libvips and the QEMU-emulated native compilation of sharp. It looks like https://github.com/loong64/docker-library provides native Alpine and Debian, but cross-compiling on Debian seems more complex. Perhaps we should use Alpine instead? Is this a common choice for LoongArch users? |
|
@lovell |
Summary
Add prebuilt libvips support for Linux LoongArch 64-bit (
linux-loong64).Changes
loongarch64-unknown-linux-gnutarget.@img/sharp-libvips-linux-loong64npm package.linux-loong64to the build script, CI matrix, npm workspaces and documentation.Validation
linux-loong64cross-build on an x86_64 Ubuntu host.libstdc++.so.6libm.so.6libgcc_s.so.1libc.so.6ld-linux-loongarch-lp64d.so.1vips_init()returned0vips_version()returned8.18.5build-linux-loong64GitHub Actions job completed successfully and uploaded itsartifact.
CI validation run:
https://github.com/cheungxi/sharp-libvips/actions/runs/32037607798