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

Support Linux aarch64 builds #230

Merged
merged 20 commits into from
Oct 24, 2022
Merged

Support Linux aarch64 builds #230

merged 20 commits into from
Oct 24, 2022

Conversation

leighmcculloch
Copy link
Member

@leighmcculloch leighmcculloch commented Oct 24, 2022

What

Support Linux aarch64 binary releases.

Why

Close #228

@leighmcculloch
Copy link
Member Author

error: failed to run custom build command for `ring v0.16.20`
[137](https://github.com/stellar/soroban-cli/actions/runs/3315089594/jobs/5475218742#step:6:138)

[138](https://github.com/stellar/soroban-cli/actions/runs/3315089594/jobs/5475218742#step:6:139)
Caused by:
[139](https://github.com/stellar/soroban-cli/actions/runs/3315089594/jobs/5475218742#step:6:140)
  process didn't exit successfully: `/home/runner/work/soroban-cli/soroban-cli/target/debug/build/ring-2f35fc42f14907c0/build-script-build` (exit status: 101)
[140](https://github.com/stellar/soroban-cli/actions/runs/3315089594/jobs/5475218742#step:6:141)
  --- stdout
[141](https://github.com/stellar/soroban-cli/actions/runs/3315089594/jobs/5475218742#step:6:142)
  OPT_LEVEL = Some("0")
[142](https://github.com/stellar/soroban-cli/actions/runs/3315089594/jobs/5475218742#step:6:143)
  TARGET = Some("aarch64-unknown-linux-gnu")
[143](https://github.com/stellar/soroban-cli/actions/runs/3315089594/jobs/5475218742#step:6:144)
  HOST = Some("x86_64-unknown-linux-gnu")
[144](https://github.com/stellar/soroban-cli/actions/runs/3315089594/jobs/5475218742#step:6:145)
  CC_aarch64-unknown-linux-gnu = None
[145](https://github.com/stellar/soroban-cli/actions/runs/3315089594/jobs/5475218742#step:6:146)
  CC_aarch64_unknown_linux_gnu = None
[146](https://github.com/stellar/soroban-cli/actions/runs/3315089594/jobs/5475218742#step:6:147)
  TARGET_CC = None
[147](https://github.com/stellar/soroban-cli/actions/runs/3315089594/jobs/5475218742#step:6:148)
  CC = None
[148](https://github.com/stellar/soroban-cli/actions/runs/3315089594/jobs/5475218742#step:6:149)
  CROSS_COMPILE = None
[149](https://github.com/stellar/soroban-cli/actions/runs/3315089594/jobs/5475218742#step:6:150)
  CFLAGS_aarch64-unknown-linux-gnu = None
[150](https://github.com/stellar/soroban-cli/actions/runs/3315089594/jobs/5475218742#step:6:151)
  CFLAGS_aarch64_unknown_linux_gnu = None
[151](https://github.com/stellar/soroban-cli/actions/runs/3315089594/jobs/5475218742#step:6:152)
  TARGET_CFLAGS = None
[152](https://github.com/stellar/soroban-cli/actions/runs/3315089594/jobs/5475218742#step:6:153)
  CFLAGS = None
[153](https://github.com/stellar/soroban-cli/actions/runs/3315089594/jobs/5475218742#step:6:154)
  CRATE_CC_NO_DEFAULTS = None
[154](https://github.com/stellar/soroban-cli/actions/runs/3315089594/jobs/5475218742#step:6:155)
  DEBUG = Some("true")
[155](https://github.com/stellar/soroban-cli/actions/runs/3315089594/jobs/5475218742#step:6:156)
  CARGO_CFG_TARGET_FEATURE = Some("neon,pmuv3")
[156](https://github.com/stellar/soroban-cli/actions/runs/3315089594/jobs/5475218742#step:6:157)

[157](https://github.com/stellar/soroban-cli/actions/runs/3315089594/jobs/5475218742#step:6:158)
  --- stderr
[158](https://github.com/stellar/soroban-cli/actions/runs/3315089594/jobs/5475218742#step:6:159)
  running "sccache" "aarch64-linux-gnu-gcc" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-g" "-fno-omit-frame-pointer" "-I" "include" "-Wall" "-Wextra" "-pedantic" "-pedantic-errors" "-Wall" "-Wextra" "-Wcast-align" "-Wcast-qual" "-Wconversion" "-Wenum-compare" "-Wfloat-equal" "-Wformat=2" "-Winline" "-Winvalid-pch" "-Wmissing-field-initializers" "-Wmissing-include-dirs" "-Wredundant-decls" "-Wshadow" "-Wsign-compare" "-Wsign-conversion" "-Wundef" "-Wuninitialized" "-Wwrite-strings" "-fno-strict-aliasing" "-fvisibility=hidden" "-fstack-protector" "-g3" "-DNDEBUG" "-c" "-o/home/runner/work/soroban-cli/soroban-cli/target/aarch64-unknown-linux-gnu/debug/build/ring-1e4aeea041912bba/out/aesv8-armx-linux64.o" "/home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/ring-0.16.20/pregenerated/aesv8-armx-linux64.S"
[159](https://github.com/stellar/soroban-cli/actions/runs/3315089594/jobs/5475218742#step:6:160)
  sccache: error: failed to execute compile
[160](https://github.com/stellar/soroban-cli/actions/runs/3315089594/jobs/5475218742#step:6:161)
  sccache: caused by: cannot find binary path
[161](https://github.com/stellar/soroban-cli/actions/runs/3315089594/jobs/5475218742#step:6:162)
  thread 'main' panicked at 'execution failed', /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/ring-0.16.20/build.rs:656:9

@leighmcculloch
Copy link
Member Author

There appears to be a variety of issues relating to cross-compiling ring and aarch64: https://github.com/briansmith/ring/issues?q=is%3Aissue+is%3Aopen+aarch64

@leighmcculloch
Copy link
Member Author

It looks like the warp web framework we're using pulls in rusttls and doesn't provide any flexibility on what tls solution is used. There's an issue open on the warp repo about changing their tls impl from 2019, but no engagement on that issue (seanmonstar/warp#189).

It also looks like the jsonrpsee framework we're using pulls in ring too.

In 9f34f6b I've disabled the tls features of both, and that removes the ring dependency and it now builds on Linux aarch64 just fine.

Removing tls from warp is no big deal, as it doesn't need it. Removing tls from jsonrpsee is not a problem today because the rpc server is always local, but it would be a problem when we deploy a remote one since https would be required then. So this probably isn't a viable alternative.

@leighmcculloch
Copy link
Member Author

Woohoo. So the problem isn't ring, the problem was the linker setup.

@leighmcculloch leighmcculloch marked this pull request as ready for review October 24, 2022 22:06
@leighmcculloch leighmcculloch enabled auto-merge (squash) October 24, 2022 23:09
@leighmcculloch leighmcculloch merged commit 5147934 into main Oct 24, 2022
@leighmcculloch leighmcculloch deleted the linux-aarch64 branch October 24, 2022 23:14
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.

Support releases on Linux aarch64
1 participant