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

Replace Cross Toolchain with Native aarch64 Builder #1327

Open
c-kruse opened this issue Nov 9, 2023 · 0 comments
Open

Replace Cross Toolchain with Native aarch64 Builder #1327

c-kruse opened this issue Nov 9, 2023 · 0 comments

Comments

@c-kruse
Copy link
Contributor

c-kruse commented Nov 9, 2023

The way #1321 is going, we're going to introduce a musl-targeting C toolchain for each of our linux fips platforms (linux_amd64 and linux_arm64).

Building the toolchain from source in CI has a number of issues. Primarily, though, the issue is that it will be flaky. Downloading the source of gcc, musl, and a half dozen c libraries from miscellaneous mirrors is not always quick, and the mirrors seem to be less than reliable. If this becomes a huge issue we could find a way to cache sources and or the whole toolchain ourselves.

It'd be better to nix the idea of building our own toolchains all-together, and simply use the toolchain that comes packaged with alpine linux, alpine-sdk (native only.) When we get access to aarch64 builders we can tear out all of the toolchain building infrastructure and run the same make command but in an alpine container. A very crude and likely non-functional version of this may look like this:

docker run --rm -v $repo-root:/work -w /work golang:1.20.10-alpine3.18 \
    /bin/sh \
    -c 'apk add alpine-sdk && make otelcol-sumo-linux_amd64 -C ./otelcolbuilder CGO_ENABLED=1 FIPS_SUFFIX="-fips"'
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

No branches or pull requests

1 participant