Date: Sun, 23 Jul 2017 22:44:30 -0400 From: Shawn Webb <shawn.webb@hardenedbsd.org> To: Mark Millard <markmi@dsl-only.net> Cc: FreeBSD Current <freebsd-current@freebsd.org>, Dimitry Andric <dim@FreeBSD.org> Subject: Re: HEADS-UP: Merged llvm/clang 5.0.0 into -CURRENT (as of r321369) Message-ID: <20170724024430.eqj5xfk274fkxjfh@mutt-hbsd> In-Reply-To: <20170724011613.radyrjpsaqwjfc6t@mutt-hbsd> References: <CBE9BADF-CE6D-4317-9868-945A0FDB65BE@dsl-only.net> <20170723233447.3qqb7sbonlhirwt5@mutt-hbsd> <20170724011613.radyrjpsaqwjfc6t@mutt-hbsd>
next in thread | previous in thread | raw e-mail | index | archive | help
--3z57u4hdajuecmfi Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Jul 23, 2017 at 09:16:26PM -0400, Shawn Webb wrote: > On Sun, Jul 23, 2017 at 07:34:47PM -0400, Shawn Webb wrote: > > On Sun, Jul 23, 2017 at 04:13:18PM -0700, Mark Millard wrote: > > > Shawn Webb shawn.webb at hardenedbsd.org wrote on > > > Sat Jul 22 15:33:14 UTC 2017 : > > >=20 > > > > I haven't nailed down whether it's SafeStack, CFI, or using lld as = the > > > > default linker, but it looks like we in HardenedBSD are getting an > > > > undefined symbol during buildworld. > > >=20 > > > In an amd64 -> TARGET_ARCH=3Dpowerpc64 cross build context=20 > > > for FreeBSD -r321371 I got a similar report for the: > > >=20 > > > /usr/obj/usr/src/tmp/usr/bin/ld: error: undefined symbol: lldb_privat= e::AppleObjCRuntime::GetFoundationVersion() > > > >>> referenced by /usr/src/contrib/llvm/tools/lldb/source/Plugins/Lan= guage/ObjC/Cocoa.cpp > > > >>> Cocoa.o:(lldb_private::formatters::NSNumberSummaryP= rovider(lldb_private::ValueObject&, lldb_private::Stream&, lldb_private::Ty= peSummaryOptions const&)) in archive /usr/obj/usr/src/lib/clang/liblldb/lib= lldb.a > > >=20 > > > part of your report (logfile). The context used > > > devel/powerpc64-binutils : > > >=20 > > > # /usr/local/powerpc64-freebsd/bin/ld --version > > > GNU ld (GNU Binutils) 2.28 > > > Copyright (C) 2017 Free Software Foundation, Inc. > > > This program is free software; you may redistribute it under the term= s of > > > the GNU General Public License version 3 or (at your option) a later = version. > > > This program has absolutely no warranty. > > >=20 > > > (lld is not yet working option for powerpc64 as > > > far as I know.) > > >=20 > > > For this part of your report I doubt that anything > > > that you listed is required for the problem to happen. > > >=20 > > > In my context the error text was: > > >=20 > > > --- lldb.full --- > > > /usr/obj/powerpc64vtsc_clang_altbinutils/powerpc.powerpc64/usr/src/li= b/clang/liblldb/liblldb.a(Cocoa.o): In function `lldb_private::formatters::= NSNumberSummaryProvider(lldb_private::ValueObject&, lldb_private::Stream&, = lldb_private::TypeSummaryOptions const&)': > > > /usr/src/contrib/llvm/tools/lldb/source/Plugins/Language/ObjC/Cocoa.c= pp:(.text._ZN12lldb_private10formatters23NSNumberSummaryProviderERNS_11Valu= eObjectERNS_6StreamERKNS_18TypeSummaryOptionsE+0x398): undefined reference = to `lldb_private::AppleObjCRuntime::GetFoundationVersion()' > >=20 > > Hey Mark, > >=20 > > I wasn't doing a cross-build, but rather a native build for amd64. I'm > > getting errors again. In fact, I'm getting the same error you just > > posted above. I have no clue why the error's happening. That you're > > also getting the error shows that the issue isn't specific to > > HardenedBSD at the very least. >=20 > I've figured out how to fully reproduce. The following assumes world > still is at clang/llvm 4.0. The following also assumes the source tree > is at /usr/src and is latest FreeBSD HEAD. And MAKEOBJDIRPREFIX is unset > or left as default. Native build on amd64. >=20 > 1. Set ld.lld as the linker: > a. rm /usr/bin/ld > b. ln -s ld.lld /usr/bin/ld > c. Verify: `ld -version` should show: > LLD 4.0.0 (FreeBSD 297347) (compatible with GNU linkers) > 2. Ensure the object tree is clean: > a. rm -rf /usr/obj/usr/src > 3. Build world: > a. make -sj$(sysctl -n hw.ncpu) buildworld > 4. Relax, grab a drink, eat some Skittles > 5. Come back to buildworld failing to link lldb.full in > usr.bin/clang/lldb Found the regression: It looks like lldb 5.0.0 doesn't support being compiled with SafeStack. I'll report this upstream to llvm. Thanks, --=20 Shawn Webb Cofounder and Security Engineer HardenedBSD GPG Key ID: 0x6A84658F52456EEE GPG Key Fingerprint: 2ABA B6BD EF6A F486 BE89 3D9E 6A84 658F 5245 6EEE --3z57u4hdajuecmfi Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEKrq2ve9q9Ia+iT2eaoRlj1JFbu4FAll1XwsACgkQaoRlj1JF bu7+7A/9E0pyaQTjEW9d3ug0uBjEG51AxTqBwVhyAP1sHDBpryHGU7+LEEIupJVc JrqK7P29fU0+Ef10vzceA1Er7E/nrPlrYkzycTV9zABOzHJP6FO0Yd6yx8z/sxUf vst6lLQNCchey2ER2IN7VR6mR0U5n4cYwJsqzMZqxSE4VECAFlEJ5l2ayb6sw8cv kMqSzf/9ogU1mwh3xjSU8kESNcgOWgkq5Bg5z+/gMTLkkr4egKBmQJG0Qf+QqJ3Y tFcp5ajgDQ4O18TicdrZu4sPuBtcOui/DWbJfqjZgu+Rq8DheTizOv9yVj8a+LmS pDfxWEVgfB6SA3yAAJx9rj2aq9UAsf86VyS+OPDwKoKqpbPhB5iOTfjSzs4ryvgF N0qNKuaLbaVn1i9DDbsH//OUxfbrjyq3EMc72lz7VIjBoKG5ct3JoS/lfno7NAji Sa28Q3YEjGgWomUjhMBB9b8nsfu5X/8zGZ2vxOonZgA3ZqEmQbols05ckKe7smGx N0GCbVH1mcqSOdPU0nyhMrop/cpyU3iRCY+qyRLWd+Bbc4CJRD3MekmArk127dJm eqPG4u0k6660tuYFv8mEQvmDo4e7CWlBmYPHGmj9AfxPK+WuFxyxLkxfosmKunpB sKhpyktqbhurWQM7PeTKWJp3UMf0j7gWQM82fapcVTQC8JjfcQY= =P+7w -----END PGP SIGNATURE----- --3z57u4hdajuecmfi--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20170724024430.eqj5xfk274fkxjfh>