Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 16 Apr 2017 22:01:05 -0400
From:      Ed Maste <emaste@freebsd.org>
To:        Mark Millard <markmi@dsl-only.net>
Cc:        FreeBSD Toolchain <freebsd-toolchain@freebsd.org>,  FreeBSD Current <freebsd-current@freebsd.org>, FreeBSD Ports <freebsd-ports@freebsd.org>
Subject:   Re: FYI: amd64 built with WITH_LLD_IS_LD= vs. devel/libunwind : cannot preempt symbol (for various symbols)
Message-ID:  <CAPyFy2C3vrDm5L_6k_2bY_12wH5oHN62EuB2HzMKTE7cVzPmKw@mail.gmail.com>
In-Reply-To: <37CB2849-A509-4C1D-AB93-A1FBFF70E959@dsl-only.net>
References:  <37CB2849-A509-4C1D-AB93-A1FBFF70E959@dsl-only.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On 16 April 2017 at 04:10, Mark Millard <markmi@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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAPyFy2C3vrDm5L_6k_2bY_12wH5oHN62EuB2HzMKTE7cVzPmKw>