Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 8 Feb 2023 18:11:16 +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:  <71C09FDA-6109-470A-953A-258BC95376DC@FreeBSD.org>
In-Reply-To: <20230208073249.4ccb5fb7@ernst.home>
References:  <20230207100812.76d206d4@ernst.home> <4FF5CEED-A667-455A-8BFC-960B50E8D93D@FreeBSD.org> <20230208073249.4ccb5fb7@ernst.home>

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

--Apple-Mail=_A744D2AE-F7A7-49D6-9296-9BE984BE4D83
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
	charset=us-ascii



> On Feb 8, 2023, at 2:32 PM, Gary Jennejohn <garyj@gmx.de> wrote:
>=20
> On Wed, 8 Feb 2023 12:49:46 +0800
> Zhenlei Huang <zlei@FreeBSD.org <mailto:zlei@FreeBSD.org>> wrote:
>=20
> Hi Zhenlei,
>=20
>> Thanks for the report! Post the fix to Phabricator =
https://reviews.freebsd.org/D38432 <https://reviews.freebsd.org/D38432>; =
<https://reviews.freebsd.org/D38432 =
<https://reviews.freebsd.org/D38432>>; .
>>=20
>> Best regards,
>> Zhenlei
>>=20
>=20
> Thanks!  I see it's been accepted.

Fixed in 9df6eeabb379 .

>=20
>>> 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
>=20
> --
> Gary Jennejohn




--Apple-Mail=_A744D2AE-F7A7-49D6-9296-9BE984BE4D83
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""><br =
class=3D""><div><br class=3D""><blockquote type=3D"cite" class=3D""><div =
class=3D"">On Feb 8, 2023, at 2:32 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""><meta =
charset=3D"UTF-8" class=3D""><span style=3D"caret-color: rgb(0, 0, 0); =
font-family: Menlo-Regular; font-size: 13px; font-style: normal; =
font-variant-caps: normal; font-weight: 400; letter-spacing: normal; =
text-align: start; text-indent: 0px; text-transform: none; white-space: =
normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; =
text-decoration: none; float: none; display: inline !important;" =
class=3D"">On Wed, 8 Feb 2023 12:49:46 +0800</span><br =
style=3D"caret-color: rgb(0, 0, 0); font-family: Menlo-Regular; =
font-size: 13px; font-style: normal; font-variant-caps: normal; =
font-weight: 400; letter-spacing: normal; text-align: start; =
text-indent: 0px; text-transform: none; white-space: normal; =
word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: =
none;" class=3D""><span style=3D"caret-color: rgb(0, 0, 0); font-family: =
Menlo-Regular; font-size: 13px; font-style: normal; font-variant-caps: =
normal; font-weight: 400; letter-spacing: normal; text-align: start; =
text-indent: 0px; text-transform: none; white-space: normal; =
word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: =
none; float: none; display: inline !important;" class=3D"">Zhenlei Huang =
&lt;</span><a href=3D"mailto:zlei@FreeBSD.org" style=3D"font-family: =
Menlo-Regular; font-size: 13px; font-style: normal; font-variant-caps: =
normal; font-weight: 400; letter-spacing: normal; orphans: auto; =
text-align: start; text-indent: 0px; text-transform: none; white-space: =
normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; =
-webkit-text-stroke-width: 0px;" class=3D"">zlei@FreeBSD.org</a><span =
style=3D"caret-color: rgb(0, 0, 0); font-family: Menlo-Regular; =
font-size: 13px; font-style: normal; font-variant-caps: normal; =
font-weight: 400; letter-spacing: normal; text-align: start; =
text-indent: 0px; text-transform: none; white-space: normal; =
word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: =
none; float: none; display: inline !important;" class=3D"">&gt; =
wrote:</span><br style=3D"caret-color: rgb(0, 0, 0); font-family: =
Menlo-Regular; font-size: 13px; font-style: normal; font-variant-caps: =
normal; font-weight: 400; letter-spacing: normal; text-align: start; =
text-indent: 0px; text-transform: none; white-space: normal; =
word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: =
none;" class=3D""><br style=3D"caret-color: rgb(0, 0, 0); font-family: =
Menlo-Regular; font-size: 13px; font-style: normal; font-variant-caps: =
normal; font-weight: 400; letter-spacing: normal; text-align: start; =
text-indent: 0px; text-transform: none; white-space: normal; =
word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: =
none;" class=3D""><span style=3D"caret-color: rgb(0, 0, 0); font-family: =
Menlo-Regular; font-size: 13px; font-style: normal; font-variant-caps: =
normal; font-weight: 400; letter-spacing: normal; text-align: start; =
text-indent: 0px; text-transform: none; white-space: normal; =
word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: =
none; float: none; display: inline !important;" class=3D"">Hi =
Zhenlei,</span><br style=3D"caret-color: rgb(0, 0, 0); font-family: =
Menlo-Regular; font-size: 13px; font-style: normal; font-variant-caps: =
normal; font-weight: 400; letter-spacing: normal; text-align: start; =
text-indent: 0px; text-transform: none; white-space: normal; =
word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: =
none;" class=3D""><br style=3D"caret-color: rgb(0, 0, 0); font-family: =
Menlo-Regular; font-size: 13px; font-style: normal; font-variant-caps: =
normal; font-weight: 400; letter-spacing: normal; text-align: start; =
text-indent: 0px; text-transform: none; white-space: normal; =
word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: =
none;" class=3D""><blockquote type=3D"cite" style=3D"font-family: =
Menlo-Regular; font-size: 13px; font-style: normal; font-variant-caps: =
normal; font-weight: 400; letter-spacing: normal; orphans: auto; =
text-align: start; text-indent: 0px; text-transform: none; white-space: =
normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; =
-webkit-text-stroke-width: 0px; text-decoration: none;" class=3D"">Thanks =
for the report! Post the fix to Phabricator<span =
class=3D"Apple-converted-space">&nbsp;</span><a =
href=3D"https://reviews.freebsd.org/D38432" =
class=3D"">https://reviews.freebsd.org/D38432</a><span =
class=3D"Apple-converted-space">&nbsp;</span>&lt;<a =
href=3D"https://reviews.freebsd.org/D38432" =
class=3D"">https://reviews.freebsd.org/D38432</a>&gt; .<br class=3D""><br =
class=3D"">Best regards,<br class=3D"">Zhenlei<br class=3D""><br =
class=3D""></blockquote><br style=3D"caret-color: rgb(0, 0, 0); =
font-family: Menlo-Regular; font-size: 13px; font-style: normal; =
font-variant-caps: normal; font-weight: 400; letter-spacing: normal; =
text-align: start; text-indent: 0px; text-transform: none; white-space: =
normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; =
text-decoration: none;" class=3D""><span style=3D"caret-color: rgb(0, 0, =
0); font-family: Menlo-Regular; font-size: 13px; font-style: normal; =
font-variant-caps: normal; font-weight: 400; letter-spacing: normal; =
text-align: start; text-indent: 0px; text-transform: none; white-space: =
normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; =
text-decoration: none; float: none; display: inline !important;" =
class=3D"">Thanks! &nbsp;I see it's been accepted.</span><br =
style=3D"caret-color: rgb(0, 0, 0); font-family: Menlo-Regular; =
font-size: 13px; font-style: normal; font-variant-caps: normal; =
font-weight: 400; letter-spacing: normal; text-align: start; =
text-indent: 0px; text-transform: none; white-space: normal; =
word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: =
none;" class=3D""></div></blockquote><div><br class=3D""></div><div>Fixed =
in&nbsp;9df6eeabb379 .</div><br class=3D""><blockquote type=3D"cite" =
class=3D""><div class=3D""><br style=3D"caret-color: rgb(0, 0, 0); =
font-family: Menlo-Regular; font-size: 13px; font-style: normal; =
font-variant-caps: normal; font-weight: 400; letter-spacing: normal; =
text-align: start; text-indent: 0px; text-transform: none; white-space: =
normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; =
text-decoration: none;" class=3D""><blockquote type=3D"cite" =
style=3D"font-family: Menlo-Regular; font-size: 13px; font-style: =
normal; font-variant-caps: normal; font-weight: 400; letter-spacing: =
normal; orphans: auto; text-align: start; text-indent: 0px; =
text-transform: none; white-space: normal; widows: auto; word-spacing: =
0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; =
text-decoration: none;" class=3D""><blockquote type=3D"cite" 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:<br =
class=3D""><br 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;&nb=
sp;&nbsp;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;&nb=
sp;&nbsp;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;&nb=
sp;&nbsp;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;&nb=
sp;&nbsp;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;&nb=
sp;&nbsp;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""></blockquote></blockquote><br =
style=3D"caret-color: rgb(0, 0, 0); font-family: Menlo-Regular; =
font-size: 13px; font-style: normal; font-variant-caps: normal; =
font-weight: 400; letter-spacing: normal; text-align: start; =
text-indent: 0px; text-transform: none; white-space: normal; =
word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: =
none;" class=3D""><span style=3D"caret-color: rgb(0, 0, 0); font-family: =
Menlo-Regular; font-size: 13px; font-style: normal; font-variant-caps: =
normal; font-weight: 400; letter-spacing: normal; text-align: start; =
text-indent: 0px; text-transform: none; white-space: normal; =
word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: =
none; float: none; display: inline !important;" class=3D"">--</span><br =
style=3D"caret-color: rgb(0, 0, 0); font-family: Menlo-Regular; =
font-size: 13px; font-style: normal; font-variant-caps: normal; =
font-weight: 400; letter-spacing: normal; text-align: start; =
text-indent: 0px; text-transform: none; white-space: normal; =
word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: =
none;" class=3D""><span style=3D"caret-color: rgb(0, 0, 0); font-family: =
Menlo-Regular; font-size: 13px; font-style: normal; font-variant-caps: =
normal; font-weight: 400; letter-spacing: normal; text-align: start; =
text-indent: 0px; text-transform: none; white-space: normal; =
word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: =
none; float: none; display: inline !important;" class=3D"">Gary =
Jennejohn</span></div></blockquote></div><div class=3D""><br class=3D"">

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

--Apple-Mail=_A744D2AE-F7A7-49D6-9296-9BE984BE4D83--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?71C09FDA-6109-470A-953A-258BC95376DC>