From owner-freebsd-current@freebsd.org Thu May 31 14:14:09 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 21E82FD16A7 for ; Thu, 31 May 2018 14:14:09 +0000 (UTC) (envelope-from freebsd-rwg@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9A878879F5 for ; Thu, 31 May 2018 14:14:08 +0000 (UTC) (envelope-from freebsd-rwg@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (localhost [127.0.0.1]) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3) with ESMTP id w4VEE5wR076966; Thu, 31 May 2018 07:14:05 -0700 (PDT) (envelope-from freebsd-rwg@pdx.rh.CN85.dnsmgr.net) Received: (from freebsd-rwg@localhost) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3/Submit) id w4VEE57n076965; Thu, 31 May 2018 07:14:05 -0700 (PDT) (envelope-from freebsd-rwg) From: "Rodney W. Grimes" Message-Id: <201805311414.w4VEE57n076965@pdx.rh.CN85.dnsmgr.net> Subject: Re: ``make buildkernel'' fails when /usr/obj is empty In-Reply-To: <20180531095222.399e7a37@ernst.home> To: gljennjohn@gmail.com Date: Thu, 31 May 2018 07:14:05 -0700 (PDT) CC: FreeBSD Current X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII 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 14:14:09 -0000 > 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. AHH!! That explains why I was still seeing this too! I been forcing the LD= work around and just ignoring this failure thinking it was something in my not so normal setup, but infact I always start with an empty /usr/obj due to a zfs rollback pool/usr/obj@empty So this is a "confirmed" this occurs, including in a 20180521 freshly installed snapshot. -- Rod Grimes rgrimes@freebsd.org