From owner-freebsd-current@freebsd.org Thu May 31 16:09:52 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 DC5AAEFDCAB for ; Thu, 31 May 2018 16:09:51 +0000 (UTC) (envelope-from kaduk@mit.edu) Received: from dmz-mailsec-scanner-8.mit.edu (dmz-mailsec-scanner-8.mit.edu [18.7.68.37]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7EF5B702A9 for ; Thu, 31 May 2018 16:09:51 +0000 (UTC) (envelope-from kaduk@mit.edu) X-AuditID: 12074425-b35ff700000009ce-8f-5b101cfb7d13 Received: from mailhub-auth-4.mit.edu ( [18.7.62.39]) (using TLS with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by dmz-mailsec-scanner-8.mit.edu (Symantec Messaging Gateway) with SMTP id B0.59.02510.BFC101B5; Thu, 31 May 2018 12:04:11 -0400 (EDT) Received: from outgoing.mit.edu (OUTGOING-AUTH-1.MIT.EDU [18.9.28.11]) by mailhub-auth-4.mit.edu (8.13.8/8.9.2) with ESMTP id w4VG4Aix006282; Thu, 31 May 2018 12:04:11 -0400 Received: from kduck.kaduk.org (24-107-191-124.dhcp.stls.mo.charter.com [24.107.191.124]) (authenticated bits=56) (User authenticated as kaduk@ATHENA.MIT.EDU) by outgoing.mit.edu (8.13.8/8.12.4) with ESMTP id w4VG46jq023048 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Thu, 31 May 2018 12:04:09 -0400 Date: Thu, 31 May 2018 11:04:06 -0500 From: Benjamin Kaduk To: Gary Jennejohn Cc: FreeBSD Current Subject: Re: ``make buildkernel'' fails when /usr/obj is empty Message-ID: <20180531160406.GD27985@kduck.kaduk.org> References: <20180531095222.399e7a37@ernst.home> <20180531095850.5845fd7a@ernst.home> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180531095850.5845fd7a@ernst.home> User-Agent: Mutt/1.9.1 (2017-09-22) X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrBIsWRmVeSWpSXmKPExsUixG6nrvtbRiDaoGeihsWcNx+YLFa/+s7s wOQx49N8Fo+ds+6yBzBFcdmkpOZklqUW6dslcGVs3NHOVNDOV3Ftz1qmBsbt3F2MnBwSAiYS q988YO9i5OIQEljMJPG1cwIbhLORUeLOi0VMEM5VJokjL/4xgbSwCKhK7Pp1lQXEZhNQkWjo vswMYosIaEp0vb3OCmIzCxhKNO/7C1YjLGAnsWj3KaA4Bwcv0LoXR+tATCGBcImvt1JAKngF BCVOznzCAtGpJXHj30smkBJmAWmJ5f84QExOoIGPus1BKkQFlCX29h1in8AoMAtJ8ywkzbMQ mhcwMq9ilE3JrdLNTczMKU5N1i1OTszLSy3StdDLzSzRS00p3cQIDlAX1R2Mc/56HWIU4GBU 4uHV+MIfLcSaWFZcmXuIUZKDSUmU9905oBBfUn5KZUZicUZ8UWlOavEhRgkOZiUR3illQDne lMTKqtSifJiUNAeLkjhvziLGaCGB9MSS1OzU1ILUIpisDAeHkgRvNDAShQSLUtNTK9Iyc0oQ 0kwcnCDDeYCGM4HU8BYXJOYWZ6ZD5E8xKkqJ836XBkoIgCQySvPgekEJRCJ7f80rRnGgV4R5 C0HaeYDJB677FdBgJqDBHW0gVxeXJCKkpBoYu+5+P9DaHx/Tv6Bk3pqnz7NnbZp0YnVZWId6 SZhKdCufWKVsxJ2tBcaf3hxyePnh7seFLVH7L8TffzRt7vz72V5vnm5hu6Dv+21iyQaTFSka jl/ZPSQthGauFBNn73qnN8HTPzy90fzqLANec7tDW2XqVXl/b2n7Y7AwRWv/1Ncc9zyPXXVV VmIpzkg01GIuKk4EAA5nPlD7AgAA 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 16:09:52 -0000 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? -Ben