Skip to content

devcontainer: add x86_64 OpenSSL dev libs for cross-compilation#3095

Merged
snormore merged 1 commit intomainfrom
snor/devcontainer-openssl-cross
Feb 24, 2026
Merged

devcontainer: add x86_64 OpenSSL dev libs for cross-compilation#3095
snormore merged 1 commit intomainfrom
snor/devcontainer-openssl-cross

Conversation

@snormore
Copy link
Contributor

Summary of Changes

  • Add libssl-dev:amd64 and enable dpkg multi-arch support in the devcontainer so openssl-sys (required by Solana SDK 2.3.x's solana-secp256r1-program) can build when cross-compiling from arm64 to x86_64
  • Set PKG_CONFIG_ALLOW_CROSS=1 so pkg-config returns x86_64 results during cross-compilation
  • Cross-compilation started failing after deps: upgrade solana sdk from 2.2.7 to 2.3.x #3076 introduced the solana-secp256r1-program dependency

Diff Breakdown

Category Files Lines (+/-) Net
Config/build 1 +7 / -3 +4

Small, focused build-environment fix.

Key files (click to expand)
  • .devcontainer/Dockerfile — add amd64 architecture, install libssl-dev:amd64, set PKG_CONFIG_ALLOW_CROSS=1

Testing Verification

  • Verified goreleaser cross-compilation succeeds for x86_64 targets on arm64 devcontainer

The Solana SDK 2.3.x upgrade introduced a dependency on
solana-secp256r1-program which requires openssl-sys. This breaks
goreleaser cross-compilation on arm64 devcontainers targeting x86_64.

Add libssl-dev:amd64 and set PKG_CONFIG_ALLOW_CROSS=1 so the
openssl-sys build script can find the x86_64 OpenSSL headers.
Copy link
Contributor

@juan-malbeclabs juan-malbeclabs left a comment

Choose a reason for hiding this comment

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

LGTM

@snormore snormore merged commit d9f7441 into main Feb 24, 2026
41 of 55 checks passed
@snormore snormore deleted the snor/devcontainer-openssl-cross branch February 24, 2026 21:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants