Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 8 Feb 2023 12:49:46 +0800
From:      Zhenlei Huang <zlei@FreeBSD.org>
To:        Gary Jennejohn <garyj@gmx.de>
Cc:        freebsd-current@freebsd.org
Subject:   Re: kernel compile fails if device bpf is not enabled
Message-ID:  <4FF5CEED-A667-455A-8BFC-960B50E8D93D@FreeBSD.org>
In-Reply-To: <20230207100812.76d206d4@ernst.home>
References:  <20230207100812.76d206d4@ernst.home>

next in thread | previous in thread | raw e-mail | index | archive | help

--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 <https://reviews.freebsd.org/D38432>; =
.

Best regards,
Zhenlei

> On Feb 7, 2023, at 5:08 PM, Gary Jennejohn <garyj@gmx.de> 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

<html><head><meta http-equiv=3D"Content-Type" content=3D"text/html; =
charset=3Dus-ascii"></head><body style=3D"word-wrap: break-word; =
-webkit-nbsp-mode: space; line-break: after-white-space;" class=3D""><div =
class=3D"">Hi Gary,</div><div class=3D""><br class=3D""></div>Thanks for =
the report! Post the fix to&nbsp;Phabricator&nbsp;<a =
href=3D"https://reviews.freebsd.org/D38432" =
class=3D"">https://reviews.freebsd.org/D38432</a>&nbsp;.<div =
class=3D""><br class=3D""></div><div class=3D""><div style=3D"caret-color:=
 rgb(0, 0, 0); color: rgb(0, 0, 0);">Best regards,</div><div =
style=3D"caret-color: rgb(0, 0, 0); color: rgb(0, 0, =
0);">Zhenlei</div><div><br class=3D""><blockquote type=3D"cite" =
class=3D""><div class=3D"">On Feb 7, 2023, at 5:08 PM, Gary Jennejohn =
&lt;<a href=3D"mailto:garyj@gmx.de" class=3D"">garyj@gmx.de</a>&gt; =
wrote:</div><br class=3D"Apple-interchange-newline"><div class=3D""><div =
class=3D"">I just saw this error today because I didn't have device bpf =
enabled in<br class=3D"">my kernel configuration file:<br class=3D""><br =
class=3D"">--------------------------------------------------------------<=
br class=3D""><blockquote type=3D"cite" class=3D""><blockquote =
type=3D"cite" class=3D""><blockquote type=3D"cite" class=3D"">stage 3.1: =
building everything<br =
class=3D""></blockquote></blockquote></blockquote>------------------------=
--------------------------------------<br class=3D"">linking =
kernel.full<br class=3D"">ld: error: undefined symbol: bpf_mtap_if<br =
class=3D""><blockquote type=3D"cite" class=3D""><blockquote type=3D"cite" =
class=3D""><blockquote type=3D"cite" class=3D"">referenced by if.c:4724 =
(/usr/src/sys/net/if.c:4724)<br class=3D""> =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp;if.o:(if_bpfmtap)<br class=3D"">referenced by if_tuntap.c:1717 =
(/usr/src/sys/net/if_tuntap.c:1717)<br class=3D""> =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp;if_tuntap.o:(tunread)<br class=3D"">referenced by if_vlan.c:1292 =
(/usr/src/sys/net/if_vlan.c:1292)<br class=3D""> =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp;if_vlan.o:(vlan_transmit)<br =
class=3D""></blockquote></blockquote></blockquote><br class=3D"">ld: =
error: undefined symbol: bpf_mtap2_if<br class=3D""><blockquote =
type=3D"cite" class=3D""><blockquote type=3D"cite" class=3D""><blockquote =
type=3D"cite" class=3D"">referenced by if_gif.c:323 =
(/usr/src/sys/net/if_gif.c:323)<br class=3D""> =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp;if_gif.o:(gif_transmit)<br class=3D"">referenced by if_tuntap.c:1816 =
(/usr/src/sys/net/if_tuntap.c:1816)<br class=3D""> =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp;if_tuntap.o:(tunwrite)<br =
class=3D""></blockquote></blockquote></blockquote>--- kernel.full ---<br =
class=3D"">*** [kernel.full] Error code 1<br class=3D""><br =
class=3D"">This happens because a dummy bpf_mtap_if() (called a NOP stub =
in bpf.c)<br class=3D"">isn't being defined if bpf is not enabled.<br =
class=3D""><br class=3D"">--<br class=3D"">Gary Jennejohn<br =
class=3D""><br class=3D""></div></div></blockquote></div><br =
class=3D""><div class=3D"">
<div><br class=3D""></div>

</div>
<br class=3D""></div></body></html>=

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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4FF5CEED-A667-455A-8BFC-960B50E8D93D>