From owner-freebsd-ports@freebsd.org Sun Apr 16 09:03:49 2017 Return-Path: Delivered-To: freebsd-ports@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 31D19D404BD for ; Sun, 16 Apr 2017 09:03:49 +0000 (UTC) (envelope-from markmi@dsl-only.net) Received: from asp.reflexion.net (outbound-mail-210-43.reflexion.net [208.70.210.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EE5A4120D for ; Sun, 16 Apr 2017 09:03:48 +0000 (UTC) (envelope-from markmi@dsl-only.net) Received: (qmail 2917 invoked from network); 16 Apr 2017 09:03:47 -0000 Received: from unknown (HELO mail-cs-01.app.dca.reflexion.local) (10.81.19.1) by 0 (rfx-qmail) with SMTP; 16 Apr 2017 09:03:47 -0000 Received: by mail-cs-01.app.dca.reflexion.local (Reflexion email security v8.40.0) with SMTP; Sun, 16 Apr 2017 05:03:47 -0400 (EDT) Received: (qmail 29147 invoked from network); 16 Apr 2017 09:03:47 -0000 Received: from unknown (HELO iron2.pdx.net) (69.64.224.71) by 0 (rfx-qmail) with (AES256-SHA encrypted) SMTP; 16 Apr 2017 09:03:47 -0000 Received: from [192.168.1.106] (c-76-115-7-162.hsd1.or.comcast.net [76.115.7.162]) by iron2.pdx.net (Postfix) with ESMTPSA id 6FD33EC7B2C; Sun, 16 Apr 2017 02:03:46 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Subject: Re: FYI: amd64 built with WITH_LLD_IS_LD= vs. devel/libunwind : cannot preempt symbol (for various symbols) From: Mark Millard In-Reply-To: <37CB2849-A509-4C1D-AB93-A1FBFF70E959@dsl-only.net> Date: Sun, 16 Apr 2017 02:03:45 -0700 Cc: FreeBSD Current , FreeBSD Ports Content-Transfer-Encoding: quoted-printable Message-Id: <66C3DDE1-D9DB-4FCD-9743-0A547FE14358@dsl-only.net> References: <37CB2849-A509-4C1D-AB93-A1FBFF70E959@dsl-only.net> To: FreeBSD Toolchain X-Mailer: Apple Mail (2.3273) X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Apr 2017 09:03:49 -0000 On 2017-Apr-16, at 1:10 AM, Mark Millard wrote: > Context: amd64 FreeBSD -r316952 as a VirtualBox guest > that was built using WITH_LLD_IS_LD=3D . ports -r438577. >=20 > x11/xorg-minimal indirectly gets to devel/libunwind and > devel/libunwind fails to build from source: >=20 >=20 > --- 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 > /usr/bin/ld: error: ./Gperf-simple.c:219: cannot preempt symbol = '_ULx86_64_init_local' defined in ../src/.libs/libunwind.so > /usr/bin/ld: error: ./Gperf-simple.c:252: cannot preempt symbol = '_ULx86_64_local_addr_space' defined in ../src/.libs/libunwind.so > /usr/bin/ld: error: ./Gperf-simple.c:252: cannot preempt symbol = '_ULx86_64_set_caching_policy' defined in ../src/.libs/libunwind.so > /usr/bin/ld: error: ./Gperf-simple.c:255: cannot preempt symbol = '_ULx86_64_local_addr_space' defined in ../src/.libs/libunwind.so > /usr/bin/ld: error: ./Gperf-simple.c:255: cannot preempt symbol = '_ULx86_64_set_caching_policy' defined in ../src/.libs/libunwind.so > /usr/bin/ld: error: ./Gperf-simple.c:258: cannot preempt symbol = '_ULx86_64_local_addr_space' defined in ../src/.libs/libunwind.so > /usr/bin/ld: error: ./Gperf-simple.c:258: cannot preempt symbol = '_ULx86_64_set_caching_policy' defined in ../src/.libs/libunwind.so > /usr/bin/ld: error: ./Gperf-simple.c:66: cannot preempt symbol = '_ULx86_64_init_local' defined in ../src/.libs/libunwind.so > /usr/bin/ld: error: ./Gperf-simple.c:73: cannot preempt symbol = '_ULx86_64_step' defined in ../src/.libs/libunwind.so > cc: error: linker command failed with exit code 1 (use -v to see = invocation) > *** [Lperf-simple] Error code 1 >=20 > make[2]: stopped in = /usr/obj/portswork/usr/ports/devel/libunwind/work/libunwind-1.1/tests > --- Lperf-trace --- > libtool: link: cc -O2 -pipe -g -fstack-protector -fno-strict-aliasing = -fexceptions -Wall -Wsign-compare -fstack-protector -o .libs/Lperf-trace = Lperf-trace.o ../src/.libs/libunwind.so -lgcc -llzma -Wl,-rpath = -Wl,/usr/local/lib > --- Gperf-simple --- > libtool: link: cc -O2 -pipe -g -fstack-protector -fno-strict-aliasing = -fexceptions -Wall -Wsign-compare -fstack-protector -o = .libs/Gperf-simple Gperf-simple.o ../src/.libs/libunwind-x86_64.so = /usr/obj/portswork/usr/ports/devel/libunwind/work/libunwind-1.1/src/.libs/= libunwind.so ../src/.libs/libunwind.so -lgcc -llzma -Wl,-rpath = -Wl,/usr/local/lib > --- Lperf-trace --- > /usr/bin/ld: error: ./Gperf-trace.c:181: cannot preempt symbol = '_ULx86_64_init_local' defined in ../src/.libs/libunwind.so > /usr/bin/ld: error: ./Gperf-trace.c:205: cannot preempt symbol = '_ULx86_64_init_local' defined in ../src/.libs/libunwind.so > /usr/bin/ld: error: ./Gperf-trace.c:238: cannot preempt symbol = '_ULx86_64_local_addr_space' defined in ../src/.libs/libunwind.so > /usr/bin/ld: error: ./Gperf-trace.c:238: cannot preempt symbol = '_ULx86_64_set_caching_policy' defined in ../src/.libs/libunwind.so > /usr/bin/ld: error: ./Gperf-trace.c:241: cannot preempt symbol = '_ULx86_64_local_addr_space' defined in ../src/.libs/libunwind.so > --- Gperf-trace --- > libtool: link: cc -O2 -pipe -g -fstack-protector -fno-strict-aliasing = -fexceptions -Wall -Wsign-compare -fstack-protector -o .libs/Gperf-trace = Gperf-trace.o ../src/.libs/libunwind-x86_64.so = /usr/obj/portswork/usr/ports/devel/libunwind/work/libunwind-1.1/src/.libs/= libunwind.so ../src/.libs/libunwind.so -lgcc -llzma -Wl,-rpath = -Wl,/usr/local/lib > --- Lperf-trace --- > /usr/bin/ld: error: ./Gperf-trace.c:241: cannot preempt symbol = '_ULx86_64_set_caching_policy' defined in ../src/.libs/libunwind.so > /usr/bin/ld: error: ./Gperf-trace.c:244: cannot preempt symbol = '_ULx86_64_local_addr_space' defined in ../src/.libs/libunwind.so > /usr/bin/ld: error: ./Gperf-trace.c:244: cannot preempt symbol = '_ULx86_64_set_caching_policy' defined in ../src/.libs/libunwind.so > cc: error: linker command failed with exit code 1 (use -v to see = invocation) > *** [Lperf-trace] Error code 1 >=20 > make[2]: stopped in = /usr/obj/portswork/usr/ports/devel/libunwind/work/libunwind-1.1/tests > --- Gperf-simple --- > /usr/bin/ld: error: Gperf-simple.c:195: cannot preempt symbol = '_Ux86_64_init_local' defined in ../src/.libs/libunwind-x86_64.so > /usr/bin/ld: error: Gperf-simple.c:219: cannot preempt symbol = '_Ux86_64_init_local' defined in ../src/.libs/libunwind-x86_64.so > /usr/bin/ld: error: Gperf-simple.c:252: cannot preempt symbol = '_Ux86_64_local_addr_space' defined in ../src/.libs/libunwind-x86_64.so > /usr/bin/ld: error: Gperf-simple.c:252: cannot preempt symbol = '_Ux86_64_set_caching_policy' defined in = ../src/.libs/libunwind-x86_64.so > /usr/bin/ld: error: Gperf-simple.c:255: cannot preempt symbol = '_Ux86_64_local_addr_space' defined in ../src/.libs/libunwind-x86_64.so > /usr/bin/ld: error: Gperf-simple.c:255: cannot preempt symbol = '_Ux86_64_set_caching_policy' defined in = ../src/.libs/libunwind-x86_64.so > /usr/bin/ld: error: Gperf-simple.c:258: cannot preempt symbol = '_Ux86_64_local_addr_space' defined in ../src/.libs/libunwind-x86_64.so > /usr/bin/ld: error: Gperf-simple.c:258: cannot preempt symbol = '_Ux86_64_set_caching_policy' defined in = ../src/.libs/libunwind-x86_64.so > /usr/bin/ld: error: Gperf-simple.c:66: cannot preempt symbol = '_Ux86_64_init_local' defined in ../src/.libs/libunwind-x86_64.so > /usr/bin/ld: error: Gperf-simple.c:73: cannot preempt symbol = '_Ux86_64_step' defined in ../src/.libs/libunwind-x86_64.so > --- Gperf-trace --- > /usr/bin/ld: error: Gperf-trace.c:181: cannot preempt symbol = '_Ux86_64_init_local' defined in ../src/.libs/libunwind-x86_64.so > /usr/bin/ld: error: Gperf-trace.c:205: cannot preempt symbol = '_Ux86_64_init_local' defined in ../src/.libs/libunwind-x86_64.so > /usr/bin/ld: error: Gperf-trace.c:238: cannot preempt symbol = '_Ux86_64_local_addr_space' defined in ../src/.libs/libunwind-x86_64.so > /usr/bin/ld: error: Gperf-trace.c:238: cannot preempt symbol = '_Ux86_64_set_caching_policy' defined in = ../src/.libs/libunwind-x86_64.so > /usr/bin/ld: error: Gperf-trace.c:241: cannot preempt symbol = '_Ux86_64_local_addr_space' defined in ../src/.libs/libunwind-x86_64.so > /usr/bin/ld: error: Gperf-trace.c:241: cannot preempt symbol = '_Ux86_64_set_caching_policy' defined in = ../src/.libs/libunwind-x86_64.so > /usr/bin/ld: error: Gperf-trace.c:244: cannot preempt symbol = '_Ux86_64_local_addr_space' defined in ../src/.libs/libunwind-x86_64.so > /usr/bin/ld: error: Gperf-trace.c:244: cannot preempt symbol = '_Ux86_64_set_caching_policy' defined in = ../src/.libs/libunwind-x86_64.so > --- Gperf-simple --- > cc: error: linker command failed with exit code 1 (use -v to see = invocation) > --- Gperf-trace --- > cc: error: linker command failed with exit code 1 (use -v to see = invocation) > --- Gperf-simple --- > *** [Gperf-simple] Error code 1 >=20 > make[2]: stopped in = /usr/obj/portswork/usr/ports/devel/libunwind/work/libunwind-1.1/tests > --- Gperf-trace --- > *** [Gperf-trace] Error code 1 >=20 >=20 > I do have: >=20 > # svnlite diff /usr/ports/Mk > Index: /usr/ports/Mk/bsd.port.mk > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > --- /usr/ports/Mk/bsd.port.mk (revision 436747) > +++ /usr/ports/Mk/bsd.port.mk (working copy) > @@ -1646,7 +1646,11 @@ > STRIP_CMD=3D ${TRUE} > .endif > DEBUG_FLAGS?=3D -g > +.if defined(ALLOW_OPTIMIZATIONS_FOR_WITH_DEBUG) > +CFLAGS:=3D ${CFLAGS} ${DEBUG_FLAGS} > +.else > CFLAGS:=3D ${CFLAGS:N-O*:N-fno-strict*} ${DEBUG_FLAGS} > +.endif > .if defined(INSTALL_TARGET) > INSTALL_TARGET:=3D ${INSTALL_TARGET:S/^install-strip$/install/g} > .endif >=20 > and use ALLOW_OPTIMIZATIONS_FOR_WITH_DEBUG=3D and WITH_DEBUG=3D : >=20 > # more /etc/make.conf=20 > WANT_QT_VERBOSE_CONFIGURE=3D1 > # > DEFAULT_VERSIONS+=3Dperl5=3D5.24 > WRKDIRPREFIX=3D/usr/obj/portswork > # > # =46rom a local /usr/ports/Mk/bsd.port.mk extension: > ALLOW_OPTIMIZATIONS_FOR_WITH_DEBUG=3D > # > .if ${.CURDIR:M*/devel/*llvm*} > #WITH_DEBUG=3D > .elif ${.CURDIR:M*/www/webkit-qt5*} > #WITH_DEBUG=3D > .else > WITH_DEBUG=3D > .endif > WITH_DEBUG_FILES=3D > MALLOC_PRODUCTION=3D I reverted my amd64 FreeBSD context to be based on WITHOUT_LLD_IS_LD=3D and tried the above again. devel/libunwind did not have the problem when the system's ld was from the system binutils. =3D=3D=3D Mark Millard markmi at dsl-only.net