Skip to content

Linker error on Ubuntu 16.04 with conda-forge libraries (-fno-plt) #117

@pitrou

Description

@pitrou

On a Travis-CI Xenial VM, building Apache Arrow and linking it with some conda-forge libraries (here libprotobuf.a) produces a linker error at some point:

/usr/bin/ld: /home/travis/build/pitrou/arrow/cpp-toolchain/lib/libprotobuf.a(common.o): TLS transition from R_X86_64_TLSGD to R_X86_64_GOTTPOFF against `_ZSt15__once_callable' at 0x38e in section `.text' failed
/home/travis/build/pitrou/arrow/cpp-toolchain/lib/libprotobuf.a: error adding symbols: Bad value
collect2: error: ld returned 1 exit status

(full log at https://travis-ci.org/pitrou/arrow/jobs/480342375#L1220)

This is related to the conda-forge toolchain migration (previously things would work fine on the even older Trusty VMs).

The error may be due to a new GNU ld feature that is not recognized by Xenial's GNU ld version. According to one of the binutils maintainers, not using -fno-plt when building libraries would solve the issue:
https://sourceware.org/ml/binutils/2019-01/msg00115.html
https://sourceware.org/ml/binutils/2019-01/msg00131.html

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions