Answer the question
In order to leave comments, you need to log in
Building a service in Golang on a Mac m1 chip?
I'm trying to build a service written in Golang using Apache Kafka on a poppy with an m1 chip. error during build: => ERROR [builder 7/7] RUN go build -a -ldflags '-extldflags "-static"' -tags musl -o /g 16.9s
------
> [builder 7/ 7] RUN go build -a -ldflags '-extldflags "-static"' -tags musl -o /go/bin/video:
#14 16.21 # github.com/confluentinc/confluent-kafka-go/kafka
#14 16.21 / usr/lib/gcc/aarch64-alpine-linux-musl/10.2.1/../../../../aarch64-alpine-linux-musl/bin/ld: /go/pkg/mod/github .com/confluentinc/[email protected]/kafka/librdkafka/librdkafka_musl_linux.a(rdkafka_error.o): Relocations in generic ELF (EM: 62)
#14 16.21 /usr/lib/gcc/aarch64-alpine-linux-musl/10.2.1/../../../../aarch64-alpine-linux-musl/bin/ld: /go/pkg /mod/github.com/confluentinc/[email protected]/kafka/librdkafka/librdkafka_musl_linux.a(rdkafka_error.o): Relocations in generic ELF (EM: 62)
#14 16.21 /usr/lib/gcc /aarch64-alpine-linux-musl/10.2.1/../../../../aarch64-alpine-linux-musl/bin/ld: /go/pkg/mod/github.com/confluentinc/ [email protected]/kafka/librdkafka/librdkafka_musl_linux.a: error adding symbols: file in wrong format
#14 16.21 collect2: error: ld returned 1 exit status
------
executor failed running [/bin /sh -c go build -a -ldflags '-extldflags "-static"' -tags musl -o /go/bin/video]: exit code: 2
I suspect that it's just the architecture of the processor. But how can this error be overcome?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question