Summary: | iflib: fail to compile kernel on FreeBSD 12.1-BETA2: Fatal error: ifdi_if.h file not found. | ||
---|---|---|---|
Product: | Base System | Reporter: | rashey |
Component: | kern | Assignee: | Bugmeister <bugmeister> |
Status: | Closed Overcome By Events | ||
Severity: | Affects Only Me | CC: | Z462vasa, clay, imp, kbowling, net, tommyhp2 |
Priority: | --- | Keywords: | needs-qa, regression |
Version: | 12.1-RELEASE | ||
Hardware: | amd64 | ||
OS: | Any | ||
Bug Depends on: | |||
Bug Blocks: | 240700 |
Description
rashey
2019-10-03 22:17:59 UTC
I'm also encountering this on 12.0 upgraded to 12.1: --- if_em.o --- In file included from /usr/src12.1/sys/dev/e1000/if_em.c:30: /usr/src12.1/sys/dev/e1000/if_em.h:91:10: fatal error: 'ifdi_if.h' file not found #include "ifdi_if.h" ^~~~~~~~~~~ The 'ifdi_if.h' does not exist within src (r356738) per: find /usr/src12.1 -type f -name 'ifdi_if.h' Yet, specifying 'device iflib' in the kernel config does work while that entry does not exists in GENERIC nor needed in 12.0. I did some digging and found: 12.0 sys/conf/files: net/ifdi_if.m optional ether pci 12.1 sys/conf/files: net/ifdi_if.m optional ether pci iflib I assume that 'device iflib' is now required going forward within the kernel configuration file? I have the same kernel compile issue for 12.2-RELEASE: In file included from /usr/src/sys/dev/e1000/if_em.c:30: /usr/src/sys/dev/e1000/if_em.h:96:10: fatal error: 'ifdi_if.h' file not found #include "ifdi_if.h" ^~~~~~~~~~~ 1 error generated. *** Error code 1 Stop. make[2]: stopped in /usr/obj/usr/src/amd64.amd64/sys/ROUTER *** Error code 1 *** Error code 1 It's caused by: device em # Intel PRO/1000 Gigabit Ethernet Family Fixed by adding the iflib device: device iflib device em # Intel PRO/1000 Gigabit Ethernet Family Kernel compiled now without errors. Something else that changed and affected me was that: device tun has been deprecated and replaced with: device tuntap This is not a bug, just a change in the kernel requiring a new device because em now has dependency iflib. It's a little annoying that these changes happen but they make sense in order to be able to lighten the kernel if you are not using one of the NIC's. It's documented fine in GENERIC: # PCI/PCI-X/PCIe Ethernet NICs that use iflib infrastructure cc -c -O2 -pipe -fno-strict-aliasing -g -nostdinc -I. -I../../.. -I../../../contrib/ck/include -I../../../contrib/libfdt -D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS -include opt_global.h -fno-common -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -MD -MF.depend.efirtc.o -MTefirtc.o -fdebug-prefix-map=./machine=/usr/src/sys/amd64/include -fdebug-prefix-map=./x86=/usr/src/sys/x86/include -mcmodel=kernel -mno-red-zone -mno-mmx -mno-sse -msoft-float -fno-asynchronous-unwind-tables -ffreestanding -fwrapv -fstack-protector -gdwarf-2 -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wcast-qual -Wundef -Wno-pointer-sign -D__printf__=__freebsd_kprintf__ -Wmissing-include-dirs -fdiagnostics-show-option -Wno-unknown-pragmas -Wno-error-tautological-compare -Wno-error-empty-body -Wno-error-parentheses-equality -Wno-error-unused-function -Wno-error-pointer-sign -Wno-error-shift-negative-value -Wno-address-of-packed-member -mno-aes -mno-avx -std=iso9899:1999 -Werror ../../../dev/efidev/efirtc.c ctfconvert -L VERSION -g efirtc.o cc -c -O2 -pipe -fno-strict-aliasing -g -nostdinc -I. -I../../.. -I../../../contrib/ck/include -I../../../contrib/libfdt -D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS -include opt_global.h -fno-common -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -MD -MF.depend.if_em.o -MTif_em.o -fdebug-prefix-map=./machine=/usr/src/sys/amd64/include -fdebug-prefix-map=./x86=/usr/src/sys/x86/include -mcmodel=kernel -mno-red-zone -mno-mmx -mno-sse -msoft-float -fno-asynchronous-unwind-tables -ffreestanding -fwrapv -fstack-protector -gdwarf-2 -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wcast-qual -Wundef -Wno-pointer-sign -D__printf__=__freebsd_kprintf__ -Wmissing-include-dirs -fdiagnostics-show-option -Wno-unknown-pragmas -Wno-error-tautological-compare -Wno-error-empty-body -Wno-error-parentheses-equality -Wno-error-unused-function -Wno-error-pointer-sign -Wno-error-shift-negative-value -Wno-address-of-packed-member -mno-aes -mno-avx -std=iso9899:1999 -Werror ../../../dev/e1000/if_em.c -I../../../dev/e1000 In file included from ../../../dev/e1000/if_em.c:30: ../../../dev/e1000/if_em.h:91:10: fatal error: 'ifdi_if.h' file not found #include "ifdi_if.h" ^~~~~~~~~~~ 1 error generated. *** Error code 1 # PCI/PCI-X/PCIe Ethernet NICs that use iflib infrastructure device<><------>iflib device<><------>em<----><------><------># Intel PRO/1000 Gigabit Ethernet Family #device><------>ix<----><------><------># Intel PRO/10GbE PCIE PF Ethernet #device><------>ixv<---><------><------># Intel PRO/10GbE PCIE VF Ethernet FreeBSD 12.1-STABLE r362880 GENERIC amd64 It looks like the common theme here is you have custom kernels and need to add 'device iflib'. Let me see if there is some way to handle this in config(9). I'll take a look at this to see if there's something we can do. There's a lot of ugly things, I'll see which one(s) need to be deployed here. https://reviews.freebsd.org/D29848 https://reviews.freebsd.org/D29849 Contain my notion on how to fix this. ^Triage: FreeBSD 12 is now out of support. |