Skip to content

Replace Cross Toolchain with Native aarch64 Builder #1327

@c-kruse

Description

@c-kruse

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"'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions