Skip to content

Conversation

@YusukeShimizu
Copy link
Contributor

Enable multi-architecture support to ensure proper protoc downloads based on the build environment.
This fixes issues on Apple Silicon (ARM64) where the x86_64 binary was previously being downloaded,
leading to the missing ld-linux-x86-64.so.2 error.

  • Use the same protocol buffer compiler version across architectures
  • Ensure Docker build success on Apple Silicon

@YusukeShimizu YusukeShimizu marked this pull request as draft April 13, 2025 01:30
@cdecker
Copy link
Collaborator

cdecker commented Apr 15, 2025

Very good contribution. I am surprised that the arch is passed through to the docker emulation directly, and not using qemu with x86 or x86_64. Today I learned :-)

If you undraft I will merge this asap ^^

@YusukeShimizu
Copy link
Contributor Author

YusukeShimizu commented Apr 16, 2025

Thank you for confirming. I realized that this change was not enough to build on arm64.
To support building on ARM64, not only protoc but also all dependent binaries—such as bitcoin-core, cfssl, and cln—must be similarly addressed. In particular, cln (clm-vm) does not currently provide an ARM64 binary, raising concerns about increased support and maintenance costs.

Abandoning this approach and instead updating the make command to force emulation by specifying --platform linux/amd64 at build time is a simpler solution. However, running an Intel-based container on an Arm-based machine remains a best-effort measure, with associated risks of performance degradation and potential bugs.

I would appreciate your feedback.

@cdecker
Copy link
Collaborator

cdecker commented Apr 16, 2025

Indeed, we have been developing exclusively on amd64, and adding other archs, distros, and OSs may be a lot of surface. Parametrizing the binaries being downloaded is an excellent first step, and may be sufficient. Let's see if it works out :-)

@YusukeShimizu YusukeShimizu marked this pull request as ready for review April 16, 2025 12:38
@YusukeShimizu
Copy link
Contributor Author

I removed the draft status from this PR.

@cdecker cdecker enabled auto-merge (rebase) April 20, 2025 11:36
Enable multi-architecture support to ensure proper
protoc downloads based on the build environment.
This fixes issues on Apple Silicon (ARM64) where the x86_64
binary was previously being downloaded,
leading to the missing ld-linux-x86-64.so.2 error.

* Use the same protocol buffer compiler version across architectures
* Ensure Docker build success on Apple Silicon
@cdecker cdecker force-pushed the protoc-apple-silicon branch from 2ca0730 to f76ba46 Compare April 20, 2025 11:36
@cdecker cdecker merged commit 5a9d9ea into Blockstream:main Apr 21, 2025
11 checks passed
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.

2 participants