confluent-kafka-go
confluent-kafka-go copied to clipboard
Link edit errors after upgrade from v1.9.2 to v2.0.2
Description
We're trying to upgrade to v2.0.2. Developing microservices so to debug with telepresence, we need to compile and debug on Windows 10.
Our client compiles and runs fine if it's built inside a linux container, but to debug with telepresence we have to compile our client in either windows or on a mac. I'm on Windows and it all worked fine on v1.9.2 but with v2.0.2 in the IDE I get these link edit errors:
C:/TDM-GCC-64/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/Users/xxx/go/pkg/mod/github.com/confluentinc/confluent-kafka-go/[email protected]/kafka/librdkafka_vendor/librdkafka_windows.a(trees.o):(.text+0x64e): undefined reference to __stack_chk_fail' C:/TDM-GCC-64/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/Users/xxx/go/pkg/mod/github.com/confluentinc/confluent-kafka-go/[email protected]/kafka/librdkafka_vendor/librdkafka_windows.a(trees.o):(.rdata$.refptr.__stack_chk_guard[.refptr.__stack_chk_guard]+0x0): undefined reference to
__stack_chk_guard'
C:/TDM-GCC-64/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/Users/xxx/go/pkg/mod/github.com/confluentinc/confluent-kafka-go/[email protected]/kafka/librdkafka_vendor/librdkafka_windows.a(inflate.o):(.text+0x21a8): undefined reference to __stack_chk_fail' C:/TDM-GCC-64/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/Users/xxx/go/pkg/mod/github.com/confluentinc/confluent-kafka-go/[email protected]/kafka/librdkafka_vendor/librdkafka_windows.a(inflate.o):(.text+0x2754): undefined reference to
__stack_chk_fail'
C:/TDM-GCC-64/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/Users/xxx/go/pkg/mod/github.com/confluentinc/confluent-kafka-go/[email protected]/kafka/librdkafka_vendor/librdkafka_windows.a(inftrees.o):(.text+0x56b): undefined reference to `__stack_chk_fail'
collect2.exe: error: ld returned 1 exit status
Is this a known problem? Is compiling on windows no longer supported as it was on v1.9.2?
How to reproduce
try to build kafka client project in intellij on windows 10.
Checklist
Please provide the following information:
- [ x] confluent-kafka-go and librdkafka version (
LibraryVersion()
): 2.0.2 - [ x] Apache Kafka broker version: does not matter since build is failing.
- [ x] Client configuration:
ConfigMap{...}
does not matter since build is failing. - [ x] Operating system: Windows 10 Enterprise
- [ x] Provide client logs (with
"debug": ".."
as necessary) does not matter since build is failing. - [ x] Provide broker log excerpts does not matter since build is failing.
- [ x] Critical issue YES
Anyone have any ideas? I don't remember doing anything special on 1.9.2 to get everything to work.
I took a look at this as a C program problem instead of a Go problem and this seems to solve it:
CGO_LDFLAGS=-fstack-protector
Is it that easy?
I have the same issue, your flag doesn't help. Anyone?
duplicate symbol '_chdrs_to_tmphdrs' in:
/var/folders/rc/56vh_ssx3bq0f_xv2jbxtd0w0000gn/T/go-link-2744028113/000009.o
/var/folders/rc/56vh_ssx3bq0f_xv2jbxtd0w0000gn/T/go-link-2744028113/000032.o
duplicate symbol '__rk_queue_poll' in:
/var/folders/rc/56vh_ssx3bq0f_xv2jbxtd0w0000gn/T/go-link-2744028113/000009.o
/var/folders/rc/56vh_ssx3bq0f_xv2jbxtd0w0000gn/T/go-link-2744028113/000032.o
duplicate symbol '__getMetadata_broker_element' in:
/var/folders/rc/56vh_ssx3bq0f_xv2jbxtd0w0000gn/T/go-link-2744028113/000016.o
/var/folders/rc/56vh_ssx3bq0f_xv2jbxtd0w0000gn/T/go-link-2744028113/000039.o
duplicate symbol '__getMetadata_partition_element' in:
/var/folders/rc/56vh_ssx3bq0f_xv2jbxtd0w0000gn/T/go-link-2744028113/000016.o
/var/folders/rc/56vh_ssx3bq0f_xv2jbxtd0w0000gn/T/go-link-2744028113/000039.o
duplicate symbol '__getMetadata_topic_element' in:
/var/folders/rc/56vh_ssx3bq0f_xv2jbxtd0w0000gn/T/go-link-2744028113/000016.o
/var/folders/rc/56vh_ssx3bq0f_xv2jbxtd0w0000gn/T/go-link-2744028113/000039.o
duplicate symbol '__get_int32_element' in:
/var/folders/rc/56vh_ssx3bq0f_xv2jbxtd0w0000gn/T/go-link-2744028113/000016.o
/var/folders/rc/56vh_ssx3bq0f_xv2jbxtd0w0000gn/T/go-link-2744028113/000039.o
duplicate symbol '_setup_rkmessage' in:
/var/folders/rc/56vh_ssx3bq0f_xv2jbxtd0w0000gn/T/go-link-2744028113/000015.o
/var/folders/rc/56vh_ssx3bq0f_xv2jbxtd0w0000gn/T/go-link-2744028113/000038.o
duplicate symbol '_tmphdrs_to_chdrs' in:
/var/folders/rc/56vh_ssx3bq0f_xv2jbxtd0w0000gn/T/go-link-2744028113/000020.o
/var/folders/rc/56vh_ssx3bq0f_xv2jbxtd0w0000gn/T/go-link-2744028113/000043.o
duplicate symbol '_do_produce' in:
/var/folders/rc/56vh_ssx3bq0f_xv2jbxtd0w0000gn/T/go-link-2744028113/000020.o
/var/folders/rc/56vh_ssx3bq0f_xv2jbxtd0w0000gn/T/go-link-2744028113/000043.o
ld: 9 duplicate symbols for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
</details>
I also meet it, anyone has idea about it?
works for me with the flag and TDM-GCC-64 (C:/TDM-GCC-64/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0)