Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 7 Jul 2021 13:29:08 +0200
From:      Gary Jennejohn <gljennjohn@gmail.com>
To:        freebsd-current@freebsd.org
Subject:   kernel build fails due to incorrect call to ktls_disable_ifnet
Message-ID:  <20210707112908.289f9726@ernst.home>

next in thread | raw e-mail | index | archive | help
I don't remember seeing this reported.

Recent HEAD kernel build results in this error:

make[1]: "/usr/src/Makefile.inc1" line 337: SYSTEM_COMPILER: Determined that CC=cc matches the source tree.  Not bootstrapping a cross-compiler.
make[1]: "/usr/src/Makefile.inc1" line 342: SYSTEM_LINKER: Determined that LD=ld matches the source tree.  Not bootstrapping a cross-linker.
--------------------------------------------------------------
>>> Kernel build for ernst_new started on Wed Jul  7 12:53:52 CEST 2021
--------------------------------------------------------------
===> 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
--------------------------------------------------------------
linking kernel.full
ld: error: undefined symbol: ktls_disable_ifnet
>>> referenced by tcp_var.h:1161 (/usr/src/sys/netinet/tcp_var.h:1161)
>>>               tcp_output.o:(tcp_account_for_send)
--- kernel.full ---
*** [kernel.full] Error code 1

This is caused because ktls_disable_ifnet() is present in
/sys/kern/uipc_ktls.c, which is included in the kernel build
only when options kern_ktls is present in the config file.

I do not have this option set.

So, it's wrong to blindly call this function in tcp_var.h.  Commenting
out the relevant code results in a successful build.

-- 
Gary Jennejohn



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20210707112908.289f9726>