Date: Thu, 9 Apr 2020 09:33:46 +0200 From: Gary Jennejohn <gljennjohn@gmail.com> To: John Baldwin <jhb@FreeBSD.org> Cc: current@freebsd.org Subject: Re: buildkernel failure because ctfconvert not installed Message-ID: <20200409093346.1aec1bba@ernst.home> In-Reply-To: <814e8e7d-68e6-bead-481b-21c5552583c4@FreeBSD.org> References: <20200408083204.4a2d6dbc@ernst.home> <814e8e7d-68e6-bead-481b-21c5552583c4@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 8 Apr 2020 14:51:14 -0700 John Baldwin <jhb@FreeBSD.org> wrote: > On 4/7/20 11:32 PM, Gary Jennejohn wrote: > > Has anyone else seen this error? > > > > I tried to build a kernel yesterday, but the build failed while compiling > > modules because ctfconvert was not found. > > > > I've had WITH_CTF=no in my src.conf for years, so neither ctfconvert nor > > ctfmerge were installed. > > > > OK, I'll just go to the source dirctories and build and install. > > > > Nope. I got this error: > > make: exec(ctfconvert) failed (No such file or directory) > > and the build failed. > > > > WTF? ctfconvert requires ctfconvert to build? That makes no sense and is > > a real chicken-and-egg problem if I've ever seen one. > > > > I ended up creating /usr/bin/ctf{convert,merge} shell scripts which simply > > did exit 0. That allowed me to finally compile and install the utilities. > > > > Now I'm forced to have WITH_CTF=yes in my src.conf. No big deal. > > > > Still, it seems like the change to the make infrastructure which assumed > > that cft{convert,merge} are always installed was rather premature. > > The change is that GENERIC has 'makeoptions WITH_CTF=yes'. If you build a > kernel without that, you shouldn't need to have ctfconvert installed. This > does mean you need to use a custom kernel instead of GENERIC. > That is exactly what I found confusing. I tried both with and without CTF in my kernel config file and the build still failed. grep CTF /sys/amd64/conf/ernst_new #makeoptions WITH_CTF=1 # Run ctfconvert(1) for DTrace support #options DDB_CTF # Kernel ELF linker loads CTF data I also have makeoptions MODULES_OVERRIDE="cpuctl msdosfs pseudofs filemon" If I move ctfconvert away then I see this error: cd /usr/src; make buildkernel -------------------------------------------------------------- >>> Kernel build for ernst_new started on Thu Apr 9 08:51:06 CEST 2020 -------------------------------------------------------------- ===> ernst_new -------------------------------------------------------------- >>> stage 1: configuring the kernel -------------------------------------------------------------- Kernel build directory is /home/garyj/obj/usr/src/amd64.amd64/sys/ernst_new Don't forget to do ``make cleandepend && make depend'' -------------------------------------------------------------- >>> stage 2.3: build tools -------------------------------------------------------------- -------------------------------------------------------------- >>> stage 3.1: building everything -------------------------------------------------------------- sh: ctfconvert: not found *** [cpuctl.o] Error code 127 make[4]: *** cpuctl.o removed make[4]: stopped in /usr/src/sys/modules/cpuctl .ERROR_TARGET='cpuctl.o' .ERROR_META_FILE='/home/garyj/obj/usr/src/amd64.amd64/sys/ernst_new/modules/usr/src/sys/modules/cpuctl/cpuctl.o.meta' So, without ctfconvert installed buildkernel ALWAYS fails to build the modules no matter what CTF options are used in the kernel config file. In contrast, buildworld does still work without ctfconvert. -- Gary Jennejohn
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20200409093346.1aec1bba>