Skip to content

Build of linuxkit for Darwin/arm64 (Apple M1) fails #3626

@deitch

Description

@deitch

Description

Build of linuxkit binary for Apple M1 fails

Steps to reproduce the issue:

Just try to build while running on Mac M1. To reproduce in more detail, try

tar cf - -C src/cmd/linuxkit . | docker run --rm --net=none --log-driver=none -I -e GOARCH=arm64 -e GOOS=darwin linuxkit/go-compile:6d73c4723ae2b58af22e3736b2b0f0292e18eb6d --package github.com/linuxkit/linuxkit/src/cmd/linuxkit -o bin/linuxkit > tmp_linuxkit_bin.tar

Describe the results you received:

go build...
# github.com/linuxkit/linuxkit/src/cmd/linuxkit
/usr/lib/go/pkg/tool/linux_amd64/link: running gcc failed: exit status 1
/usr/lib/gcc/x86_64-alpine-linux-musl/9.2.0/../../../../x86_64-alpine-linux-musl/bin/ld: unrecognized option '-pagezero_size'
/usr/lib/gcc/x86_64-alpine-linux-musl/9.2.0/../../../../x86_64-alpine-linux-musl/bin/ld: use the --help option for usage information
collect2: error: ld returned 1 exit status

Describe the results you expected:

It should build.

Additional information you deem important (e.g. issue happens only occasionally):

This appears to happen because the version of go-compile we use in the Makefile is linuxkit/go-compile: 6d73c4723ae2b58af22e3736b2b0f0292e18eb6d , which has go1.13 in it, which does not have support for darwin/arm64.

We need to bump to go1.16 for this to work.

cc @vmlemon

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