pixie icon indicating copy to clipboard operation
pixie copied to clipboard

Investigate issues with linking some go binaries under `--config=gcc` when tcmalloc is enabled.

Open JamesMBartlett opened this issue 2 years ago • 0 comments

Describe the Task When tcmalloc is enabled, we get mysterious linker errors trying to build the query_broker go binary:

external/go_sdk/pkg/tool/linux_amd64/link: running /usr/bin/gcc-12 failed: exit status 1
/usr/bin/ld.gold: internal error in check_non_pic, at ../../gold/x86_64.cc:3522
collect2: error: ld returned 1 exit status
link: error running subcommand external/go_sdk/pkg/tool/linux_amd64/link: exit status 2

I tracked the error in gold down to an assertion that the output is position independent. This assertion happens when evaluating R_X86_64_PC32 relocations. So potentially something about our gcc config for building tcmalloc causes these relocations to be errorneously emitted, or potentially gold can't handle the relocations but lld can.

tcmalloc is disabled for the gcc config now, but we should investigate these issues.

Subtasks Unknown

JamesMBartlett avatar Jun 08 '23 21:06 JamesMBartlett