You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I use github.com/confluentinc/confluent-kafka-go/v2@v2.3.0 in my project, which needs to be compiled on arm64 machine.
I use the go build command to build the binary, like:
GOOS=linux CGO_ENABLED=1 GOARCH=arm64 go build -ldflags=-s -w -X 'main.BuildTime=' -X 'main.GitBranch=multi_arch' -X 'main.GitCommit=xxxxxxxxx' -X 'main.GoVersion=' -o output/backup-mgr cmd/mgr/main.go
The error messages are shown below:
/usr/local/go/pkg/tool/linux_arm64/link: running gcc failed: exit status 1
/opt/tiger/compile_path/pkg/mod/github.com/confluentinc/confluent-kafka-go/v2@v2.3.0/kafka/librdkafka_vendor/librdkafka_glibc_linux_arm64.a(rdkafka_mock.o): In function rd_kafka_mock_connection_write_out': (.text+0xd94): undefined reference to __aarch64_ldadd4_acq_rel'
/opt/tiger/compile_path/pkg/mod/github.com/confluentinc/confluent-kafka-go/v2@v2.3.0/kafka/librdkafka_vendor/librdkafka_glibc_linux_arm64.a(rdkafka_mock.o): In function rd_kafka_mock_connection_close': (.text+0xf60): undefined reference to __aarch64_ldadd4_acq_rel'
/opt/tiger/compile_path/pkg/mod/github.com/confluentinc/confluent-kafka-go/v2@v2.3.0/kafka/librdkafka_vendor/librdkafka_glibc_linux_arm64.a(rdkafka_mock.o): In function rd_kafka_mock_connection_close': (.text+0xf88): undefined reference to __aarch64_ldadd4_acq_rel'
/opt/tiger/compile_path/pkg/mod/github.com/confluentinc/confluent-kafka-go/v2@v2.3.0/kafka/librdkafka_vendor/librdkafka_glibc_linux_arm64.a(rdkafka_mock.o): In function rd_kafka_mock_cluster_thread_main': (.text+0x11f0): undefined reference to __aarch64_ldadd4_acq_rel'
/opt/tiger/compile_path/pkg/mod/github.com/confluentinc/confluent-kafka-go/v2@v2.3.0/kafka/librdkafka_vendor/librdkafka_glibc_linux_arm64.a(rdkafka_mock.o): In function rd_kafka_mock_cluster_thread_main': (.text+0x130c): undefined reference to __aarch64_ldadd4_acq_rel'
/opt/tiger/compile_path/pkg/mod/github.com/confluentinc/confluent-kafka-go/v2@v2.3.0/kafka/librdkafka_vendor/librdkafka_glibc_linux_arm64.a(rdkafka_mock.o):(.text+0x14f0): more undefined references to __aarch64_ldadd4_acq_rel' follow /opt/tiger/compile_path/pkg/mod/github.com/confluentinc/confluent-kafka-go/v2@v2.3.0/kafka/librdkafka_vendor/librdkafka_glibc_linux_arm64.a(rdkafka_txnmgr.o): In function rd_kafka_txn_op_commit_transaction.part.0':
(.text+0x4170): undefined reference to `__aarch64_ldadd8_acq_rel'
Description
I use github.com/confluentinc/confluent-kafka-go/v2@v2.3.0 in my project, which needs to be compiled on arm64 machine.
I use the go build command to build the binary, like:
GOOS=linux CGO_ENABLED=1 GOARCH=arm64 go build -ldflags=-s -w -X 'main.BuildTime=' -X 'main.GitBranch=multi_arch' -X 'main.GitCommit=xxxxxxxxx' -X 'main.GoVersion=' -o output/backup-mgr cmd/mgr/main.go
The error messages are shown below:
/usr/local/go/pkg/tool/linux_arm64/link: running gcc failed: exit status 1
/opt/tiger/compile_path/pkg/mod/github.com/confluentinc/confluent-kafka-go/v2@v2.3.0/kafka/librdkafka_vendor/librdkafka_glibc_linux_arm64.a(rdkafka_mock.o): In function
rd_kafka_mock_connection_write_out': (.text+0xd94): undefined reference to
__aarch64_ldadd4_acq_rel'/opt/tiger/compile_path/pkg/mod/github.com/confluentinc/confluent-kafka-go/v2@v2.3.0/kafka/librdkafka_vendor/librdkafka_glibc_linux_arm64.a(rdkafka_mock.o): In function
rd_kafka_mock_connection_close': (.text+0xf60): undefined reference to
__aarch64_ldadd4_acq_rel'/opt/tiger/compile_path/pkg/mod/github.com/confluentinc/confluent-kafka-go/v2@v2.3.0/kafka/librdkafka_vendor/librdkafka_glibc_linux_arm64.a(rdkafka_mock.o): In function
rd_kafka_mock_connection_close': (.text+0xf88): undefined reference to
__aarch64_ldadd4_acq_rel'/opt/tiger/compile_path/pkg/mod/github.com/confluentinc/confluent-kafka-go/v2@v2.3.0/kafka/librdkafka_vendor/librdkafka_glibc_linux_arm64.a(rdkafka_mock.o): In function
rd_kafka_mock_cluster_thread_main': (.text+0x11f0): undefined reference to
__aarch64_ldadd4_acq_rel'/opt/tiger/compile_path/pkg/mod/github.com/confluentinc/confluent-kafka-go/v2@v2.3.0/kafka/librdkafka_vendor/librdkafka_glibc_linux_arm64.a(rdkafka_mock.o): In function
rd_kafka_mock_cluster_thread_main': (.text+0x130c): undefined reference to
__aarch64_ldadd4_acq_rel'/opt/tiger/compile_path/pkg/mod/github.com/confluentinc/confluent-kafka-go/v2@v2.3.0/kafka/librdkafka_vendor/librdkafka_glibc_linux_arm64.a(rdkafka_mock.o):(.text+0x14f0): more undefined references to
__aarch64_ldadd4_acq_rel' follow /opt/tiger/compile_path/pkg/mod/github.com/confluentinc/confluent-kafka-go/v2@v2.3.0/kafka/librdkafka_vendor/librdkafka_glibc_linux_arm64.a(rdkafka_txnmgr.o): In function
rd_kafka_txn_op_commit_transaction.part.0':(.text+0x4170): undefined reference to `__aarch64_ldadd8_acq_rel'
My go env:
GO111MODULE=""
GOARCH="arm64"
GOBIN=""
GOCACHE="/opt/tiger/.cache/go-build"
GOENV="/tmp/.config-cof63mlelf3dpgqrls40/go/env"
GOEXE=""
GOEXPERIMENT=""
GOFLAGS=""
GOHOSTARCH="arm64"
GOHOSTOS="linux"
GOINSECURE=""
GOMODCACHE="/opt/tiger/compile_path/pkg/mod"
GONOPROXY="gitlab.everphoto.cn,sysrepo.byted.org,git.smartisan.com"
GONOSUMDB="code.byted.org,gitlab.everphoto.cn,git.byted.org,sysrepo.byted.org,git.smartisan.com"
GOOS="linux"
GOPATH="/opt/tiger/compile_path"
GOPRIVATE="gitlab.everphoto.cn,sysrepo.byted.org,git.smartisan.com"
GOPROXY="https://goproxy.byted.org,direct"
GOROOT="/usr/local/go"
GOSUMDB="off"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/linux_arm64"
GOVCS=""
GOVERSION="go1.20.14"
GCCGO="gccgo"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD="/opt/tiger/compile_path/src/code.byted.org/infcs/vebackup-core/go.mod"
GOWORK=""
CGO_CFLAGS="-O2 -g"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-O2 -g"
CGO_FFLAGS="-O2 -g"
CGO_LDFLAGS="-O2 -g"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -pthread -Wl,--no-gc-sections -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build3739323652=/tmp/go-build -gno-record-gcc-switches"
How to reproduce
I am not pretty sure if other people can reproduce it, but I can reproduce it in my machine.
Checklist
Please provide the following information:
LibraryVersion()
): confluent-kafka-go 2.3.0ConfigMap{...}
"debug": ".."
as necessary)The text was updated successfully, but these errors were encountered: