From nobody Mon Feb 20 08:23:53 2023 X-Original-To: freebsd-current@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PKwS173Hrz3sBLs for ; Mon, 20 Feb 2023 08:24:01 +0000 (UTC) (envelope-from sgk@troutmask.apl.washington.edu) Received: from troutmask.apl.washington.edu (troutmask.apl.washington.edu [128.95.76.21]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "troutmask", Issuer "troutmask" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PKwS14Qhtz472W; Mon, 20 Feb 2023 08:24:01 +0000 (UTC) (envelope-from sgk@troutmask.apl.washington.edu) Authentication-Results: mx1.freebsd.org; none Received: from troutmask.apl.washington.edu (localhost [127.0.0.1]) by troutmask.apl.washington.edu (8.17.1/8.17.1) with ESMTPS id 31K8NrIu097500 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Mon, 20 Feb 2023 00:23:53 -0800 (PST) (envelope-from sgk@troutmask.apl.washington.edu) Received: (from sgk@localhost) by troutmask.apl.washington.edu (8.17.1/8.17.1/Submit) id 31K8NrUA097499; Mon, 20 Feb 2023 00:23:53 -0800 (PST) (envelope-from sgk) Date: Mon, 20 Feb 2023 00:23:53 -0800 From: Steve Kargl To: Dimitry Andric Cc: freebsd-current@freebsd.org Subject: Re: core dump in ld during buildworld Message-ID: Reply-To: sgk@troutmask.apl.washington.edu References: <25B4B3AD-3791-44D0-9FFA-7F1C2A9E82B9@FreeBSD.org> <148DE8E6-E1F2-4132-992A-1A2B9D438B63@FreeBSD.org> List-Id: Discussions about the use of FreeBSD-current List-Archive: https://lists.freebsd.org/archives/freebsd-current List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-current@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <148DE8E6-E1F2-4132-992A-1A2B9D438B63@FreeBSD.org> X-Rspamd-Queue-Id: 4PKwS14Qhtz472W X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:73, ipnet:128.95.0.0/16, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N On Sun, Feb 19, 2023 at 07:21:54PM +0100, Dimitry Andric wrote: > On 19 Feb 2023, at 06:15, Steve Kargl wrote: > > > > On Sat, Feb 18, 2023 at 04:57:45PM -0800, Steve Kargl wrote: > >>> > >>> At that point it is still using the system compiler and linker, and it > >>> seems that the latter is lld. Do you know which version it is? > >>> > >> > >> Good question. Unfortunate ident(1) is useless in a git world. > >> > >> % ll /usr/bin/ld.lld > >> -r-xr-xr-x 1 root wheel - 41754432 Jan 15 12:03 /usr/bin/ld.lld > >> > >> This was built from source from Jan 15 2023. > >> > >> % /usr/bin/ld.lld --version > >> LLD 14.0.5 (FreeBSD llvmorg-14.0.5-0-gc12386ae247c-1400004) (compatible with GNU linkers) > >> > > > > So, is there some way to rebild only ld.lld and install a new loader? > > > > % cd /usr/src/usr.bin/clang/lld > > % make depend > > llvm-tblgen -gen-opt-parser-defs -I /usr/src/contrib/llvm-project/llvm/include -d Options.inc.d -o Options.inc /usr/src/contrib/llvm-project/lld/ELF/Options.td > > make: exec(llvm-tblgen) failed (No such file or directory) > > *** Error code 1 > > > > How to I fix this? > > Assuming llvm-tblgen has already been built (it's a bootstrap-tool), > and you have a regular setup, it should be in: > > /usr/obj/usr/src/amd64.amd64/tmp/obj-tools/usr.bin/clang/llvm-tblgen/llvm-tblgen > > You could try setting LLVM_TBLGEN to that path, then first build libllvm > just to be sure, then usr.bin/clang/lld: > > export LLVM_TBLGEN=/usr/obj/usr/src/amd64.amd64/tmp/obj-tools/usr.bin/clang/llvm-tblgen/llvm-tblgen > make -C /usr/src/lib/clang/libllvm > make -C /usr/src/usr.bin/clang/lld > > If that works, you can run make install from usr.bin/clang/lld. > Thanks for the hints. The above got me past the segfault in ld.ldd. I now have an error about libdwarf.a being truncated and extended beyond some limit while building nm. I'm simply do 'make -k buildworld' now to see if anything is running south. -- Steve