From owner-freebsd-current@freebsd.org Thu May 31 17:48:10 2018 Return-Path: Delivered-To: freebsd-current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CC948F79BB1 for ; Thu, 31 May 2018 17:48:09 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from tensor.andric.com (tensor.andric.com [87.251.56.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "tensor.andric.com", Issuer "COMODO RSA Domain Validation Secure Server CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 65AB274F82 for ; Thu, 31 May 2018 17:48:09 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from coleburn.home.andric.com (coleburn.home.andric.com [192.168.0.15]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id DEB8143A45; Thu, 31 May 2018 19:48:01 +0200 (CEST) From: Dimitry Andric Message-Id: <32C087A4-1B67-4694-B769-16A347D4804E@FreeBSD.org> Content-Type: multipart/signed; boundary="Apple-Mail=_F8370567-F1DC-41BB-A27B-9F3D4EAA1CDB"; protocol="application/pgp-signature"; micalg=pgp-sha1 Mime-Version: 1.0 (Mac OS X Mail 11.3 \(3445.6.18\)) Subject: Re: ``make buildkernel'' fails when /usr/obj is empty Date: Thu, 31 May 2018 19:47:57 +0200 In-Reply-To: <20180531160406.GD27985@kduck.kaduk.org> Cc: Gary Jennejohn , FreeBSD Current To: Benjamin Kaduk References: <20180531095222.399e7a37@ernst.home> <20180531095850.5845fd7a@ernst.home> <20180531160406.GD27985@kduck.kaduk.org> X-Mailer: Apple Mail (2.3445.6.18) X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.26 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: Thu, 31 May 2018 17:48:10 -0000 --Apple-Mail=_F8370567-F1DC-41BB-A27B-9F3D4EAA1CDB Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii On 31 May 2018, at 18:04, Benjamin Kaduk wrote: > > On Thu, May 31, 2018 at 09:58:50AM +0200, Gary Jennejohn wrote: >> On Thu, 31 May 2018 09:52:22 +0200 >> Gary Jennejohn wrote: >> >>> There's something totally screwy about trying to build a kernel when >>> /usr/obj is not populated. >>> >>> I ran ``make clean'' in /usr/src and then ``make buildkernel''. This >>> fails with >>> make[2]: "/usr/src/sys/conf/kern.pre.mk" line 125: amd64 kernel >>> requires linker ifunc support >>> >>> This is total BS because >>> >>> /usr/bin/ld --version >>> LLD 6.0.0 (FreeBSD 326565-1200002) (compatible with GNU linkers) >>> >>> which is exactly what bsd.linker.mk is looking for to set ifunc. >>> >>> If I do this: >>> >>> mkdir -p /usr/obj/usr/src/amd64.amd64/tmp/legacy/usr/bin >>> cp /usr/bin/ld /usr/obj/usr/src/amd64.amd64/tmp/legacy/usr/bin >>> >>> the buildkernel then succeeds. >>> >>> Considering that (reformatted output from make) >>> >>> PATH=/usr/obj/usr/src/amd64.amd64/tmp/legacy/usr/sbin: >>> /usr/obj/usr/src/amd64.amd64/tmp/legacy/usr/bin: >>> /usr/obj/usr/src/amd64.amd64/tmp/legacy/bin: >>> /usr/obj/usr/src/amd64.amd64/tmp/usr/sbin: >>> /usr/obj/usr/src/amd64.amd64/tmp/usr/bin: >>> /sbin:/bin:/usr/sbin:/usr/bin >>> >>> it seems like /usr/bin/ld should be found by bsd.linker.mk and no >>> error should be reported. >>> >> >> OK, it seems that ``make clean'' does not remove the contents of >> /usr/obj/usr/src/amd64.amd64/tmp/legacy. If I delete everything >> under /usr/obj then ``make buildkernel'' works. >> >> Still, it seems pretty strange to me to make building a kernel >> depend on some random junk which is left laying around under >> /usr/obj. > > Whatever happened to the "run buildworld or kernel-toolchain before > buildkernel" requirement? That is still a requirement, yes. Otherwise, you might have outdated toolchain components are in your /usr/obj. -Dimitry --Apple-Mail=_F8370567-F1DC-41BB-A27B-9F3D4EAA1CDB Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.2 iF0EARECAB0WIQR6tGLSzjX8bUI5T82wXqMKLiCWowUCWxA1TQAKCRCwXqMKLiCW o20qAJ9MwibgMWR7yG5bC8q6GksjqGIumQCg9RS3pHS0jH02b7u0i5TRYLFP/Xg= =8B91 -----END PGP SIGNATURE----- --Apple-Mail=_F8370567-F1DC-41BB-A27B-9F3D4EAA1CDB--