Re: FYI: amd64 built with WITH_LLD_IS_LD= vs. devel/libunwind : cannot preempt symbol (for various symbols)

From: Ed Maste <emaste_at_freebsd.org>
Date: Sun, 16 Apr 2017 22:01:05 -0400
On 16 April 2017 at 04:10, Mark Millard <markmi_at_dsl-only.net> wrote:
> Context: amd64 FreeBSD -r316952 as a VirtualBox guest
> that was built using WITH_LLD_IS_LD= . ports -r438577.
>
> x11/xorg-minimal indirectly gets to devel/libunwind and
> devel/libunwind fails to build from source:
>
>
> --- Lperf-simple ---
> libtool: link: cc -O2 -pipe -g -fstack-protector -fno-strict-aliasing -fexceptions -Wall -Wsign-compare -fstack-protector -o .libs/Lperf-simple Lperf-simple.o  ../src/.libs/libunwind.so -lgcc -llzma -Wl,-rpath -Wl,/usr/local/lib
> /usr/bin/ld: error: ./Gperf-simple.c:195: cannot preempt symbol '_ULx86_64_init_local' defined in ../src/.libs/libunwind.so

The LLD ports exp-run identified the "cannot preempt symbol" issue as
being responsible for the largest number of failed or skipped ports.
You can find a description of the issue in LLVM PR 30960
(https://bugs.llvm.org//show_bug.cgi?id=30960). This is a tricky
issue, and one for which there's not a clear right answer, but is
arguably a problem that needs to be addressed in the individual pieces
of software (libunwind, openal-soft, etc.)

As a temporary workaround you can add CFLAGS+= -fPIC to the port's
Makefile, as in
https://github.com/emaste/freebsd-ports/commit/4857444b31ca546e29e221dce2a41092765e6062
Received on Mon Apr 17 2017 - 00:01:27 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:41:11 UTC