Coder Social home page Coder Social logo

Enable building on arm64 about ztunnel HOT 9 CLOSED

howardjohn avatar howardjohn commented on July 1, 2024
Enable building on arm64

from ztunnel.

Comments (9)

yuval-k avatar yuval-k commented on July 1, 2024 2

we can also consider an approach similar to github.com/cloudflare/quiche, where we embed boring in this crate, so we don't need to set env vars for dependant crates (so that users won't need to remove the env vars manually, as specified in the readme)
https://github.com/cloudflare/quiche/blob/master/quiche/src/build.rs

from ztunnel.

ilrudie avatar ilrudie commented on July 1, 2024

I have an M2 Mac and could work on this

from ztunnel.

thesurlydev avatar thesurlydev commented on July 1, 2024

Isn't this a dupe of #1 ?

from ztunnel.

ilrudie avatar ilrudie commented on July 1, 2024

Could be. I have an intel mac I can try to confirm if its MacOS or M1/ARM that's the issue.

from ztunnel.

ilrudie avatar ilrudie commented on July 1, 2024

ARM could also be for something like graviton support not just m1/macos as well

from ztunnel.

stevenctl avatar stevenctl commented on July 1, 2024

Allow developers using arm machines to contribute.
May also be required in some production environments.

from ztunnel.

howardjohn avatar howardjohn commented on July 1, 2024

#139

from ztunnel.

bleggett avatar bleggett commented on July 1, 2024

@yuval-k Thx for the hint - quiche's strategy unfortunately doesn't work with boring 2.1.0 - only with 2.0.0, due to changes in build.rs for boring-sys which seem to break the ability to conditionally vendor binaries: https://github.com/cloudflare/boring/blob/master/boring-sys/build.rs#L330

Additionally, the build.rs mechanism boring-sys is using to auto-build boringssl doesn't seem to work if you install boring-sys as a normal Cargo dep - only as a Gitref dep.

Seems as if realistically we either

  • have to vendor for every supported target arch/platform by default
  • we vendor for no platforms and we're back to people having to care about specific clang versions in their env by default.

Neither option is particularly compelling.

Third option is we write a build.sh wrapper, I guess.

from ztunnel.

bleggett avatar bleggett commented on July 1, 2024

Adding this as a ref - cloudflare/boring#97

A clang environmental dep in our build-tools might be a reasonable workaround once that is in upstream - our current build-tools image is too new for clang-7, which is what the pinned version of boringssl that boring-sys tries to autobuild (when installed as a Gitref dep via cargo) currently requires.

When that merges we should be good with

  1. Installing clang-12 in our build-tools image - clang 12 is available for both arm64 and amd64 in our current build image distro, at least.

  2. Adding boring-sys as a Gitref patch dep in cargo.toml:

[patch.crates-io]
boring-sys = { git = "https://github.com/cloudflare/boring", tag = "v2.1.0"  }
  1. Letting boring-sys build the fips/non-fips binaries itself, respecting the host arch.

EDIT: Oh right, that's what this is: https://github.com/istio/ztunnel/blob/master/vendor/boringssl-fips/linux_x86_64/Dockerfile.v1 - because the Ubuntu clang is v12, but the minor version is different, so it's not a blessed FIPS version.

from ztunnel.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.