From owner-freebsd-current@freebsd.org Mon Jul 24 01:16: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 40680DB2C24 for ; Mon, 24 Jul 2017 01:16:37 +0000 (UTC) (envelope-from shawn.webb@hardenedbsd.org) Received: from mail-wr0-x230.google.com (mail-wr0-x230.google.com [IPv6:2a00:1450:400c:c0c::230]) (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 C2F2375E6A for ; Mon, 24 Jul 2017 01:16:36 +0000 (UTC) (envelope-from shawn.webb@hardenedbsd.org) Received: by mail-wr0-x230.google.com with SMTP id 12so100261609wrb.1 for ; Sun, 23 Jul 2017 18:16: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=gPTaz2wkra/k/97bHqUdbhUu8v/VAf0uPLeEIsgaRzc=; b=oaKMRg7a6z4ySJNmg87ok5+gP6bbS1KBtW5pb0OfePcL2Hx9rVH+AbLLBEyccD9Gdv ZEgbB9xUrzrNG23vYUdERxmK/hZksDVxUALKIoto3hV5JIz0RUfR4FDGc360zfke1ODG DgQF1pbzjFyNU2N7PCOWJ9OUAjkMV1ydBoeiADlpP+IcasMQmwNQwLtLmXJ1RfL2NXnd oxw0oXcx8toS0PY40FquNgvwnTRR5Cqq/xpwqOSNIa2BqbWfkIKFw8POm/vsRjtjHWrR 4bO5ZpeY6L6wdZEHYlHRJue7h1oI/aP9zXrT78Nu81miUQHul5D1lhnHnS4DwfNvR3XA LHiQ== 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=gPTaz2wkra/k/97bHqUdbhUu8v/VAf0uPLeEIsgaRzc=; b=rUyDtHVaEOYrlrASnT+PO4gnqGcIutAGV/djfyXARUCVDZ4EsxKGNOOaQcPO36KkpM Rcs5fIFVcpJk9vi+pscFVbmfUNtI5rnPNUw37v+mwCU41j69iBmuIH1HJ2N4LJsfAr/j q9lJrM1qILDBd0gQAt08II5fMBiWNtbHfr/cgkzptqDWwdcpBAWrZY1CmMPIIVCz3WcG ajyrpzUl1zGssi3u2XatMo7KOXhUW1y7eSx0QZQNxerTscX39w5aGN6qHlIJ98cnsXZm PmulvgckzisNIcpeFcR+PS+7XLvLlTMccIfxhBo1Zq9QRdT81fvjcLjRBLeqK0mF6bJw t6EA== X-Gm-Message-State: AIVw111yAFLN30jn9EUlXC0oqc1M1B/uFpSoNZ2usVoGo6VHdpN4JGdJ pDfqC6Xs86Le7Nfr42SGkw== X-Received: by 10.223.128.163 with SMTP id 32mr1732161wrl.99.1500858995164; Sun, 23 Jul 2017 18:16:35 -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 b23sm12634636wrd.40.2017.07.23.18.16.31 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 23 Jul 2017 18:16:33 -0700 (PDT) Date: Sun, 23 Jul 2017 21:16:26 -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: <20170724011613.radyrjpsaqwjfc6t@mutt-hbsd> References: <20170723233447.3qqb7sbonlhirwt5@mutt-hbsd> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="avcwes4aff725m4c" Content-Disposition: inline In-Reply-To: <20170723233447.3qqb7sbonlhirwt5@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 01:16:37 -0000 --avcwes4aff725m4c Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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_private:= :AppleObjCRuntime::GetFoundationVersion() > > >>> referenced by /usr/src/contrib/llvm/tools/lldb/source/Plugins/Langu= age/ObjC/Cocoa.cpp > > >>> Cocoa.o:(lldb_private::formatters::NSNumberSummaryPro= vider(lldb_private::ValueObject&, lldb_private::Stream&, lldb_private::Type= SummaryOptions const&)) in archive /usr/obj/usr/src/lib/clang/liblldb/libll= db.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 terms = of > > the GNU General Public License version 3 or (at your option) a later ve= rsion. > > 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/lib/= clang/liblldb/liblldb.a(Cocoa.o): In function `lldb_private::formatters::NS= NumberSummaryProvider(lldb_private::ValueObject&, lldb_private::Stream&, ll= db_private::TypeSummaryOptions const&)': > > /usr/src/contrib/llvm/tools/lldb/source/Plugins/Language/ObjC/Cocoa.cpp= :(.text._ZN12lldb_private10formatters23NSNumberSummaryProviderERNS_11ValueO= bjectERNS_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. 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. 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 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 --avcwes4aff725m4c Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEKrq2ve9q9Ia+iT2eaoRlj1JFbu4FAll1SmkACgkQaoRlj1JF bu5V3Q/8Cn3kS2Ihyy38AxJDmW2jgxr3F5NaP8uhIpyBkhGgHLc9IrTpH2/emWpH oP4Y7kmS36cdoRTqFeGm2zpvZRCSdU1EkRrXanQ4oL00uRXEi6DLBJWa2nNmM/km kQqdKc23tBMKvbh/16QDlzvPvZLfxUt1cSrmrJ5uK61FSLg56ZBpwECpQP3napeo qlV2I++SWE8ez+JWy4mJI69UDkfjLrAwxbZYwc0bX/lQLNUCEbA0fNku7vyYRUUa +mZMJ81URxOYRc/mXpAMFuGfywTsDrmYo6F8YOGyZVJFS+tPIt0VOzjblvGTvRLz RjFlNnVLdmyoWbkh4QKIsxMdMlXYqetlCJ6x7vh4Riy/qFLKPy7IP5Ea8N012kwl IC/Klv2up2yQ5pze2X7Cpz/8SjNtPrFA4MtBczbJNwkYd7iE/4Y1r+6dt6lGxVzd tfVobpO7UAFLzRKoRojZi3attJnFOuL1lsGwmWBrJUsgbP/8ytqFsG1bXktA6yBf x0QKfzuO8g/oSUoipypACyUcBEq51SAowYg3gohvcuGYtMXdSX/4FVTBqtbXR5nt WF2MpSQayLIDAHbfoU0RrK0sIQ+PVLhb8CraRW6ERPRadr5CwIUsnRN8gLWYiYAt Kntyp9KmN3g7N1xe7UdLj+Iu67iCRar870edmpcTMNqO6o14NJM= =TF4I -----END PGP SIGNATURE----- --avcwes4aff725m4c--