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

Link edit errors after upgrade from v1.9.2 to v2.0.2 #965

Closed
davidwormald opened this issue Mar 22, 2023 · 5 comments · Fixed by #1184
Closed

Link edit errors after upgrade from v1.9.2 to v2.0.2 #965

davidwormald opened this issue Mar 22, 2023 · 5 comments · Fixed by #1184

Comments

@davidwormald
Copy link

davidwormald commented Mar 22, 2023

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
@davidwormald
Copy link
Author

Anyone have any ideas? I don't remember doing anything special on 1.9.2 to get everything to work.

@davidwormald
Copy link
Author

davidwormald commented Mar 30, 2023

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?

@Larleyt
Copy link

Larleyt commented Aug 7, 2023

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>

@Aklscc
Copy link

Aklscc commented Sep 27, 2023

I also meet it, anyone has idea about it?

@michalsw
Copy link

michalsw commented Jan 11, 2024

works for me with the flag and TDM-GCC-64 (C:/TDM-GCC-64/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants