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

compile failed on almalinux 9 #1328

Open
7 tasks
guotie opened this issue Nov 5, 2024 · 2 comments
Open
7 tasks

compile failed on almalinux 9 #1328

guotie opened this issue Nov 5, 2024 · 2 comments

Comments

@guotie
Copy link

guotie commented Nov 5, 2024

Description

compile failed on almalinux 9:

/usr/local/go/pkg/tool/linux_amd64/link: running gcc failed: exit status 1
/usr/bin/gcc -m64 -o $WORK/b001/exe/a.out -Wl,--export-dynamic-symbol=_cgo_panic -Wl,--export-dynamic-symbol=_cgo_topofstack -Wl,--export-dynamic-symbol=crosscall2 -Wl,--export-dynamic-symbol=secp256k1GoPanicError -Wl,--export-dynamic-symbol=secp256k1GoPanicIllegal -Wl,--compress-debug-sections=zlib /tmp/go-link-1046468770/go.o /tmp/go-link-1046468770/000000.o /tmp/go-link-1046468770/000001.o /tmp/go-link-1046468770/000002.o /tmp/go-link-1046468770/000003.o /tmp/go-link-1046468770/000004.o /tmp/go-link-1046468770/000005.o /tmp/go-link-1046468770/000006.o /tmp/go-link-1046468770/000007.o /tmp/go-link-1046468770/000008.o /tmp/go-link-1046468770/000009.o /tmp/go-link-1046468770/000010.o /tmp/go-link-1046468770/000011.o /tmp/go-link-1046468770/000012.o /tmp/go-link-1046468770/000013.o /tmp/go-link-1046468770/000014.o /tmp/go-link-1046468770/000015.o /tmp/go-link-1046468770/000016.o /tmp/go-link-1046468770/000017.o /tmp/go-link-1046468770/000018.o /tmp/go-link-1046468770/000019.o /tmp/go-link-1046468770/000020.o /tmp/go-link-1046468770/000021.o /tmp/go-link-1046468770/000022.o /tmp/go-link-1046468770/000023.o /tmp/go-link-1046468770/000024.o /tmp/go-link-1046468770/000025.o /tmp/go-link-1046468770/000026.o /tmp/go-link-1046468770/000027.o /tmp/go-link-1046468770/000028.o /tmp/go-link-1046468770/000029.o /tmp/go-link-1046468770/000030.o /tmp/go-link-1046468770/000031.o /tmp/go-link-1046468770/000032.o /tmp/go-link-1046468770/000033.o /tmp/go-link-1046468770/000034.o /tmp/go-link-1046468770/000035.o /tmp/go-link-1046468770/000036.o /tmp/go-link-1046468770/000037.o /tmp/go-link-1046468770/000038.o /tmp/go-link-1046468770/000039.o /tmp/go-link-1046468770/000040.o /tmp/go-link-1046468770/000041.o /tmp/go-link-1046468770/000042.o /tmp/go-link-1046468770/000043.o /tmp/go-link-1046468770/000044.o /tmp/go-link-1046468770/000045.o /tmp/go-link-1046468770/000046.o /tmp/go-link-1046468770/000047.o /tmp/go-link-1046468770/000048.o -O2 -g -lresolv -O2 -g /root/go/pkg/mod/github.com/confluentinc/confluent-kafka-go/[email protected]/kafka/librdkafka_vendor/librdkafka_musl_linux_amd64.a -lm -ldl -lpthread -lrt -lpthread -lrt -O2 -g -lpthread -O2 -g -O2 -g -no-pie
/usr/bin/ld: /root/go/pkg/mod/github.com/confluentinc/confluent-kafka-go/[email protected]/kafka/librdkafka_vendor/librdkafka_musl_linux_amd64.a(rdkafka_admin.o): in function `rd_kafka_DescribeTopicsResponse_parse':
(.text+0x56e8): undefined reference to `strlcpy'
/usr/bin/ld: (.text+0x5813): undefined reference to `strlcpy'
/usr/bin/ld: (.text+0x58d8): undefined reference to `strlcpy'
/usr/bin/ld: (.text+0x5a03): undefined reference to `strlcpy'
/usr/bin/ld: /root/go/pkg/mod/github.com/confluentinc/confluent-kafka-go/[email protected]/kafka/librdkafka_vendor/librdkafka_musl_linux_amd64.a(rdkafka_admin.o): in function `rd_kafka_DeleteRecordsResponse_parse':
(.text+0x5c9b): undefined reference to `strlcpy'
/usr/bin/ld: /root/go/pkg/mod/github.com/confluentinc/confluent-kafka-go/[email protected]/kafka/librdkafka_vendor/librdkafka_musl_linux_amd64.a(rdkafka_admin.o):(.text+0x5da0): more undefined references to `strlcpy' follow
collect2: error: ld returned 1 exit status

How to reproduce

Checklist

Please provide the following information:

  • confluent-kafka-go and librdkafka version (LibraryVersion()):
    2.5.3
  • Apache Kafka broker version:
  • Client configuration: ConfigMap{...}
  • Operating system:
    almalinux 9
  • Provide client logs (with "debug": ".." as necessary)
  • Provide broker log excerpts
  • Critical issue
@milindl
Copy link
Contributor

milindl commented Nov 12, 2024

Hello, what's the command used to build your application?

@guotie
Copy link
Author

guotie commented Nov 13, 2024

like this:

go build -tags musl -o out ./cmd/xxxx

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

2 participants