From nobody Wed Feb 8 04:49:46 2023 X-Original-To: freebsd-current@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PBSGv0pnwz3kgvx for ; Wed, 8 Feb 2023 04:50:15 +0000 (UTC) (envelope-from zlei@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PBSGv0F1Vz4NfW; Wed, 8 Feb 2023 04:50:15 +0000 (UTC) (envelope-from zlei@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1675831815; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=8CR3uGNZ/2EVcT68ZjPeqYqkQLGRsGY0maV5iuAal+8=; b=vxHMeMrKHLmDKSTsMTKf4M2Alrhau+p5kulWr1Jz5MkrYSsWID557dLf1zyoqvvLXV0WxO VmQbCosRUJ69VRObY+5kuoiOTIk8jXJM8LwemymYnXrzGzql6sVPiDUnHSkRrERVc+Hay4 JTxy616DrPyNdCKqMCRmOxV+kyabjqkihGFMi+bYiF0ApgYHH3HoAgQPXay/2dJ6y2Eqiy 6lmqmkYyaWYphHk+PI/mE7Trs/tl1uI8eGJvO/kfHXjmAc5fr6P2/L1wCpcye44CJsbp4j kjjC2oNnrUAQFisNp1lY3fepBFdq1U/KLU+ezEqviNRr6v9Gum5yHUQSs3uVrA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1675831815; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=8CR3uGNZ/2EVcT68ZjPeqYqkQLGRsGY0maV5iuAal+8=; b=GeWAwUJSVBmIRxlEn8JlboJS6XNWJq42Bz2vRotb1crGyE7WJOLxcGGlO/W2J3mI/Nzzfe dY+SImJXX+VGNSAQ1YzrH/b+m7oHg8k16YOt/QP9ergOKB5E6xzR3JFNUgXoz3X7HnxltV MgrDNXyHr6vwK9VeF9rqSS7JJ1qM+FCCR1Wb0wdFtpCUGMSAtVlbrNk/4JutbYosujvv9k 42pBTdGTCZ0BF7G+ek7DoN+VVDuXqo1mo3DR6GM/89vWG0bHLqJktarEcvMaustJ0UpIex kaC+gCrDZKiUzkbhNOQEUdPDPlcENCB54mstULczzgVDkWIpb+54w6bFKpVd2Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1675831815; a=rsa-sha256; cv=none; b=tJgSGfXNTD3Gn6TzAwwwD/A447XN9eEtEywyViroNypbgCNHTRUJEqN4xhEVv+HWRsE/El A4pVE8w/T2XpA9amJ/w98ksOCFd91iFSEprxMS+g4OPJH7UBwRt5o9Kz2S9I2bl4OaV/L9 ELxRptQUigE4n0SJn8g8eqLVaHxV6xFfnY3nF6x6o0rO7C+bB9BRqmiNwHzWHrvCslOF4d F433aouhQDjyyBEJ6KnkdZe10mN762ERA4SW6wMkQRQJxZWmF8sR0Z+G3/RFQLvTF3hMq0 M/hPyIA6S8sAp6dFp/L09HnaPjani6E1cUwEHwGQOl1nxlAQmMF3+/B/Z5v6aw== Received: from smtpclient.apple (ns1.oxydns.net [45.32.91.63]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: zlei/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4PBSGs2KX9zkl5; Wed, 8 Feb 2023 04:50:13 +0000 (UTC) (envelope-from zlei@FreeBSD.org) From: Zhenlei Huang Message-Id: <4FF5CEED-A667-455A-8BFC-960B50E8D93D@FreeBSD.org> Content-Type: multipart/alternative; boundary="Apple-Mail=_5EEEAFA2-17B5-4EE2-B53F-82B1472F949E" List-Id: Discussions about the use of FreeBSD-current List-Archive: https://lists.freebsd.org/archives/freebsd-current List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-current@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.120.41.1.2\)) Subject: Re: kernel compile fails if device bpf is not enabled Date: Wed, 8 Feb 2023 12:49:46 +0800 In-Reply-To: <20230207100812.76d206d4@ernst.home> Cc: freebsd-current@freebsd.org To: Gary Jennejohn References: <20230207100812.76d206d4@ernst.home> X-Mailer: Apple Mail (2.3696.120.41.1.2) X-ThisMailContainsUnwantedMimeParts: N --Apple-Mail=_5EEEAFA2-17B5-4EE2-B53F-82B1472F949E Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii Hi Gary, Thanks for the report! Post the fix to Phabricator = https://reviews.freebsd.org/D38432 = . Best regards, Zhenlei > On Feb 7, 2023, at 5:08 PM, Gary Jennejohn wrote: >=20 > I just saw this error today because I didn't have device bpf enabled = in > my kernel configuration file: >=20 > -------------------------------------------------------------- >>>> stage 3.1: building everything > -------------------------------------------------------------- > linking kernel.full > ld: error: undefined symbol: bpf_mtap_if >>>> referenced by if.c:4724 (/usr/src/sys/net/if.c:4724) >>>> if.o:(if_bpfmtap) >>>> referenced by if_tuntap.c:1717 (/usr/src/sys/net/if_tuntap.c:1717) >>>> if_tuntap.o:(tunread) >>>> referenced by if_vlan.c:1292 (/usr/src/sys/net/if_vlan.c:1292) >>>> if_vlan.o:(vlan_transmit) >=20 > ld: error: undefined symbol: bpf_mtap2_if >>>> referenced by if_gif.c:323 (/usr/src/sys/net/if_gif.c:323) >>>> if_gif.o:(gif_transmit) >>>> referenced by if_tuntap.c:1816 (/usr/src/sys/net/if_tuntap.c:1816) >>>> if_tuntap.o:(tunwrite) > --- kernel.full --- > *** [kernel.full] Error code 1 >=20 > This happens because a dummy bpf_mtap_if() (called a NOP stub in = bpf.c) > isn't being defined if bpf is not enabled. >=20 > -- > Gary Jennejohn >=20 --Apple-Mail=_5EEEAFA2-17B5-4EE2-B53F-82B1472F949E Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=us-ascii
Hi Gary,

Thanks for = the report! Post the fix to Phabricator https://reviews.freebsd.org/D38432 .

Best regards,
Zhenlei

On Feb 7, 2023, at 5:08 PM, Gary Jennejohn = <garyj@gmx.de> = wrote:

I just saw this error today because I didn't have device bpf = enabled in
my kernel configuration file:

--------------------------------------------------------------<= br class=3D"">
stage 3.1: = building everything
------------------------= --------------------------------------
linking = kernel.full
ld: error: undefined symbol: bpf_mtap_if
referenced by if.c:4724 = (/usr/src/sys/net/if.c:4724)
=             &n= bsp;if.o:(if_bpfmtap)
referenced by if_tuntap.c:1717 = (/usr/src/sys/net/if_tuntap.c:1717)
=             &n= bsp;if_tuntap.o:(tunread)
referenced by if_vlan.c:1292 = (/usr/src/sys/net/if_vlan.c:1292)
=             &n= bsp;if_vlan.o:(vlan_transmit)

ld: = error: undefined symbol: bpf_mtap2_if
referenced by if_gif.c:323 = (/usr/src/sys/net/if_gif.c:323)
=             &n= bsp;if_gif.o:(gif_transmit)
referenced by if_tuntap.c:1816 = (/usr/src/sys/net/if_tuntap.c:1816)
=             &n= bsp;if_tuntap.o:(tunwrite)
--- kernel.full ---
*** [kernel.full] Error code 1

This happens because a dummy bpf_mtap_if() (called a NOP stub = in bpf.c)
isn't being defined if bpf is not enabled.

--
Gary Jennejohn




= --Apple-Mail=_5EEEAFA2-17B5-4EE2-B53F-82B1472F949E--