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>

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

[-- Attachment #1 --]


> On Feb 8, 2023, at 2:32 PM, Gary Jennejohn <garyj@gmx.de> wrote:
> 
> On Wed, 8 Feb 2023 12:49:46 +0800
> Zhenlei Huang <zlei@FreeBSD.org <mailto:zlei@FreeBSD.org>> wrote:
> 
> Hi Zhenlei,
> 
>> 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>>; .
>> 
>> Best regards,
>> Zhenlei
>> 
> 
> Thanks!  I see it's been accepted.

Fixed in 9df6eeabb379 .

> 
>>> 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:
>>> 
>>> --------------------------------------------------------------
>>>>>> 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)
>>> 
>>> 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
>>> 
>>> 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
>>> 
> 
> --
> Gary Jennejohn




[-- Attachment #2 --]
<html><head><meta http-equiv="Content-Type" content="text/html; charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On Feb 8, 2023, at 2:32 PM, Gary Jennejohn &lt;<a href="mailto:garyj@gmx.de" class="">garyj@gmx.de</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class=""><meta charset="UTF-8" class=""><span style="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="">On Wed, 8 Feb 2023 12:49:46 +0800</span><br style="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=""><span style="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="">Zhenlei Huang &lt;</span><a href="mailto:zlei@FreeBSD.org" style="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="">zlei@FreeBSD.org</a><span style="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="">&gt; wrote:</span><br style="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=""><br style="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=""><span style="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="">Hi Zhenlei,</span><br style="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=""><br style="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=""><blockquote type="cite" style="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="">Thanks for the report! Post the fix to Phabricator<span class="Apple-converted-space">&nbsp;</span><a href="https://reviews.freebsd.org/D38432" class="">https://reviews.freebsd.org/D38432</a><span class="Apple-converted-space">&nbsp;</span>&lt;<a href="https://reviews.freebsd.org/D38432" class="">https://reviews.freebsd.org/D38432</a>&gt; .<br class=""><br class="">Best regards,<br class="">Zhenlei<br class=""><br class=""></blockquote><br style="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=""><span style="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="">Thanks! &nbsp;I see it's been accepted.</span><br style="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=""></div></blockquote><div><br class=""></div><div>Fixed in&nbsp;9df6eeabb379 .</div><br class=""><blockquote type="cite" class=""><div class=""><br style="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=""><blockquote type="cite" style="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=""><blockquote type="cite" class="">On Feb 7, 2023, at 5:08 PM, Gary Jennejohn &lt;<a href="mailto:garyj@gmx.de" class="">garyj@gmx.de</a>&gt; wrote:<br class=""><br class="">I just saw this error today because I didn't have device bpf enabled in<br class="">my kernel configuration file:<br class=""><br class="">--------------------------------------------------------------<br class=""><blockquote type="cite" class=""><blockquote type="cite" class=""><blockquote type="cite" class="">stage 3.1: building everything<br class=""></blockquote></blockquote></blockquote>--------------------------------------------------------------<br class="">linking kernel.full<br class="">ld: error: undefined symbol: bpf_mtap_if<br class=""><blockquote type="cite" class=""><blockquote type="cite" class=""><blockquote type="cite" class="">referenced by if.c:4724 (/usr/src/sys/net/if.c:4724)<br class="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if.o:(if_bpfmtap)<br class="">referenced by if_tuntap.c:1717 (/usr/src/sys/net/if_tuntap.c:1717)<br class="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if_tuntap.o:(tunread)<br class="">referenced by if_vlan.c:1292 (/usr/src/sys/net/if_vlan.c:1292)<br class="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if_vlan.o:(vlan_transmit)<br class=""></blockquote></blockquote></blockquote><br class="">ld: error: undefined symbol: bpf_mtap2_if<br class=""><blockquote type="cite" class=""><blockquote type="cite" class=""><blockquote type="cite" class="">referenced by if_gif.c:323 (/usr/src/sys/net/if_gif.c:323)<br class="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if_gif.o:(gif_transmit)<br class="">referenced by if_tuntap.c:1816 (/usr/src/sys/net/if_tuntap.c:1816)<br class="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if_tuntap.o:(tunwrite)<br class=""></blockquote></blockquote></blockquote>--- kernel.full ---<br class="">*** [kernel.full] Error code 1<br class=""><br class="">This happens because a dummy bpf_mtap_if() (called a NOP stub in bpf.c)<br class="">isn't being defined if bpf is not enabled.<br class=""><br class="">--<br class="">Gary Jennejohn<br class=""><br class=""></blockquote></blockquote><br style="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=""><span style="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="">--</span><br style="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=""><span style="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="">Gary Jennejohn</span></div></blockquote></div><div class=""><br class="">

</div>
<br class=""></body></html>
help

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