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

Aula 1 - Erro ao compilar simulador em arm64 (Macbook M1) - com sugestão #1

Open
pedrosfigueiredo opened this issue Oct 18, 2022 · 0 comments

Comments

@pedrosfigueiredo
Copy link

Ao tentar rodar o simulador no container do Go conforme o Dockerfile do projeto encontrei o seguinte erro:

# github.com/confluentinc/confluent-kafka-go/kafka
/usr/bin/ld: ../pkg/mod/github.com/confluentinc/[email protected]/kafka/librdkafka_vendor/librdkafka_glibc_linux.a(rdkafka_error.o): Relocations in generic ELF (EM: 62)
/usr/bin/ld: ../pkg/mod/github.com/confluentinc/[email protected]/kafka/librdkafka_vendor/librdkafka_glibc_linux.a(rdkafka_error.o): Relocations in generic ELF (EM: 62)
/usr/bin/ld: ../pkg/mod/github.com/confluentinc/[email protected]/kafka/librdkafka_vendor/librdkafka_glibc_linux.a: error adding symbols: file in wrong format
collect2: error: ld returned 1 exit status

Estou utilizando um Mac M1 e por isso o Docker faz o build da imagem na arquitetura linux/arm64, o que parece ser a raiz do problema.

Caso alguém encontre o mesmo problema, a seguinte modificação no Dockerfile corrigiu o problema:

services:
  app:
    platform: linux/amd64
    build:
      context: .
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