From owner-freebsd-current@freebsd.org Mon Jul 24 02:44:37 2017 Return-Path: Delivered-To: freebsd-current@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 03C2CDB49AC for ; Mon, 24 Jul 2017 02:44:37 +0000 (UTC) (envelope-from shawn.webb@hardenedbsd.org) Received: from mail-wr0-x229.google.com (mail-wr0-x229.google.com [IPv6:2a00:1450:400c:c0c::229]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 856E17C86D for ; Mon, 24 Jul 2017 02:44:36 +0000 (UTC) (envelope-from shawn.webb@hardenedbsd.org) Received: by mail-wr0-x229.google.com with SMTP id f21so44003227wrf.5 for ; Sun, 23 Jul 2017 19:44:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hardenedbsd-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=68Pi8jivSurzM7JouQea8up7GxBCN0BgClXGni6UXdg=; b=XH31Sw4aapNqcgGBfFAMm/N3ihwsOwgXVruNqjDR0mgV8Y9AS0Df91Uik+Kis3EV9b /x/66KcdLjQMtf7Zslerj/r2ilOOFRNdSMBvgKJ+QWpiy1ohH3Zb/ypZOO40ljBVhX7R oKbNMO6Lx19DeN+78P6NyJLdpRFBOnV3f14Oygu9oH2Ky6dx9uuT84yNcEVeSIjcm55j FO00L4Z0NJZDQVxFqtVmeyxIFzhMCijf0LggSWtsDcwX09AVb/RkMB427mgVgsW0jxlS auV3LZ4L7stY6le9Ryk4rB6SRTvqk6PyoxaFY87/L7itV4s/uhafFQd6falwn3zQPMQJ gMJw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=68Pi8jivSurzM7JouQea8up7GxBCN0BgClXGni6UXdg=; b=H+VUnvV0QdTpgi+kglkUtagm+SGajNvPPKVQ1c1ZNoNkVs95ASqFgMI7JE0j4Un0tA 5o3q5fvJNcv7fWnzy2o/J6N7oVfuUYa8JJ/xPMNenLdeG2ifOymghZx1KM9VhCGfnv2u rFp6J7NbMT2cBjuceJij+Wxhvl6+fW7Da1TPis07ZaS2cAcEjIgz5ZAi8VVMI5aEYxgN wNY1FoGNsgtanE0diN9c7q0kNCBpYadH317sjEAUAIcoutvstoDsH+oLTunociFVHOkN LKYDtNdOOJYC8P9sycBTEgfkEx+6iRU6CU8pzEAETu5QyRf7YyoDwGn7uxbzlhlg70m3 Uaig== X-Gm-Message-State: AIVw1108rtqMS/tuD9PV/2DQBzjnJCgMfkUC9p6bDPD9ak8Jf/m6grW9 tMNZhQ4urFunTGuCRJhk4g== X-Received: by 10.223.162.217 with SMTP id t25mr9740888wra.68.1500864274639; Sun, 23 Jul 2017 19:44:34 -0700 (PDT) Received: from mutt-hbsd (pool-100-16-230-154.bltmmd.fios.verizon.net. [100.16.230.154]) by smtp.gmail.com with ESMTPSA id t125sm6208295wmt.20.2017.07.23.19.44.32 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 23 Jul 2017 19:44:33 -0700 (PDT) Date: Sun, 23 Jul 2017 22:44:30 -0400 From: Shawn Webb To: Mark Millard Cc: FreeBSD Current , Dimitry Andric Subject: Re: HEADS-UP: Merged llvm/clang 5.0.0 into -CURRENT (as of r321369) Message-ID: <20170724024430.eqj5xfk274fkxjfh@mutt-hbsd> References: <20170723233447.3qqb7sbonlhirwt5@mutt-hbsd> <20170724011613.radyrjpsaqwjfc6t@mutt-hbsd> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="3z57u4hdajuecmfi" Content-Disposition: inline In-Reply-To: <20170724011613.radyrjpsaqwjfc6t@mutt-hbsd> X-Operating-System: FreeBSD mutt-hbsd 12.0-CURRENT FreeBSD 12.0-CURRENT X-PGP-Key: http://pgp.mit.edu/pks/lookup?op=vindex&search=0x6A84658F52456EEE User-Agent: NeoMutt/20170609 (1.8.3) X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Jul 2017 02:44:37 -0000 --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--