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

[build arm64 broken] unknown directive: toolchain #2

Open
thatguyatgithub opened this issue Apr 8, 2024 · 0 comments
Open

[build arm64 broken] unknown directive: toolchain #2

thatguyatgithub opened this issue Apr 8, 2024 · 0 comments

Comments

@thatguyatgithub
Copy link

thatguyatgithub commented Apr 8, 2024

Hi. It looks like build-arm target is broken when building natively on an aarch64 host, but not when cross-building on an amd64 host:

make build-arm
docker buildx build --target=image --platform=linux/arm64 --output=type=docker,name=molnett/cert-manager-webhook-gandi:0.2.2 --tag=molnett/cert-manager-webhook-gandi:latest --build-arg=GO_VERSION=1.20 .
[+] Building 2.4s (11/14)                                                                                                                                                    docker:default
 => [internal] load build definition from Dockerfile                                                                                                                                   0.0s
 => => transferring dockerfile: 769B                                                                                                                                                   0.0s
 => [internal] load .dockerignore                                                                                                                                                      0.0s
 => => transferring context: 255B                                                                                                                                                      0.0s
 => resolve image config for docker.io/docker/dockerfile:1.3                                                                                                                           0.4s
 => CACHED docker-image://docker.io/docker/dockerfile:1.3@sha256:42399d4635eddd7a9b8a24be879d2f9a930d0ed040a61324cfdf59ef1357b3b2                                                      0.0s
 => [internal] load metadata for docker.io/library/golang:1.20-alpine                                                                                                                  0.8s
 => [auth] library/golang:pull token for registry-1.docker.io                                                                                                                          0.0s
 => [base 1/4] FROM docker.io/library/golang:1.20-alpine@sha256:e47f121850f4e276b2b210c56df3fda9191278dd84a3a442bfe0b09934462a8f                                                       0.0s
 => [internal] load build context                                                                                                                                                      0.0s
 => => transferring context: 51.30kB                                                                                                                                                   0.0s
 => CACHED [base 2/4] WORKDIR /go/src/cert-manager-webhook-gandi                                                                                                                       0.0s
 => [base 3/4] COPY go.* .                                                                                                                                                             0.0s
 => ERROR [base 4/4] RUN --mount=type=cache,target=/go/pkg/mod     apk add --no-cache git ca-certificates &&     go mod download                                                       1.0s
------                                                                                                                                                                                      
 > [base 4/4] RUN --mount=type=cache,target=/go/pkg/mod     apk add --no-cache git ca-certificates &&     go mod download:                                                                  
0.262 fetch https://dl-cdn.alpinelinux.org/alpine/v3.19/main/aarch64/APKINDEX.tar.gz                                                                                                        
0.392 fetch https://dl-cdn.alpinelinux.org/alpine/v3.19/community/aarch64/APKINDEX.tar.gz                                                                                                   
0.699 (1/9) Installing brotli-libs (1.1.0-r1)                                                                                                                                               
0.711 (2/9) Installing c-ares (1.27.0-r0)                                                                                                                                                   
0.714 (3/9) Installing libunistring (1.1-r2)
0.727 (4/9) Installing libidn2 (2.3.4-r4)
0.734 (5/9) Installing nghttp2-libs (1.58.0-r0)
0.739 (6/9) Installing libcurl (8.5.0-r0)
0.747 (7/9) Installing libexpat (2.6.2-r0)
0.750 (8/9) Installing pcre2 (10.42-r2)
0.758 (9/9) Installing git (2.43.0-r0)
0.815 Executing busybox-1.36.1-r15.trigger
0.823 OK: 20 MiB in 25 packages
0.956 go: errors parsing go.mod:
0.956 /go/src/cert-manager-webhook-gandi/go.mod:5: unknown directive: toolchain
------
Dockerfile:8
--------------------
   7 |     
   8 | >>> RUN --mount=type=cache,target=/go/pkg/mod \
   9 | >>>     apk add --no-cache git ca-certificates && \
  10 | >>>     go mod download
  11 |     
--------------------
ERROR: failed to solve: process "/bin/sh -c apk add --no-cache git ca-certificates &&     go mod download" did not complete successfully: exit code: 1
make: *** [Makefile:44: build-arm] Error 1
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